Plants vs. botnets (Android)

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.