A load of bulls post-mortem

Posted by
April 27th, 2012 10:20 am

Here’s the post-mortem for my entry. You can find it here

At first I wanted to do something with openGL. I toyed a bit with openTK a few days before LD started, and had a 2D game in mind. When the theme was announced, however, I knew I had to make it 3D, and since I know XNA more than openTK, I went back to XNA. My goal was to create a planet, using a vertex shader. I’ve messed with vertex shaders almost a year ago, but I remembered how they worked. After stripping the standard shader, and drawing some terrain, I managed to make a vertex shader that rounded the world. It’s not actually round, as it just lowers the vertices the farther away they are from the camera, but it worked good enough. I had to flatten the terrain, though.

So after a few hours I had a round planet, with cubes, and a dude that acted like a billboard

After that, I made a first person controller, made it collide with the terrain, and then I spent roughly 8 hours on collsion. I failed, as it kept jittering against the walls. After a few of those 8 hours, I gave up, and searched for a physics engine. I found jiglibx, and spend a few hours hacking it into my already existing code. That failed as well, but at least you could ski. As it was getting late, I called it a night, and decided to scrap things the next day, and just make something without accurate physics and jumping etc.

After waking up, I gave it another shot, but stopped after about half an hour. I then implemented what I thought was a bad hackjob that would never work, but that simple change ended up being exactly what I wanted. 10 minutes and a few lines of code later, and I had proper collision, without jittering, and it was efficient as well.

So then I went to decide what sort of game I wanted to make. I had about 16 hours left, and decided to create a first person shooter. Something simple. I added the first enemy, the bull, based on Serious Sam’s Sirian Werebulls. Their AI was pretty simple, but it looked nice and they acted in a similar way as in the srs sam games. After toying with them for a bit, I created a few weapons, added explosions and rocket jumping, and stuff like health. By now I had about 7 hours left, and I decided to create the map. The map was way too large, and I scaled it in half. This broke my shader, so I had to fix that. This broke the view, so I had to tweak that by stretching everything. This broke collision, so I had to refit the bounding boxes etc. Finally everything worked, and while it looked worse than before, the world had a nice size.

Only a few hours left, and I had to add the menu, among other things. I added some last minute sounds, which turned out to be bad in hindsight. I hacked together a menu using parts of my previous LD games and the framework I was working on before. I had to redo most of the input checks, but it meant customizable controls, which is a good thing. I added another options menu, allowing mouse inversion, FOV scaling and sound settings. With some testing, I set it on a very low FOV by default, because of the way the world was messed up. But hey, don’t like it? change it! 😀

I was done about half an hour before the deadline. While it didn’t really have a goal yet, because I didn’t have time to add more stuff, I still think I made a decent game out of it. It has potential, at least.

What went right

  • This was my first attempt at actual 3D for Ludum Dare, and I have very limited experience with it. But it went very well, and it has a nice effect. Also, using billboards instead of models was a very good decision, because it looks decent enough and it was very easy to create and implement.
  • I love the feel of the movement, and it’s pretty smooth. Also, rocket jumps <3
  • Creating the world from bitmap files, where each file is a layer, allowed me to save a lot of time. Need to change something? Just draw the changes!
  • While the world seems to be round, it’s actually just a 64×64 tile grid, making it very easy to modify.

What went wrong

  • I wasted way too much time on the collision. I should just remember the way I’ve done it now, and use that in the future. It’s not perfect, but it’s fast and easy to implement
  • I didn’t have enough time to add more content, so in the end the game is a bit lacking. By turning it into a survival game, it is somewhat mitigated, but adding a goal in the world or a story would be nice. Also, needs more enemies
  • The shader does not like altering the world size. It was very hardcoded, and in the end wrong, but it did work after wasting some time trying to fix things.


What’s next

I’ve decided to continue working on this game. I really like the concept, and adding new content should be relatively painless. So far I’ve already redone the shader so it allows worlds of any size. It’s possible to make a 16×512 world, for instance, so you can walk around in circles around it. And with a little change in the shader, you can make it look like this:

Tunnel vision FTW!

Anyway, I haven’t decided what to do with it exactly, but I hope to make a nice, simple run-and-gun game, similar to Serious Sam. My code base has its issues, but it’s clean enough to work with or refactor. I still want to improve the shader though, because now it doesn’t really like tall things. Other than that, most of it should be content and polish.

Also, can’t wait for the next LD!

2 Responses to “A load of bulls post-mortem”

  1. wademcgillis says:


Leave a Reply

You must be logged in to post a comment.

[cache: storing page]