The Animal Farm

September 24th, 2006

Never Sleep

I can’t go to bed anymore. Because I’ll dream.

I went to bed at around 5 AM last night, and everything went swimmingly. It was a cozy time; a peaceful time. I woke up at 8:30 and we all know that wasn’t going to fly. So I went back to bed. And things got real.

I woke up at around noon with full recollection of approximately eight dreams which all terrified me. There was drama. All manner of drama. People were in tears. There was death - Ricky’s, specifically - in a nasty car acident. There was conflict at an anime convention/tech show. There were cell-phone calls and all manner of weirdness that I’m now a little fuzzy on. On the final dream, I realized I was dreaming and tried to wake up, and it literally felt like I had to fight with some unseen force to pry my eyes open. When I finally entered the real world, I was shaking subtley and didn’t want to close my eyes again.

I got up for a bit and recounted the experience to Ricky, retelling two of the dreams I could recall and vowing never to sleep again.

Yea, then I went back to sleep.

And then there were zombies and explosions and sniper rifles and terror left and right. And I’m so scared. And I’m never sleeping again.

I’m so scared.

September 23rd, 2006

Agreed

I would simply like to say that I agree with your post. It is truely annoying when someone posts an opinion on the internets and then gets angry/defensive when someone disagrees and posts their opinions why. I really think the Orly? bird is the best way to respond to someone who can’t take a criticism and feels they have to whine about how it is their opinion and is therefore fine and legitimate. The freaking bird says, “Wah wah wah, stfu, nub.” It completely makes the whiner feel like an idiot AND it leaves them with one response that won’t further make them look like a fool, to simply bow out of the disagreement. Now I think the Orly? bird can be overused, such as when someone posts a legitimate discussion and not just a whine, but I digress.

Speaking of the Orly? bird, I finally get to go to Zul’Gurub with my new machine. Wootsauce, my friends, wootsauce.

~Zach

P.S. Brian, if 3 stories of nothing but slot-machines and free coke is “a few slot machines under the race track, ” you are correct about the Charlestown Casino.

Its the bee’s knees.

September 23rd, 2006

NoNo, It’s Cool Z

No conflict intended, Zach. I knew what you were getting at, I just thought there were some discrepancies that needed clarification.

I should note that for the duration of this post, I am not in any way addressing you. I am shifting gears entirely.

I’ve become extremely weary lately of two classifications of people: those who are incapable of handling criticism and those that feel that qualifying statements with ‘that’s just my opinion’ can get them out of being scrutinized. Regarding the first: I would like to think that when you post something into public space that you are prepared when people dole out the harshness. Especially when you are posting somewhere designed to illicit criticism. I find too often that people are expecting their ‘criticisms’ to contain exuberant praise and then gloss over the flaws, ending with a reassuring, “this is the best thing since electricity.” Which is, of course, wildly unhelpful no matter how comforting it is. When this response isn’t received, the criticized person immediately gets defensive and attacks the legitimacy of the points, without considering that the criticisms might be perfectly valid. The whole purpose of posting the work has been defeated.

Regarding the second: I’ve talked about this before. “That’s just my opinion” is a cop-out. It’s a convenient way to evade meaningful discussion. In truth, opinions can be right and wrong. Certainly the Nazis had some pretty strong opinions, and certainly those opinions were utter garbage. An extreme example, of course, but it illustrates the point - thoughts are not inherently valid simply because they’re thoughts. Scrutiny can reveal flaws in thought processes and logic, and trying to instantly legitimize your viewpoint with “that’s just my opinion” is stupid.

Dolphins are… weird.

September 22nd, 2006

Oh, Those Crazy Tiles

I take issue with Zach’s introduction to tile maps. We have never been required to break up the world into chunks because of some ‘discrete’ nature of machinery. The reason for using a tile-based mechanism has always been the product of limitations either on the memory end or on the asset creation end. Historically, it was hard to contain a huge amount of graphical information within system memory, and thus breaking the scene up into chunks which could then be repeatedly used was good practice. Further, the content required to create a large, completely non-repetitive world is gigantic - more than most artists could manage even before games were approaching photorealism. Thus, having a bunch of well-crafted tiles that you could use repeatedly helped a lot. Tiling certainly isn’t a requirement by any means (which I guess is what Zach meant when he said, “This is only one solution to the problem, there are many…,” but that sentence was not very clear to me).

