Hi all, I didn’t get time to update yesterday (All day at uni then a family meal straight after), so today will be a double update! In the past 2 hours I’ve been working on a few things:

Since I’d not played the game properly on the Emulator since getting my device, the emulators “Tilting” was broken a little. This needed fixing before anything else could be changed. It’s difficult to debug on the device, it takes longer to load and the USB wire is about 5cm long. Also I can’t video the device, so the emulator needed fixing.

After the emulator was fixed, the options screen needed changing. It looked nice, but didn’t really function at all! The sliders moved but nothing was being changed behind the scenes. The thing that I changed was to hook them up to change what they were supposed to change. This can be seen in the video at the end of the blog post! This wasn’t as simple as it sounds, since in XNA the volume can’t be changed on the SoundEffect class, which is what all of my sounds were at the time. You have to create and Instance of the sound effect – SoundEffectInstance – and change the volume on this. This lead to me creating a new custom Sound class which holds both the SoundEffect and its instance so that the volume can be changed on it! To change all of the sounds volumes at the same time, a global list of sounds was created.

The next update was adding a Countdown to the beginning of the game. There is nothing more annoying than dying soon after pressing play because you were not 100% ready yet. It works well, and I found a nice free sound effect to go along with it, which is nice. There is a random bug, which is confusing the hell out of me, which can be seen in the video – when “GO” is displayed the player disappears during just that second … The drawing code is not changing at all, so I’ve just got no clue what so ever.

Behind the scenes it made enemies spawn every second. This interval was not very changeable, which it needs to be if it is to get more difficult over time. Instead of using seconds I’m now using milliseconds and am working out when to spawn in a different way, which is much more easily changed over time! The same has happened with the powerups, they were spawning at the same time as enemies, just randomly. Now they are spawned randomly with a minimum of 5 seconds in-between them and a maximum of 30 seconds.

As promised, today there is a video! The video talks though these changes a little, and you can also see the changes in action!

I think in the next hour it is time to start of spicing the gameplay up a little bit. Creating more enemies, paterns of enemies and making the game harder over time. Also the new power-ups that I’ve thought of need to be implemented too! So still a lot of work to do before it is nearly complete!

Advertisements