The Animal Farm

May 28th, 2006

Stupid Site

I wrote an update last night - a big, bold, beautiful update. I saved it and looked at the site to notice it wasn’t showing up. I then looked back at the HTML for the site and saw that my update wasn’t there. I realized it was lost. Forever. And then I died on the inside. Again. It’s like the fifty-hundredth time I’ve died on the inside. That’s sixty seven times more than the number of times I’ve made up imaginary numbers.

I had an X-Men 3 review up, but I think Hampton of Rob and Elliot summarized it best: “It was good. Keep in mind though that the last two were awesome.” That pretty much says everything and prevents me from having to rethink/retype what I had. I also had a lovely explanation of why I will not be pursuing a Ph.D., but I couldn’t find any quotes to conveniently rip off of a website and save myself effort. So you’ll just have to live without. I know you’ve been waiting for an explanation for years now, and I’m sorry.

Mel swung by the apartment yesterday to talk about game related stuff. I wrote down 1/3rd a page worth of notes, and then we just had random conversations for probably something like two hours. It was cool, and we thought of funny stuff to toss into Parodica. The phrase, “five cats put together” got twisted in a very, very disturbed way. One of the things I find very funny is to rip statements completely out of context even though I have the context right there in front me, and then I warp that phrase to suit my own desires. Also, I’m now of the belief that Social Security Number should be in every RPG stat screen - the government has to keep track of these heroes somehow. Anyhow, yes, good fun was had by all. Except for that moment where I may or may not have offended her, for which I am profusely apologetic.

Speaking of offending people, I am to have words with the management of the Blue Moose. Apparently they have seen fit to charge a $5 cover for a show tonight, which hindered my plan of going in for coffee and nervously gazing at the (super cute) barrista from afar. I even took my game design notebook to get productive work done (read: have an excuse to gaze at super cute barrista longer). Would $5 have been worth it? Possibly, but I didn’t have enough money on me. What’s more, the band that was playing didn’t seem worth the money from the short glimpse I got. On the other hand, the jazz band playing last night (the -FREE- jazz band) was pretty awesome. The woman playing the flute rocked out in a big way. I wish I knew their name so I could recommend them.

I don’t understand why more girls don’t like gamer guys.

May 22nd, 2006

Guitar Hero

Cowboys from Hell: You have been defeated. Bark at the Moon: Watch it. You’re next.

Space partitioning can bite me. I realized there was a huge flaw in my BSP Tree implementation that I couldn’t figure out a decent way to fix. I then moved to implementing an Octree, which although easier to implement, did not provide me with any significant performance gains. By now thoroughly frustrated, I started looking through both algorithms trying to find out why they were performing so miserably. I enlisted the help of my programmer friend Jeff who could not see anything wrong with the code. After some vague hackery, I got the BSP Tree working well for certain types of scenes (the kinds we’re using in our game), but for other types it behaves bad. So bad.

Satisfied with the fix, Ricky and I started talking about endianness issues. Under certain architectures, multibyte numbers are stored with the lower order byte at the lower memory address (little endian). Under others, the higher order byte is at the lower memory address (big endian). If you’re reading a binary file which has a certain endianness into an environment that has the other endianness, you essentially have to go through and swap bytes yourself. We are working on an MD3 loader (Quake 3 model format), which is little endian. Windows also happens to be little endian. No problems there. But Ricky insists the engine be portable to a (pre-Intel) Mac. Which is big endian. Of course. I’ve come up with a solution which I think works, and that is to essentially to wrap up the fstream into a class called BinaryFileReader, and swap bytes as it’s doing the reading if necessary. It destroys the elegance of being able to read character buffers from files straight into structures, but it’s a better alternative than anything else I could think of.

Programming just hasn’t been fun lately.


May 19th, 2006

General Geekery

There has been lots of programming going on lately, and updates are in order. Ricky and I ported over my framework to OS X. What should have been a smooth, painless procedure due to the use of open, freely available, supposedly portable libraries was nothing of the sort. Initially, there were errors with my templated SmartPtr class. Every compiler seems to add subtle nuances to templates which break on every other compiler. We were forced to make a very unsafe modification to the class (essentially moving something out of the protected section) to get things working. Next there was a problem with glaux not being supported on the Mac. After fighting for some time, we decided to switch over to SDL and utilize some of the image loading libraries provided on that end. Of course, SDL’s primary image loading library decided to load images upside down, and the initial solution to that worked fine under Windows and crashed on OS X. I managed to weasel around that with some hackery, but the solution is nothing I’m particularly proud of. Then there were path differences on the Mac, which we resolved by adding a general ‘common.h’ file which included everything in a different fashion for each different OS. Finally, there were some OS dependent functions (specifically GetTickCount) which needed to be replaced with the portable versions, which was admittedly my fault.