Historically, tile-based methods were the standard. Consoles were built with special hardware to facilitate loading tiles and tile maps. This stopped with the SNES (although it was implemented in the SNES’s handheld brethren, the GBA, and perhaps even the DS though I have no concrete information on that). Since then, tiling has taken a back seat in importance. It’s still used, of course - especially on the handhelds where many of the historic limitations are still in place. But other methods, such as representing the world as a series of 3D objects or using fully pre-rendered images, have taken priority. Traces of tiling can still be found in the 3D realm where artists might repeat textures over a terrain to ease some of the workload, but even that is rapidly coming to an end (and Carmack seems to be snuffing it out faster with his MegaTexture technology).

Of course, I picked the most long-winded way of disagreeing with Zach’s first paragraph. But he is right about collision detection causing headaches. Testing collision against tiles seems really easy when you first approach it, but she’ll trick you. It’s a beast with a bunch of ‘gotchas,’ and if you’re not approaching the problem carefully, you’ll either end up with poorly behaved code or a giant mess of hard to maintain conditionals. You get better at writing the code, but it’s never something you look forward to. Of course, to be fair, it is a lot more intuitive than testing collision against arbitrary 3D meshes. Don’t even get me started.

Don’t test me when I’m crazy off that airplane glue.

September 22nd, 2006

Actually, you’re right

When I was originally typing my previous post I thought that sounded wrong, hence the “many more” clause I added to it. I know that tiles were a good solution for the hardware limitations of the time. So yeah, I agree with you. Actually, I don’t know why I posted that. I guess technically it is impossible for our current machinery to be continuous, but that really doesn’t matter with sampling rates and the like.

The real reason I am posting is because 0.99999…( repeating ) = 1.
1/3 + 2/3 = 1 => 0.3333….. + 0.6666… = 0.9999…. Just a different representation. Neat huh?

~Zach

P.S. If you were posting to argue with me to get another post-war on this site, I apologize.

September 21st, 2006

Tile-Based Collision and the headaches it has caused me.

First off I think this topic deserves a bit of a briefing. The physical world is continuous. This is hard to represent in a computer because a computer is a discrete machine. So what we have to do to model the world is break it up into N by N chunks and call each chunk a tile. This is only one solution to the problem, there are many more sophisticated solutions. If you ever look at old Nintendo games you can actually point out where one tile begins and another ends.

If you are simply using 2 dimensions, this tiling is fairly straightfoward and easy to accomplish. However, I decided to create a video game from a pseudo-isometric perspective. Isometric is simply 2D only rotated a bit to create a 3D look that ignores perspective. So now I have the added dimension of height. What this essentially means is that each Tile can have one or more “levels” associated with it. Take a 10 story building for example. A Length by Width chunk with Length = Width = 2 feet could potentially have 10 levels. So if my character wants to walk on that Tile, I first need to see if there is a Level he can walk on, ie he can’t walk from a height of 2 feet to a height of 15 feet( that would be a wall ). I originally said my game would have up to height 5. This originally meant that I could have 9 possible Tile-heights( or Y Intercepts ) going from 1 to 1.5( stairs ) to 2 to 2.5 etc.

Now the big problem. This meant that if the user hit up on the keyboard, I would have to get the position after the move, and check to see if where he was standing was a legal spot to stand. A legal spot can be defined as: a Tile that is walkable( grass or dirt is able to be walked on, but water or a Tile with a tree would not be ) and a Tile with a level close enough to allow realistic height-movement( I can walk up a slope or stairs from height 1 foot to height 10 feet, but I can’t just teleport from 1 foot to 10 feet in one step ).

