Game Development Process Week 5
|
Here we go again with a new post about the development process of Team 8:s game: Last Signal. This week I am working on creating the whole level of our game. The story of the game plays out in a spaceship and the way we have designed the game we only have one level that you have to get through. But hopefully that level is big enough that it gives the player a satisfactory playtime. We have gone through some different ways of creating the level of the game and finally we have settled on a way that makes the levels very easy to create and also very easy to change if we are not satisfied with a particular part of the level. The first solution we had was to create the whole level as a png picture in photoshop and then let the programmers set the coordinates for the walls and the areas where the player could not go. The problem with this solution is that it puts a lot of the work of the level on the programmers and it is much work to change a level with this design. The upside is that it can potentially make a very beautiful level that looks very good and never the same. What we have now instead is very modular and puts very little work in the hands of the programmers, but it does not look as good. First I have created a spritesheet consisting of tiles that I use to create the floors and walls of the spaceship. Then we create a txt file which loads the spritesheet of all the floor tiles and sets a number or character to correspond to each tile. Then it is just a matter of writing the level in the txt file. In the first level of our game the txt file looks like this: ../data/Maps/Floor_SpriteSheet.png 004222222700 In the first block of the txt file the first number or letter is the assigned character for the corresponding tile. The second and third part of each line is the coordinates of the tile in the spritesheet and the last number tells the game if the tile is solid, passable or if the tile is a transfer tile that sends the player to the next part of the ship. The first block of numbers and letters sets which coordinates each tile has in the spritesheet and the second block of numbers and letters sets where each tile should be placed on the map. This makes it easy to see which coordinates a specific tile has and it is also easy for the programmers to assign a separate tile to be either a wall which you can not go through or if it is a floor tile which is passable. Here is a picture of the result of the code above: Unfortunately the game is quite zoomed in but you can at least see how the code works. Each tile you see in the picture corresponds to a number or character in the txt file above. If it is something in the level that looks wrong or if the floor should be replaced with another sort of tile it is as easy as change a number in the txt file. This will hopefully make our game-levels look good and be exciting to play. That is all for this week. See you next time! Tagged: 2D, astronaut, code, computer game, level, level-design, modular solution, txt |
