For my game I am going to make 2048. The user will use the arrows keys to control the movement of the number tiles across the board. The goal of the game is for the user to create the number tile with the value of 2048. The game has servel mechanics at play. First I will have to code a tile generator that creates a two or four numbered tile in a position around the perimeter of the board. However, the generated files must be created in a open space. Another mechanic of the game is the tile merging which occurs when the users moves the tiles throughout the game board and if a number tile hits a matching tile then both merge into a tile worth the sum of the two numbers on the tiles. The measuring tiles always move the farthest to …show more content…
In the original you lose the game when all 16 spaces are filled and the user cannot merge any tiles to generate new number tiles. To code this I will assign a fill or no fill bool variable to each of the 16 tiles. Then I will assign a number value based on the number tile that is in the tile space. Then when all tiles cannot merge based on the number value assign to each tile space in the board the user will lose the game.
In addition, the game also has a score mechanic. For this will create a variable that sticks up whenever a tile merges together. The score goes up based on the total value of the tiles that merge together. I will also have a high score variable that is assign a new value when the user achieves a score that is higher then the current high score.
Finally, I will uses sprites and the render window for the display of the game to make it look good. The sprite will interact with each other when they touch and will be able to merge into a single new textured sprite. There will also be a game board separated into 16 equal spaced sections. When the user hits a valid direction key then the sprite will attempt to move in the imputed direction. First the program will check a space to the target direction of each tile. If the space is open or contains a tile that is the same as each tile then it will move. A new sprite will be generated, after each valid user input, in a open