My original solution to this problem was absolutely terrible and still took me several sleepness nights in a row to come up with. It went like this:
You have the tile you are standing on. That tile has a level property associated with it. For every level property there is a list of allowed levels you can go to. So a level 2 tile can go to a [ level 1.5 tile or a level 2.5 tile ]. This got a bit more complicated when I added sloping in all 4 directions. That is if you are moving left on this tile and it is sloping up leftwards, your height value will increase but if you are moving right it will decrease. This also changed a few things when it came to the possible tiles you could move to as well. So when you tried to move, it got the tile you were on and compared it to the tile you will be on. If the tile you will be on has a property that is in the list of allowed properties, you can move, else you can’t. This worked all fine and dandy but it had several cases depending on which direction you were moving in and each case had almost identical code save a few variable values. It was horrid. Add to this this problem that since you now have a length, height, and width and your movement speed most likely isn’t equal to one tile at a time, and you now have to worry about checking against two tiles instead of one. IE if you are walking in the real world and the left-half of you is going to bump into a wall, you can’t just keep moving, you have to move right a little more first.

My second algorithm was a little cleaner, but still had the problem that each direction had its own case since walking on an up leftward sloping tile could have one of three results: y increase, y decrease, y stays the same. This algorithm just got the tile you are standing on now and got the tile(s) you would be standing on if you moved, took the absolute value of the difference in their y intercepts and if it was less than one, you could move to it. In the case of different y intercepts for each tile you would be moving to, the higher one was given precidence. So this was a bit cleaner to read and to type as well, but still had the problem of one case for each direction, with only a few things changing.

Now my current algorithm that I use. I have overhauled this code( all of it ) a grand total of 3 times. This last one was the biggest change since I A) Moved from Actionscript to C++ with OpenGL and B) Know a helluva lot more about vector-math and coding in general. The vector math really kicks in for this algorithm because instead of storing the direction the character is moving in a string, ie dir = “Right”, I instead store the direction as a vector, ie dir = { 0, 0, 1 }. Given that any tile will have two slopes, ( change of y ) / ( change of x ) and ( change of y ) / ( change of z ) and the direction, I can now ignore direction-dependent code. Instead of saying:
if ( dir = “right” and slope = “right” ) y = y + character.speed * 0.5 - assuming( like I did ) all tiles have a slope of 0.5
else if ( dir = “right” and slope = “left” ) y = y - character.speed * 0.5
else if ( dir = “right” and slope “left” and slope “right” ) y = y
I can say:
y = character.direction.x * tile.level.slopeXY * character.speed + character.direction.z * tile.level.slopeZY * character.speed + tile.y_intercept

It might be a little hard to read, but all it is saying is y = (mx)x + (mz)z + b. Where x = character.speed * character.direction.x( where the character will be after the move ) and z = character.speed * character.direction.z. With this solution I never have to specify which direction because if I am moving up or down, my direction.z will be 0. Also if the tile does not slope in either direction, the equation will just be y = tile.y_intercept. This makes for a much shorter piece of code. I know there are still better ways to do this, but I was pretty happy with this solution. The ironic thing is that with my first two ideas, I spent hours upon hours coding them until they worked. With this solution that I use now, the concept just fell into place because of how I set up my movement structure and tile structure. Good planning definately helps in the long run.

~Zach

Thou shall not kurr-steal.

September 15th, 2006

The Duelist Goes Gold

At long last, it is finished. The game plays best with a RedOctane dance pad, but there are keyboard mappings for those without. I included two different post-mortems on my other blog for your reading pleasure.

I hope you enjoy.

Gxasddf: What?! A locked door!! That’s unheard of! I was expecting to walk in and start smashing pots and taking stuff.
Alex: What kind of world do we live in when people can’t trust each other enough to make their homes welcome. It’s a shame. A real shame.

September 13th, 2006

Time for a RANT!

I’ve seen this commercial a few times on tv lately, and each time I’ve been more and more annoyed. So let’s rant about it!

The commercial is for Nike and it is about a football player in high school. It shows the entire team in class in their team-jerseys listening( or not listening ) to the professor lecture about Napolean. He asks the questions, “Can anyone tell me what happened to Napolean when he invaded Russia?.” There is a pause and the professor then says, “Brian, do you know?” It shows Brian looking clueless and then it switches to a scene of Brian walking down the hall when a cute girls says “Hi, Brian.” Basically to emphisize that he is popular. It then cuts to the game( presumably that night ) where Brian’s team is losing by one touchdown. The team does a passing play where Brian is the receiver. He catches the ball and scores the winning touchdown. It shows the crowd going nuts with his parents screaming, “That’s my boy!” The team does the standard, pick-up-the-star-of-the-game routine. It then fades in the text, “Football is Everything,” or something to the effect.

