Of ants, and centipedes.
March 10, 2007

The ants were easy, then impossible, and then suddenly very easy again.

I designed my first ant, and it was good. It did exactly what it was supposed to do. Which was, walk around slowly, changing direction at random after a random number of steps. So, I decided to use the ant object multiple times. This was ... a mistake. Because, basically, all the ants decided to just copy the last ant created. Well, not exactly. Whilst each ant moved about independently, all the sprites faced in the same direction as the last ant created!

To solve this, I either had to learn a little bit more of GML than I was prepared to, or I had to get creative. So, naturally, I did the smart thing. And, overcoming my problem led to a gameplay decision born out of serendipity! I decided to bypass my ants choreography problem by simply making a limit on the number of ants, but letting each ant be a unique object in the game.

To this end, I designated 8 spawn points, and drew a 'hole' at each point. Then, I made 8 individual ant objects, and gave each one a hole at which to spawn. Then, I created a controller object to keep a count on the ants, and to replace any ant that gets destroyed by spawning a new one. This means that there will ALWAYS be 8 ants on the screen at any given time. Since they are so slow, this won't be a problem.

From this, I can follow a similar logic with all the other insects. I need to determine how many of them the player will have to face, and can then just ensure that there are always at least that many around. Obviously, as the game goes on, this number will increase. That is what Wee Games are meant to do ; just keep getting harder, the way old arcade games used to.

(I figured I would see what kind of ridiculous extremes I could go to, and decided to set the game to show me 800 ants. I have to say ... WOW. My engine can cope quite nicely, with no sign of slowdown. It looked really cool, and I may use it in a bonus level of some kind.)

Flushed by my success with the ants, I decided to see if I could do anything with centipedes. Now, the centipede actively hunts the player, which is easy enough to do, but also splits into 2 when it gets shot. This means doing a bit of cheating with the coding, creating the new objects before destroying the old one. (Luckily, it is done so fast that the human eye can not possibly notice.) Each of these 2 half-centipedes splits into 2 quarter centipedes, and then finally these quarters split into eighths. I had to replicate my earlier trick of defining individual objects for every bit of the centipede, just so that the sprites all faced in the correct directions.

I also tweaked my bug controls slightly. He still rotates with A and D, but now does it twice as fast as before. Pressing S slows his rate of rotation down to about half, which allows for a little more precision. Of course, since the player aims with the mouse, this precision won't really be used, but I think it is important to give the player that level of choice.

My next stage is determining just how often the centipede appears. Do I want him to be a constant threat, do I want 4 at a time, do I want 8? 8 is probably too many, but it could be pretty fun. (8 centipedes means the possibility of 64 eighth-sections swarming in on the player at the same time!)

To do :

My next enemy will be the spider. The other enemies are basically tanks, whereas the spider shoots a web, so he will be trickier to make than the beetle or woodlouse.

I also need to start thinking about a health/lives system. Do all enemies kill me on contact, like Geometry Wars? Or, do I have a health bar? If I do have a health bar, then I need some way of replenishing it. If contact is fatal, then I need to address how many lives the player gets, how they earn new ones, and other such concerns.



(Click image for full-size version)

Most recent blog posts from Lee Weedall...

Feedback
honestgamer honestgamer - March 10, 2007 (06:30 PM)
This sounds very cool, Lee, and I hope you keep the updates coming. If you wind up with a truly kickass game, HG can cover it and do interviews, right?

eXTReMe Tracker
© 1998-2025 HonestGamers
None of the material contained within this site may be reproduced in any conceivable fashion without permission from the author(s) of said material. This site is not sponsored or endorsed by Nintendo, Sega, Sony, Microsoft, or any other such party. Opinions expressed on this site do not necessarily represent the opinion of site staff or sponsors.