| As the development of the Internet infrastructure, 4G mobile phone and 4G net has taken an more and more important role in our normal life. Mobile Internet is changing people’s way of living and entertainments in a very short period of time. Video game has been a long time friend of we human being, its development is highly related to the platform and the user interface. Because the mobile device is accessible wherever you are and, you don’t need to stay in front of the TV or tablet to enjoy the fun, instead you enjoy the mobile game when you are on the bus or in the bed.This design is based on a rising star game engine Cocos2d-x. Using this engine, this design has successfully realized the user interface that can avoid mis-control. Using SpriteFrameCache, this design has realized the batch loading and playing of the SpriteFrameAnimation while saved much storage space. Using the Render Frame, this design has separated the UI into 3 individual parts.To make the game more enjoyable, this paper has added 3 new ways to play the game 2048, AI mode, timing mode and the barrier mode. Advanced technology has been used in the development of this game. For example, the AI uses a pruning algorithm and the heuristic function to evaluate the board, a block queue is used to synchronize multi-threading, multi-screen adaptation is considered, frame animation is applied to the game and its resource is pre-treated by Cocos Studio.In test section, the AI and game are tested separately. So, I have create an independent project for AI to test its performance. The game is tested unit by unit to make sure that every part of the game system functions well. At last, this game is tested by real people and received a warm welcome and applause. |