Cave of Dinosaurs – Post-Mortem
This was my first LD, and it was a lot of fun. I’ve learnt quite a lot from it I think, and I don’t think I’ve ever got so much work done on a game in such a short time-span.
I used C++ with several SDL libraries. Graphics were created in the GIMP (and Paint…), and the sounds were created in about 10 minutes using SFXR.
I did briefly consider using GameMaker instead, and at several times I thought to myself ‘All I’ve done so far I could have done in GameMaker in a couple of hours!’ but I’m glad I didn’t. It would have felt like a cop-out really. Not to say that anyone using GM was a cop-out, but I’m glad I took the challenge of using C++.
What Went Well
- I got an idea fairly quickly, and actually managed it in the time frame (I would have liked to add more stuff, but at least it is a game).
- I had a horrible, game-breaking memory-leak but managed to fix it in very little time.
- I knew my way around the GIMP enough to animate Ted using layers – I’m always very frightened of having to animate things.
- Mostly, it all works. The collision-detection between moving things and the ground is pretty random and bizarre, so you can climb walls much higher than planned. The dinosaur movement was put in in about 10 minutes at the end when I realised the game was impossibly easy. The game is hacky, but it’s pretty close to what I wanted.
- Click-to-shoot! Wow, I was pleased when that all came together. The bullet heads toward where you clicked, and always at the same speed – at first I got in a complete muddle as to how to do this, but then it was really simple. I like it. The whole ‘click, shoot, bullet hits wall, rock breaks off and falls’ thing works really well I think, and I’m pleased with it.
What Went Badly
- That collision-detection is awful. Checking collisions between the ground, which is a grid where 1 across = 1 tile; and the coordinates of everything else which are 1 across = 1 pixel, was tricky and horrible. I did it badly. When I eventually gave-in and added proper box collisions for the interactions between player, rocks and dinosaurs, it was instantly much better.
- The levels aren’t interesting. I hadn’t originally intended it to be an infinite, random tunnel, but I hadn’t originally had much idea of how it would be a game. I just knew “Shoot rocks so they fall on dinosaurs”. One, random level seemed much easier. The first area is fixed, then the rest is generated as needed, one column at a time. I tried several ways of having each column based off the previous one, but slightly altered, but they all went wrong. So I got it to generate a random number, and pick a pre-defined column from a list based on it. Less interesting, but at least I could guarantee that you could actually get through the cave.
What I Would Do Differently
- Prepare in advance and get a basic… I can’t think of the word. A basic code-base which has drawing and tiling stuff already there. I spent far more time getting that set-up and working, and repeating code that I could have used a base class for.
- Framework! That’s the word.
- Get more sleep the night before it starts. And, in fact, several nights before that! I kept making silly mistakes, like copying code and forgetting to change x to y in the copy, because I wasn’t firing on all cylinders.
Things I Didn’t Have Time For
- Graphically, the cave looks pretty horrible. I’d hoped to get time to have a tiling system based on what was around each tile: so a piece of rock hanging from the ceiling would look like a piece of rock hanging from the ceiling, and not just a square block.
- I’d also hoped to animate the dinosaurs. Just didn’t have time.
- It would have been good to actually show Ted holding a gun, with bullets coming from it. With the image flipping though, it would have taken time I didn’t have. I wanted several animations for Ted, but like the dinosaurs, it didn’t happen.
- Improved collision-detection! It’s abysmal.
- Particle effects! Another thing I’d hoped to have time for. Would have made it look less boring, possibly.
- A proper menu. The menu in the final thing is the one I bunged in as a placeholder because I realised it would be handy to have later.
- The text-drawing function I used has an awkward quirk in that it always draws an opaque background. I got it from the internet a while back, and though I tried fiddling with it, I couldn’t make it transparent. Makes the menu look even worse.
I may well make a post-compo version with lots of these things added-in, but then again I’m incredibly lazy at this sort of thing. So maybe not. Still, I’m pleased I managed to do it, even though I’m not going to win any prizes.
~AtkinsSJ
Tags: post-mortem, postmortem