Plants vs. botnets (Android)
By Ma Dongliang (cream Loki)
One man's war (http://blog.csdn.net/MDL13412)
This software was written at the end of last year to participate in the China Mobile 2011 "mm million youth entrepreneurship program" and was developed with two teammates for 10 days.
The three of us have never been familiar with mobile development and game development before, and the other two teammates have no idea about Java. This project was developed in this context, so it is very rough to write.
First, paste a few games to show you the results :(Video ViewHttp://v.youku.com/v_show/id_XNTE0Njc4MTg0.html)
This articleArticleJust brieflyProgramImplementation of the key points (source download link http://download.csdn.net/detail/mdl13412/4108312 ):
Interface:
1. Due to the special nature of the game, the default Android interface cannot be used, so all game interfaces are implemented in self-painting mode.
2. The interface resolution is fixed to 480*320, because we do not know how to perform multi-resolution coordinate ing on the Android platform.
3. All non-game interfaces are implemented by textures, and event response mechanisms are set for corresponding locations to process user operations.
Design:
1. All image and audio/video resources are managed by self-built factories to facilitate expansion (Note: C ++ style ).
2. The game process is promoted in a delayed manner without a timer.
3. Create botnets, plants, and sunlight-based classes, and encapsulate basic operations. For special operations, subcategories are overwritten by themselves.
4. Lock game data to ensure thread security.
5. Automatic sunlight collection reduces the number of user operations.
6. One mobile phone is used for combat. The main reason is that there are no two Android mobile phones, t_t...
7. All resources are loaded only once when the game is loaded.
8. image resources are scaled after being loaded to meet requirements.
Operation:
1. The operations on the game interface are mainly drag-and-drop operations, and other interfaces are click-and-touch operations.
The above are the key points of this game design. If you feel you need it, I will write an analysis article on the source code. Thank you for your criticism.