Friday, May 30, 2008

Extinctathon: Enemies and Dying


I've been working pretty hard on Exctinctathon, and I've started adding an enemy and dying. Right now, there's just one enemy (the purple blob), and he just walks back and forth in a sinusoidal path. If you hit him from the top, you kill him; otherwise, he kills you. Fun!!

I started out with an Enemy class that inherited Species, and while that was fun (if only because I got to type "public Enemy" a lot), I'm having better luck with making the on-screen enemies Species objects just like the player is. I might go back and change this again later, but I really need to read up on things like inheritance in C#. I think it's pretty obvious if you look at the code that I'm working with some sort of fundamental misunderstanding when it comes to that.

I still need to add other types of enemies, each with their own set of behaviors, and the ability to save the list of enemies with the list of blocks in the level editing system (right now the enemies are just hard-coded into the level). I need to see how to save multiple object types in an XML file. Shouldn't be TOO difficult.

Current short-term goals for this project:
1. Include enemies in the level saving and loading procedures (this is by far the most important).
2. Add a menu system and pausing.
3. Add some sounds and music to spice things up.
4. Add new enemy types as well as new blocks.
5. Clean up and document the code.

I think that's reasonable for now. I'll post again in a couple of days and we'll see how far I've gotten.

Project Files:
Extinctathon Project Snapshot, 05/30/2008

Video:
"Extinctathon: death and enemies"

EDIT:
I've added the ability to add enemies in the level editor. The list of blocks that was being used to add to the level has now been made into a generic list of objects which contains both Block and Species objects. WARNING! Very exciting video ahead. Here it is.

I need to come up with some better ideas for enemies.

No comments: