More Charge Development
So I worked again on Charge today, and I finished something =D.
Looking back at a few previous posts, I noticed I wanted to make a Level System, I had already made a level class, but no load function. So I shaped out a Load function, and then made a Level System.
I had to tweak my Enemy System to keep count of how many Enemies it had. I couldn't just get the size of the list, because some of the enemies were likely to be NULL. The reason some could be NULL is for two reasons:
1) If I remove an element while iterating, there's a high chance that I will have some access violations.
2) In terms of efficiency, it's better.
So I now have a variable to keep track of how many enemies exist. Each frame, after updating everything, I check to see how many enemies exist. If it's 0, then I load the next level.
Levels will go in an order like:
Level1.map
Level2.map
Level3.map
...
So I don't even have to specify each map, it will just continue to load them. I also have a max levels number hard coded in.
The level files are simple, a format like this:
Background: space
ECount: 2
Enemy 1 30 30 End
Enemy 1 50 70 End
The only thing I really need to do is switch to a 'transition' state, then revert. This way, it won't seem choppy.
But that's what I accomplished for today. Not too sure of what I have planned for tomorrow, but hopefully I'll get something done =D
0 Response to "More Charge Development"
Post a Comment