Android game development and design steps
Today, the number of mobile phones with Android OS is much larger than that with iPhone. It is reported that an average of 0.4 million Android devices are activated every day. However, iOS is still a more profitable and popular platform for developers. The reason is: Android does not have to spend money to buy apps; many devices and app stores make the Android Market scattered. So how to effectively design Android game development? The professional IT training button Ding answers: 1. Introduction to mobile game development the essence of the game is to constantly display and update pictures on the screen, it is controlled by the Program Logic instead of updating randomly. A complete game requires a wide range of knowledge, such as the creativity, background, storyline, sound effects, style, type, speed, and model adaptation of the game. In addition, game development requires coordination and tacit cooperation of planning, artist, program, and test. 2. The game framework design first requires a View class for displaying the game interface, and then constructs an entire game logic class to control which interface is displayed on the current screen, even perform some logical processing on the interface. After creating and controlling the view display, you must enable a thread to update the view display interface in real time and refresh the view to make the game work. 3. Map Design a map in the game is a complete big map composed of multiple small blocks. data that make up these small blocks can generally be stored using a two-dimensional array, then, the program maps the small pieces of the map data to the screen in the fastest way to form a complete map. Of course, this data is not input from the keyboard one by one. Generally, a programmer will create a map editor and click and save it in the map editor, or download some mature editors from the network, such as using mappy to generate a map, and then using the script language to write a program in what format should be maintained for mappy. Generally, a map consists of a 45-degree angle, a top-down angle, and a side view. 4. the main character in the design game becomes the "Genie" here. Of course, the genie covers a wide range, not only the protagonist, but also the npc and props. Since it is a genie, there must be many animations. An animation itself connects an image frame by frame and plays each frame cyclically. You can also use your own genie editor to edit the genie, split the genie into many parts, and then combine them to save a lot of space. The characteristics of the genie class, each time only one image instead of multiple images can be used to fill the screen, there can be several frames, but only one display at a time. 5. The layer manager adds all layers (including maps and protagonists) to the layer manager, and then sets the position and size of the view, call the paint method of the layer manager to draw a layer. The order of drawing is in the reverse order of adding. You can add and then draw to avoid the layers being overwritten and not displayed. 6. Game Sound Effects: First, we divide the game sound effects into the following categories: background music, plot music, and sound effects (action sound effects, prop sound effects, and auxiliary sound effects. The background music usually needs to be played all the time, while the plot music only needs to be played when the plot needs it, and the sound effect is a short and small section. 7. The game archive stores the progress and other information of the player's current game. When the player enters the game again, he can continue the game by reading the last archive. (1 ). identify the data to be stored. First, in order to repeat the game's previous progress smoothly, we need to save some attributes of the main character (including location, life, attack, defense, etc ), you also need to save some attributes of the current map (such as rows, columns, and the first layer), as well as the relevant content of the conversation, finally, you need to save the entire map data of the game (each layer) and the current music status. (2). Save the data to get the stored data-> package the data into properties-> write properties to the file. (3 ). load data open the file-> load the file stream into properties-> use properties. get the data of the specified tag using the get method-assign the data to the corresponding variable in the application. When you exit the game, players are automatically saved no matter whether they are saved or not. If you want to learn more about IT, click I want to apply for an IT CD