Today I spent the entire day implementing a BSP Tree. For those unfamiliar with a BSP Tree, it is essentially a binary tree which partitions space based on arbitrarily oriented ’splitting planes’ where geometry on the left of the plane goes to one child and geometry to the right of the plane goes to the other (there are multiple ways to handle geometry which spans a plane). It is an extension of the kd-Tree, the primary difference being the arbitrary orientation of the splitting plane. BSP Trees were how Doom and many older FPS’s handled rendering, but now they’re primarily used for collision detection with meshes.
I would’ve liked 3D Game Engine Programming by my side, but unfortunately it was at the lab. I worked with articles I had printed out, and I’m lucky I printed them out since our internet went down at around 3 o’clock. Lack of internet access slowed me down (and was a big headache when the only reference I had for ray-triangle intersection was wrong). I overcame with a sub-optimal solution which does not partition the space as well as I would like. I’m going to reference the book tomorrow to see how I can improve this.

I’ll love you tomorrow.

May 15th, 2006

All Hail

I haven’t given this book enough of a read-through, but it’s already earned both my respect and slight distaste. I’ll start with the distaste: it’s about time people used variable names that make sense. When a function takes float *t, I know absolutely nothing about what t is supposed to represent. I could’ve saved a lot of time reading through sections if the variable was named something descriptive. The book’s major merit is that it just helped me solve a problem I’ve been pining over for the last 3 days - collision detection with an arbitrary mesh (likely using a BSP Tree). I’m not entirely comfortable with how the BSP Tree structure was designed in the book, but that’s a matter of taste - I can now apply the concepts to solve my problem. When I get some time, I’d like to give this book a more thorough reading.

Oh Carmack, you clever dog you.

May 15th, 2006

First week complete. Status: Alive

I have just completed my first week in my own apartment, and I’m loving every minute. Ricky and I typically spend our evenings playing video games and discussing geeky things. We have acquired X-Men Legends II and Ultimate Spider-Man, which I will talk about in a minute. We’ve had Guitar Hero jam fests. I’ve been practicing with a real guitar, and I’m sucking something awful. Spent a lot of time in the Blue Moose drinking coffee and having deep, introspective conversations. If you equate ‘deep, introspective conversations’ to discussing Agile programming and the general attractiveness of the ladies working in the shop.

X-Men Legends II is decent. I won’t say great, but it’s solid fun. It’s essentially a multiplayer brawler with some RPG elements tossed in. We just completed Act I, and the game has been running smoothly. Ultimate Spider-Man, on the other hand, is amazing. I only watched Ricky play, and I was entertained completely. You basically web-sling around (a real treat) completing missions and helping random citizens. Then you switch off to play as Venom, where you murder relentlessly. The fight between Venom and Wolverine was stellar. The fight between Venom and some fifty soldiers was awe inspiring. The fight between Spider-Man and Rhino was wild. It’s just… a very good game.

Apparently Dee is coming to Morgantown today, so I’m going to go try and contact her. Woot.

Rush to the store.

May 13th, 2006


James said it best:

E3 is like Christmas!!!

I freaking love reading about the new games and watching all the new trailers! It is seriously like the geek-Christmas. The only thing better than reading all the E3 news is getting all the new games that come out the months after. Zelda for the Wii, Zelda for the DS, the DS lite, the list goes on and on and on.


May 11th, 2006

Super Smash Brothers Brawl

The Metaknight and Solid Snake will be in Super Smash Brothers Brawl! As much as I’ve criticized the Nintendo Wii, it has now become the system of choice.


May 10th, 2006

Smart Pointers

Any good software developer knows the importance of proper memory management. A poorly written program can introduce a memory leak that can bring the entire system down if left unchecked. Unfortunately, as programs become increasingly complex, memory leaks become less obvious to see and even more difficult to eliminate. Some sort of system needs to be in place to ensure that a memory leak does not occur. COM has a basic reference counting mechanism which requires the developer to call AddRef and Release whenever a reference to dynamic memory is made. Requiring the developer to call AddRef and Release is not just irritating, though. It’s asking for errors. A single misplaced call to either function can cause system failure which can be just as hard to track as a normal memory leak. Assuming we are not considering other memory management schemes, another system must be implemented to aid the reference counting mechanism - preferably doing the reference counting automatically. Enter the Smart Pointer.

A smart pointer (or SmartPtr) is a templated class which essentially encapsulates the reference counting in such a way that the user does not have to worry about it. Simply say SmartPtr p = new DataType(…) and your dynamic memory will automatically be memory managed. If other SmartPtr’s are looking at p (SmartPtr i = p) and p goes out of scope, the memory will still be kept around until i is destroyed, thus ensuring that you’re never accessing invalid memory. If you want to force p’s memory to be cleaned up (assuming that it is the only one pointing to a specific memory location), you can say p = NULL and the SmartPtr will deallocate the memory, thus ensuring no leaks. It’s quite an elegant solution to a nasty problem.

