Dragon Song Bloggpost #2
|
This week the game is leaving the Alpha phase and is entering the Beta phase. The last week a lot have been added to the game code wise. One of the features added to the game is Enemy’s and their spawn system and this is what this week’s blogg post is going to be about. The way we decided to spawn enemies is by reading in from a text file, we read in three values from the text file. The first of these three values is when the enemy would spawn, then the second value is what type of enemy it is going to be and the last value is what lane the enemy would spawn in. So if we look at example line in our enemy spawn text file could look like this 4 0 1. This would mean that an Enemy would spawn at the 4th beat and it would be of type 0 which is just a regular enemy and it will spawn in lane 1. The clock that the enemy’s spawn from is our beat meter, what the beat meter does is counting beats. The beat meter is more detailed and better explained in my previous blogg post.
The reason why we choose to spawn enemies like this is because we can now design levels to the game by reading from the text file. The games concept is to make the player create music by playing the game; there for it is a rhythm game. When Riff the Dragon shoots its song and hit enemy different sound effects will play. The different type of enemy’s plays different sound effects. So only by reading from a text file we can decide when an enemy would spawn and what sound effect that will play when the enemy dies. Spawning enemies with different types on different lanes through a text file seemed like an easy way to solve enemy spawning system. That is why we did enemy spawn this way is because this will be a handy tool for when we are designing the levels to the game, also it will be a great tool for sound design because we will be able to decide when different sound effects will play. |
