Wednesday, January 16, 2008

fun with binary space partitions!


I recently added the use of BSPs(binary space partitions) for my game engine. In this demo I use BSPs for collision detection with the ground. I added functionality that automatically creates a BSP for any walk mask inputted. The BSP is used to speed up the collision detection process. Without the use of a BSP my computer could only handle about 100 entities colliding with the world and when using the BSP it can handle over 10000 with the same amount of cpu use.

This demo is called Hover Survive, something simple I made to easily test new functionality for the game engine. In this demo you can test how much your cpu can handle. You can press the zero key to increase the number of entities. Before the lines were models of mines that were 170 vertices each. I changed it to lines so that the demo could be a test of the bsp itself, it would slow down a lot sooner if your computer had to render that many vertices.

The demo starts with you controlling the hover car, if you want to just stress test your computer just run into one of the mines. Once dead you can move the camera anywhere you want. "w,s,a,d" controls the camera, you can mouse look and "y,h" moves up and down the Z axis.

The download includes a windows and linux executable. The program was written in C with the OpenGL and SDL APIs. Again, I don't currently have access to a mac so I am unable to compile a mac version.

Download

Tuesday, January 15, 2008

3d game engine tech demo


Last summer I decided it was time to move on from 2D games and started to work on a 3D game engine. "Ant Wars in Space" was a demo to show off the engine I created. It can hardly be considered a game. The demo consists of an endless battle between the red and black armies. As soon as one ship is destroyed, another takes it's place.

You can use a gamepad to play the game or use the keyboard. The mouse can be used to look around. If you are using a ps2 controller, the left analog stick is used to move and the right to look around. There are a few buttons I used for testing. '0' and '9' toggles drawing of hit boxes. 'L' turns on a effect that I didn't implement in the demo. The effect turns the screen red and blurs the view, it was suppose to be used when the player gets hit. I never got around to putting it in, but you can check it out anytime by holding down the 'L' key. The screen shot above is an example of this special effect.

The models used in the game were created by me when I really sucked at modeling (I am still rather bad at it). I didn't use textures since at the time I was just plain terrible at it. The textures are still in the models folder, so you can see for yourself how terrible it was. So instead of using textures I went with a sort of cel shaded deal to cover up the fact that I couldn't make nice textures. I am not an artist, just a programmer.

As with all of my projects, I wrote this in C. I used OpenGL and SDL as an alternative to Direct X. This allows me to make this program cross platform. The download includes a windows and linux executable. I works on macs as well, but I don't currently have access to a mac to compile it.

The resolution is at 1440x900 (the resolution of the laptop which I made the demo in). I didn't implement any means to change the resolution since it was never meant to be distributed, just to be shown off.

Download

Monday, January 14, 2008

a slightly unbeatable game


The game over screen, a sight you will certainly see a lot of if you play this game.

I made this game in my second year in college and have yet to beat it. It consists of 3 levels with a boss at the end of each level. Where it lacks in length it makes up in absurd difficulty. Even on the easiest setting its no walk in the park.

In order to play 2 player mode you will need to use a game pad, any will do. I suggest you use one no matter what, the keyboard controls suck and can not be changed. I haven't worked on this game in a long time, so I have no plans on going back and changing the controls. Just looking at the code for it makes me want to puke (I practiced bad programming techniques at the time and didn't comment anything).

The keyboard controls, if you want to torture yourself with them, are "w,s,a,d" for movement, spacebar to accept the menu options, "+,-,del" on the numpad to fire the different weapons. The escape key pressed at anytime will exit the program.

The game itself was programmed in C and used the SDL API, I don't use Direct X since it isn't free to use and is not cross platform. I didn't any of those pansy game creator programs either, just code.

Anyway this game sucks, but keep in mind it was my first try and the only real complete 2D game I made. Over the years I have made quite a few incomplete games that I may or may not post. I see no reason to, since they can barely be considered demos.

Windows version (also the only version) :
Download