The SmartPtr is not without its own limitations, though. Circular references can be troublesome, since these have the possibility of getting unchained but still lingering as a memory leak. Further, the templated nature of the SmartPtr can make handling of some inheritance situations tricky. For instance, consider the case where B inherits from A. If a function takes SmartPtr[A], it will not take SmartPtr[B]. This was the problem I encountered last night before I thought up a simple workaround this morning. My initial impulse was to say SmartPtr[B] b = new B() and then try passing that to a function which required SmartPtr[A], but that clearly doesn’t work. Instead, we can say SmartPtr[A] b = new B() and pass that instead. Finally, intertwining naked pointers and smart pointers can lead to some nasty errors. If you set a smart pointer to look at a naked pointer and the smart pointer goes out of scope, the memory will be deleted even though the naked pointer still thinks it’s looking at a valid memory location. The only way to avoid this is to be careful - never a good statement to say in Computer Science, but there is no other alternative (that I know of) in this instance.

I’m really liking the SmartPtr, and I thought I should tell everyone about it.

Girls don’t want to talk to me? Why?

May 9th, 2006

Best Laid Plans

The plan was to regail you with a download of Project Geo, which was just recently finished. The plan, however, did not include Project Geo being buggy, ill-prepared rubbish. I was severely disappointed when I saw the final version, which crashed, had myriad sound problems, and was visually revolting in many scenes. There are screens which have text squished together. There’s a boss that you have about a 2% chance of defeating with full upgrades. There are weapon upgrades that make difficulty nonexistant. I won’t be showing you the game. I will be hiding it away in shame. Play Avast or Penguin Push instead.

I guess it’s time I brought out the review ruckus, since I’ve completed watching Gungrave and Samurai 7. I’ve also played Shadowgrounds and Marvel Nemesis. I have a lot of work to do. We’ll do this in order.

Gungrave had a strong appeal, being created by the same man responsible for Trigun. It follows the life of Brandon Heat and Harry, two childhood friends who grow to become top-players in an organized crime syndicate known as Millenion. I won’t spoil things for you, but eventually the relationship goes south, and Brandon gets turned into Grave. The series starts off with an introduction to Grave and his unique fighting abilities, and the this introduction is pretty stellar. Unfortunately, the series never quite lives up to the first episode. The following 15 episodes detail how Brandon and Harry rise to the top of the syndicate until the inevitable betrayal that leads to Brandon’s transformation. These episodes are largely dull. Although there is plenty of action, there’s never really a lot of connection to the characters. The dialog is unengaging and the relationships don’t present anything gripping. At around episode 14, things pick up when you discover the true extent of Harry’s ambition, but by then a lot of the appeal is lost. When I was finally brought back to see Grave, I was just trying to finish more out of a feeling of sheer duty than out of a true compulsion to see how the story ends.

Samurai 7 is somewhat better. The story of Samurai 7 is much simpler and filled with fewer twists - a village highers seven samurai to defend themselves against bandits. There’s really no attempt to make a point or inspire intrigue. There is just a pure tale of heroism and war. There are some interesting characters here which liven up the storyline, and the action is always pretty wild.

Shadowgrounds is a demo I saw on Steam and tried based on sheer curiosity. I’m pretty glad I did. What we have here is a combination of Smash TV (control-wise) and Doom 3 (mood-wise). I only played two levels, but I was thoroughly satisfied with both. It supports multiplayer co-op, so I’m really thinking about picking it up when it comes out and then playing it with some friends.

Marvel Nemesis is a compelling game which could use a bit of work. The general mechanic is this: place your favorite Marvel characters in a battleground and let them dual it out. Ricky and I played Versus, which was fun for a while. I used Spider-Man to toss him around the level and he used Wolverine to cut me up, and we had an interesting time. What the game lacks is depth: there are only a handful of moves/maneuvers available to each character. Further, it could really stand for 4-player support. Were those two areas improved upon, I could see it being a fun brawler akin to Smash. The way it is now, though, it’s merely mediocre. Ricky says X-Men legends is pretty good, so I’m hoping he steals it from a friend soon so that we can play.

I’m living in my apartment full-time now, and the place is nice. Having my own room feels relaxed and natural. I enjoy Ricky’s company. I’m absolutely terrified of when Whitney comes in, because Ricky and I are the two biggest geeks in the world. But I like her, and I’m expecting it to go well.

Let’s not enter the Real World.

May 1st, 2006

Deep Thoughts. PSYCHE.

I just saw an advertisement for Apple that said ‘orders over $50 ship free.’ I find this extremely humorous, since anyone familiar with Macs knows that a single order of practically anything will catapault you into the gagillion-dollar range. They’re basically just saying, “Yea, we give up on shipping fees.”

I now have both an apartment and a car in Morgantown, both of which are going to help me pick up chicks. This runs counter to getting a Master’s in Computer Science, which will ensure that no women ever speak to me again. I’d like to believe that my dual-color 1992 Ford Tempo is going to be a babe magnet, but I really don’t think I can salvage any sexiness after dual-booting a computer, dancing on a mat to J-Pop or fiddling with a plastic toy guitar. On the rad side, though, the camera shop that I live above has a Mario clock.

I’ve been starting to learn (proper) guitar and having all manner of trouble. At first my fingers hurt quite a lot, but that’s sort of dying down. Now I’m having trouble hitting the frets properly so that they sound good and don’t interfere with other frets. As a result, my C and D chords are really suffering. I’ll keep working toward it, and perhaps I’ll get some help from my brand new roommate.

Gnarly, dude.