I doubt I have to explain how terrible of a commercial this is. Let’s see… who cares if you are a freaking retard, if you can ball you’re good! It really makes me seriously sick to think about this, as well as what went through the writer’s heads when they decided on this idea. I guess I don’t really have much to rant about. I can’t possibly say anything worse than the commercial says for itself.

~Zach

P.S. Brian, get that freaking-game done. Your teasers at the end of each post are brilliant!

September 13th, 2006

Rainy Day

Fate has seen appropriate to lock me in the Moose by way of rain, which to my mind is unfortunate because I’m bored to death. I’ve tried doing legitimate work on The Duelist, but I’m just not feeling it right now. Over the course of the week I’ve added some more content and tweeked the code a bit so that I’m comfortable with the AI. The only things left to do are add Drew as one of the characters, change the font (it’s hideous), strum some music to put in, and clean up some of the graphics. I’ll probably finish all that tonight and then do some last testing before I submit it tomorrow. I have no clue how I fare in comparison to the rest of the competition - only two entries have been submitted thus far, and I haven’t tried either. I’m not 100% satisfied with the quality of my entry - it seems a lot smaller than I originally expected - but overall I think I’ve got a strong game.

Classes are going abysmally. Even though all of the topics are things I’m thoroughly interested in, the professors have each found unique ways to suck the life right out of them. I genuinely could not be more dissatisfied, and I can only see that getting worse.

On the other hand, I’m loving being a TA. Preparing problems, running the lab section, teaching - it’s all been good fun. I have a bit easier than most, having only one lab with a handful of students, but I would actually prefer the larger labs; although grading is a pain, it’s still more interesting.

Classes, TA-ing, and game development have been pretty much the consuming forces in my life right now. There are few random things here and there, but not a whole lot of variety. I’m not complaining - it happens, and it’s fine, and I’ll soon have some interesting things to show off. It does, however, leave me with only a handful of things to talk about, so if you’re not interested in the above, you may find the site somewhat slow for a while. Just a warning.

Enora: I feel like I don’t belong in this world. Like I’m one of those 3d pop-ups in those flat pop-up books, only my added dimension is one of pain and sorry.
Gxasddf: That’s the stupidest thing I’ve heard all week.
Gabriel: You missed out. While you were gone, there was a conversation concerning pandas and the existential futility of life.
Edwin: OMFG THAT’S SO POETIC!

September 11th, 2006

Zach’s Opinion

I definately enjoyed watching Xenosaga 3 with Brian this weekend. I liked the game, I really did. I just feel that it could have taken a better turn towards the end than it did. What ending exactly I don’t know, just a different one. I won’t go into detail about the storyline because A) I wouldn’t want to ruin it for everyone and B) I am still a little lost about some things, they may not be key but I was fixated on learning them since Xenosaga I. I will say that, though the enovironments were big and pretty, they were mostly full of empty space and easy, annoying puzzles. Actually, the environments kind of reminded me of Star Ocean: Till the End of Time’s environments. At least this game didn’t have random “flash” battles and instead had a limited number of enemies per screen, that was nice. If the game had its big environments full of flash battles, I wouldn’t have stayed around long. Xenosaga 3 definately isn’t one of my favorite games, but I definately had a good weekend with it.

Speaking of this weekend, if you don’t know the procedure, Brian and I essentially stay up late, sleep in long, and eat horribly for the entire weekend we play a Xenosaga. I’ve noticed this weekend however, especially now, that my body just can’t seem to recover as well as it used to. It isn’t that I am in any worse shape than I was 4 years ago with the release of Xenosaga 1, I am still pretty much the same. I guess things change in 4 years.

To those who care, I am still having a hard time getting back into programming, but it is getting better.

~Zach

I don’t care if you are holding a newborn, when Ricky puts it out there, you drop the baby and give him the High-Five.