I have been doing a lot of things lately. One of the most interesting was creating a set of screens for game flow:
* Initial Screen
This was done thanks to one of the resources in the XNA (again using code from resources… shame on me). The complexity of it is a bit above my knowledge, so it was a direct copy/paste and I just did some mark up to get it to work with my own code.
I did this because of several reasons. First of all, I really got to clean up the code and outsource everything out of the main class and into a World class. World class controls everything in the game board through function calls on update for each element. The only logic here is on the AI behavior changes (when enemies shoot or dive).
The second reason is because it let me use a Options screen that lets me load and reaload things without having to quit the game. This was when the big eureka moment hit me. After having traced how each screen worked, i noticed that it didnt’ have a way to pass game options from point to point. In other words, any options that I added to the options screen was lost the moment I left the screen.
This posed a problem to my idea of having options for adding enemies and other elements. Of course, this is the whole purpose of the options screen! The solution was rather inspired by my previous work with the Sound class. So I created a public static GameSettings class. Why static? well, the answer is rather simple, it offers me the option to control them and access them from anywhere. When the options are updated in the options screen, they’re read by the World class in the GamplayScreen and taken into account when the game loads.
I like this solutions a lot. I think it’s both elegant and functional. It also led me to create a Level class which can store level options. I can create a array of levels, and then access each level as the game progresses.
I am currently working on a HUD. I just got started on it, so there is no much functionality to it yet. So far I am only drawing a radar and a small marker for where the hero is. I still need to decide how to work the radar in the game. I have 2 options, to display a radius of where things are, or display everything in the playing field. They both have pros and cons. I haven’t decided because I’m still strugling with now I want to make the game work. This is a bad thing at this stage… I really should know where I’m going, but I have become increasingly worried about what it takes to make any type of RTS work (even on the simplest level). I love the idea of the RTS, but it takes more than one person, and I have been doing this all by myself, which makes it extremely difficult.
I think I will be working on a single controlled ship taking a number of enemies very much Galaga style though the AI will be free roaming.
More to work on =)