13.12.06

CheeseHunt

It's done!! We stayed up until 2 Monday morning, but it's done. We've implemented a complete betting system into Half-Life 2. (OK, not quite HL2...a toned-down, non-violent HL2 mod designed by our instructor.) Check the link for the details (although there aren't very many...yet). I may open up our Google Group's access control, so you can further peruse the twisted minds behind the creation, but until then, I leave you with some slightly disappointing and not quite representative screens:





30.11.06

cs3500/hwfinprjD

As I've mentioned before, our CS 3500 final project is a Half-Life 2 mod, based upon the instructor's prepared capture-the-flag-ish mod. Although I can't currently disclose the specifics, my team's mod spilts the players into two roles: flag hunters and gamblers. The hunters go about their business, hunting down each flag and getting points and whatnot, while shooting each other with modified weapons (including the Jagerbomber, which blurs the opponent's vision =) to stifle their progress. The gamblers oversee the gameplay and make bets on each of the players, while being able to influence the outcome in various ways (secret!). It's coming together quite nicely, and might become more interesting as we merge our project with those of other teams (as required by the assignment). I'll be sure to describe how it all turned out, once this is over in a few weeks, and I might even post download links!

16.11.06

Pasco Grate!

If you're not happy with your browsing experience, you must be using

(gasp)
IE.

That's not good.



Do it! BROWSE HAPPY!!

31.10.06

Twittering Mad, or Why I Hate Visual Studio

Gah! It's been too long. I finally have the pento project hosted somewhere that properly allows PHP. Thus, the Pentomino Word of the Day should show up in the sidebar. Tell me what you think.

Afterthought: Please don't use the copy hosted on my site. Just ask me for the source.

I found an interesting website a few days ago called twitter. It's a sort of microblog service, that lets you use IM or SMS to post short blurbs about your current status. Your twitter home page has a list of recent twitterings from friends (subscribees), which you can alternatively have sent to you by, again, IM or SMS.

You might have noticed the twitter section of "about me" in the sidebar. At the time of this writing, it shows that I was "extremely pissed at Visual Studio" yesterday. Allow me to explain:

I spent half of yesterday debugging a Half-Life 2 mod. With Visual Studio. Half-Life 2 was never meant to be modified using VS, but Bob (CS 3500 instructor) hacked to fit anyway. It takes around 25 minutes to compile either of the two main projects. Unfortunately, this means that if you mess anything up, not only does it give you enough time to read an entire article from Exploding Unicorn, but it will also spew 637 linker errors at you, sometimes crashing VS. After each crash, I'd fix it by adding the appropriate library or whatever then build it again, and it would give different results! It turns out that if you try to abort the build (or it crashes during compilation), during the next build it will get very confused as to which object files have actually been compiled successfully, and produce invalid executables or libraries, forcing you to rebuild. This makes me wonder why they even let you abort, if it fouls up the process so much. Anyway, after discovering this, I used the half-hour before the bus left to speed-debug the whole thing, and it turns out I actually did find out why the flashlight wasn't turning on.

You'd think that this is typical, that I just made a mistake, but it doesn't have to be like that. There are plenty of ways of determining whether a file was built correctly. VS just doesn't bother. It assumes you know everything that happened last build, and just builds anything that hasn't been built yet (successfully or not). This may be slightly more efficient on its part, but it becomes less so when the program has 700 source files and you're forced to completely rebuild (twice).

OK, end of rant. By the way, if you have AC:WW and want some peaches or a mush-room suite, let me know here. I'm "Questionmark".

And, uh, happy Hallow's Eve.

27.7.06

Let it be hosted; let it be posted.

I have the script online at my old website, and I have a project page for those who want to learn more about my pento project.

EDIT: Direct access to the script isn't working, becuase the server is being stupid with permissions. When I get it fixed, you'll be able to see the word of the day in the sidebar, too.

Look out, Hyrule!

It's Camp Hyrule for me this summer. The virtual week-long summer camp, organized by Nintendo online administrators (NOA), is a sandbox of Nintendo-related online activities, including live chats and bulletin boards, Flash games, and unpredictable occurences. Campers are organized into cabins, which act as competing teams in many of the activities; prizes are awarded to members of the winning cabin.

Registration is still open through today, so get moving if you want in.

21.7.06

Completoration!

I've had much free time lately, so I've finished the PNG pentomino generator. Have a look!

This is the default image:

The script also has several parameters other than the word to penominify, such as

color,

size,

and bevel (depth).

Also soon to come is background color! Of course, since my script can let the background be transparent, that is probably the style of choice for most websites.

I'll soon give links to the source, once I get it hosted. I still want to be able to print some neat ASCII art pentominos, but expect to see a Pentomino Word of the Day or something in the sidebar soon.

EDIT: Heh, you've probably noticed the extra space at the top of each image. I'll try to get rid of that.

18.7.06

Pentomination!

My latest personal project, on which I have been working for a few weeks, attempts to draw words using pentominos. (Like Tetris pieces, but with one more 'mino'.) It's written in PHP, and I've got it doing things like

[] [] []
[] [][] [] []
[][] [][] [] [] [][][]
[] [] [][] [][] [][]
which spells 'hello', and

[1]
[1][1][2][2] [4][4][4][5][5]
[1] [2][2][3][3][3][4] [5]
[1] [2][3] [3][4][5][5]
which is the word 'pants'. (For the confused, the pentominos are crammed together, distinguished by number.) While this is a good start, especially since I haven't before done anything like kerning letters together, I plan for the script to be able to create things like

_
_ _ | | _
_____| | ___ | |_ | |___| |
|_ _| |_| . | |_ |_ _| | _| |_
| | |_ | _| | | |_| | | |_| _|
|_| |_|_| |_|_____|_|___|_|

___ _
_ | _| _ | |_ _
| |_| |_____| |_ _____ | _|___ _| |_
| . | | . _|_ |_| _ | | | . _|_ _|
|___|_|___| |___|_| |_| |_|___| |_|

_ _ ___
| | ___ _| |___ _ ___| _|
| |_ |_ |_| _| _| _____ | | . | |
_| | |_| |_ | |_| | | . _|_| | _| |
|___|_____| |_|_|___| |___|_____|_| |_|

_ _
_____| | ___ | |___ ___ _ _ _
|_ _| |_| . | | | . |_ |___| | _| |_____| |_
| | |_ | _| | |_ | | |_ _| | . | . _| _|
|_| |_|_| |___|_| |___|_| |___|___|___|

with a single command, and, ultimately, generate heavily customizable graphics in real time for websites such as mine (ooo...pentomino word of the day!). Once I finish one, the other should shortly follow, so expect several further updates.

EDIT: Here's one of my early experiments, showing the graphical style I had settled on:



Since I am still planning to follow this prototype, consider it a preview of what's to come.

7.7.06

Old S|<0oL tools

CS Lab on Wednesday introduced us to something new and exciting: the dot utility. Er, it's actually around 15 years old, but it's still as functional as ever. Here's how to draw a simple flowchart, for example:

First, I type this bit of extremely simple code into the file Flowchart.dot, so simple that many people reading this should be able to understand it:

digraph Flowchart {
node1 [label="Program starts", shape=rect, style=rounded];
node2 [label="Ask user's age", shape=parallelogram];
{
rank=same;
node3 [label="18 or older?", shape=diamond];
branch [label="Quit the game", shape=rect, style=rounded];
}
node4 [label="Finish starting up", shape=rect, style=rounded];

node1 -> node2 -> node3;
node3 -> branch [label="NO"];
node3 -> node4 [label="YES"];
}

...then I type dot -Tpng Flowchart.dot -o Flowchart.png on the command line, and I get this:



Very slick, no? All I need to specify are the nodes and the connections between them, along with a few parameters for node shape, etc., in order to produce a nice, polished flowchart/graph/thing. Why are we fiddling with graphics and flowcharts, though? Well, we're currently studying directed graphs and shortest-path problems, and in order to help visualize the problem, we use dot.

Even neater is the fact that this utility, as well as several other similar ones (e.g. that draw radial or circular graphs), were recently packaged up with the name GraphViz and released under an open-source license, so that anyone can easily make a graph of the courses needed to complete their major:



Not that anyone besides me actually opts for Computer Engineering.

30.6.06

w00t, I'm published!

I got this email a while ago:

From: InfoWorld Letters
To: Y2kBugxp90
Date: Jun 16, 2006 6:11 PM
Subject: Re: Thank you for supporting Mac tinkerers.

We enjoyed your letter (below) -- and we are interested in publishing it in InfoWorld.

If you would like to grant us permission, please reply to this e-mail (preserving the history) and include your city and state for the letter's attribution. Your e-mail address will not appear in print. Should your letter appear in the magazine, please note that it may be edited for length or clarity.

Looking forward to your reply,

Alec C. Wagner
Deputy Managing Editor
InfoWorld


On 6/14/06 1:19 PM, "Y2kBugxp90" wrote:

Although I myself am not the type to recomplie Darwin, I most certainly sympathize with those who want to do something new with it. Your article hits the nail on the head, and exposes the commercialization of Apple's formerly liberal policies. Hopefully Google will continue to support open source, too.


Nifty, eh? OK, maybe not a big deal, but I've always wanted to make some sort of public stand for open source. If you're wondering, my letter was in response to this article.

Dangit, TIGER!

Why do they have to make such perfect toys? Not only did they craft the unforgettably addicting Bop-It, but their Lazer Tag game is the best there is. Er, it might be the only one there is, but it's still damn cool. I borrowed the Deluxe 2-Player Set from my 10-year-old cousin, and I'm hooked. The two 'taggers' each use a plastic dome on their tops, packed with infrared sensors and LEDs, to braodcast its position and detect hits, and one more sensor inside the gun's barrel to detect a 'lock-on.' Pre-programmed on the tagger units are such unique game modes as Save the King, Hide and Seek, and Own the Zone, which are more interesting than the names suggest. The set also comes with two pairs of HUD sunglasses, with status lights for lock-on, successful shots, and received hits. They also block 99.9% of UVA/UVB radiation.

Hmm, that sounded a little like a proprietary product review. I just can't help but be excited that I've found the only "FPS" that I can really get into. I'll have to get a set of my own pretty soon.

UPDATE: Tiger Electronics also makes tagger pistols that can be used in tandem, and a bazooka-like tagger called the Master Blaster, which shoots a Nerf-like foam missile that senses impact and sends tag signals to all players near the "blast". This game's crazy, like water guns with advanced scoring and no water.

28.6.06

Funtime CS lab.

The week, we wrote an infix-to-postfix expression translator. Not terribly easy, but very fun. The purpose of the translator is to provide an easy way to evaluate infix expressions, since to read postfix (RPN) is a much simpler task for a machine. The translator does its business by simply letting any operands pass through, but holding operators in a stack until a same- or lower-precedence operator is encountered. Here's an example: The expression "2 - 4 + 5 ^ 3 ^ 2" would first be tokenized into numbers and operators: {2, MINUS, 4, PLUS, 5, POWER, 3, POWER, 2}. The first token is a 2. It's a number, so it isn't touched; it becomes the first token of the result string. Then MINUS, since it's an operator, is pushed onto the stack. The 4 is passed through, making "2 4", then PLUS comes up. MINUS, the top of the operator stack, has the same precedence as PLUS, so we can pop it, giving us "2 4 -". The PLUS is pushed onto the stack, and the 5 after it makes "2 4 - 5". POWER is a higher operation than PLUS, though, so we just push it on top of PLUS. POWER, must be treated differently than PLUS or MINUS, because exponents evaluate from right to left, so we can't pop the first POWER before pushing the second. Finally, after the last token, 2, the string is "2 4 - 5 3 2", and the stack is {PLUS, POWER, POWER}, but now we've reached the end of the token list, so we need to pop the rest of the operators. This leaves us with "2 4 - 5 3 2 ^ ^ +", which is the proper postfix equivalent of the given expression "2 - 4 + 5 ^ 3 ^ 2", and it evaluates to 1953123. I didn't cover parentheses in that example, but they are relatively easy (although I had quite a time getting them to work): if you come across a closing parenthesis, pop operators until you find the opening one.

I hope that was a good refresher for those unfamiliar with RPN or stacks. Otherwise, learn to use an HP caluclator.

Strechy-pants DS case (Phat edition!)

Yes, I ripped off John Spain's idea. However, in doing so, I've taken a very different perspective on its construction. I'll have to start from the beginning:

My sister has a yoga-pants fetish. She attends yoga classes weekly and excercises nearly daliy, but in order to maintain this ritual, she requires a constant supply of yoga pants. These are typically slightly loose and infused with spandex, and at the last count, she had over 10 pair. During a recent clothes-shopping trip, she spotted a pair of yoga shorts that she immediately insisted that she needed. I persuaded her that, instead of paying $18 for yoga pants that were shorter than those that she had purchased earlier for around $3 each, she should cut the legs off of one of her many pairs. This plan was a success, and I was left with the pant legs. Having seen John Spain's brilliant idea, I proceeded to design a (stretchy) DS pants case of my own. This is with what I came up on Monday:



Yes, I went overboard. I ususally do with design papers and blueprints and such. It should be readable enough; it's hard to write with a broken pencil lead. Anyway, as you can see, it requires sewing, unlike Spain's. I was lucky enough to have a little experience in the field, and besides, the pant leg wasn't large enough for me to try out my fancy origami skills.

The next day, I happened to find enough free time to make it, so hereforthwith, I present a photographic record of its creation. (Hi-res pics here.)


This is the pant leg, trimmed up and ready to go:



And now, to hem the bottom edge:



I really, really suck at hemming.



First stitch: not so bad. My s3\/\/1n(_+ 5|<111z were coming back.

I had room, so I added one more pocket than my blueprint specified:



2 (stitches) + 2 (slanted cuts) = 3 (sad pockets).

At this point, though, the pockets sagged terribly when loaded:



I thought sewing down the sides might help. It didn't do much, though:



Oh well. The final product still looks pretty dang sweet:



OK, it's not really the final product; it still needs Velcro. I'll get to it soon.

26.6.06

bunnyhero, to the rescue! (originally posted 5.6.06)

The guy behind all of those cheesy adopt-a-pets seen on MySpace profiles in fact seems somewhat smart. His website, bunnyherolabs.com, in addition to housing the animales digitales, contains such wonderous gimmicks as a 'monster attack' DHTML script, allowing you to enhance any webpage with Godzilla, tanks and jets. For example, if you don't like what I say in my blog, you could attack it. Among other playthings bunnyhero (a.k.a. Wayne Lee) has created, there is a fortune cookie image maker, an animated eCard system, a bunny-versus-demons flash game, and a graphical tagboard. Many of these small interactive web projects appear half-finished, but with good potential. Hopefully bunnyhero labs will be more fleshed-out in a few months.

Stunning video (originally posted 26.5.06)

You should have seen this already, but if you are unfortunate enough not to have been introduced to it, it's at this place. At the time of posting, the video is unavailable, but the link might work later. Otherwise, just google 'pythagoras switch'.

EDIT: I found one that works. This one is unedited, so you may want to skip the anime intro and the bit of cheesy dancing near the midpoint.

OK, first post. (originally posted 25.5.06)

Time for me to start this rusty engine. Expect talk of Nintendo and my pro66ies.

We'll start with the proggie side: I'm taking CS 2020 for the summer, so I'm getting lots of exposure to Java. It's a cool language, as far as syntax and portability are concerned, but it's just so dang SLOW! It's interesting that a course teaching algorithm efficiency should use such a bogged-down language. It takes more time to start the VM than to perform a quicksort. Until today the course has just been review of 2010, so the first two projects were about simple OOP concepts, but I've had to fish my brain for the trig I learned three years ago, in order to draw regular pentagons.

In other news, E3 has come and gone, but the Wii has got me psyched. I already have a DS and simply adore Metroid Prime Hunters and Tetris DS, but I can't wait for Red Steel and Twilight Princess. That's not to mention the fact that all of the best NES and SNES games will be available for download. I've never finished a single Square game, on any platform—they were always constrained to short sessions at friends' houses—so you can imagine that I'm itching to play Chrono Trigger again.

LATER EDIT: OK, well I've beaten FF Tactics Advance. I haven't finished it, per se; I've only completed around 175 of the 300 missions.

Yay, blogger doesn't suck.

All right. New blog. My last one here at blogspot didn't go so well, since—well, let's just not go there. Since this is actually a move from my previous blog on (shudder) MySpace, the next three posts are the junk I had there. Enjoy!