IOS Dev (66) A basic consideration of a mobile game program
- Blog: http://blog.csdn.net/prevention
- Tai Rui elder brother
- From
Learn iPhone and iPad cocos2d Game Development
1 Handler program initiation within the basic process
applicationDidFinishLaunching
Program cut to the background
applicationDidEnterBackground
End of program execution
applicationWillTerminate
2 Basic settings Agree user set device orientation
Animation Frame Period
[[CCDirector sharedDirector] setAnimationInterval:1.0/60];
It is your responsibility to keep the game executing at a high frame rate.
When you set a lower frame rate and the game remains stable at this frame rate, the user experience is much better than using a higher, but unstable frame rate.
Ideally, your game should perform at 60 frames per second in frame rate, especially those action games. There are some games, for example, most puzzle games, 30 frames per second to meet the requirements.
View FPS
[[CCDirector sharedDirector] setDisplayFPS:YES];
Differences in Debug and Release of logs
Use Cclog, do not use NSLog, the latter will also exist in release version number, affecting program execution.
3 Some introductory knowledge point type conversion defensive programming
CCNode* node = [self getChildByTag:13];// 防御性编程:验证返回的节点是CCLable类的对象NSAssert([node isKindOfClass:[CCLabel class]], @"node is not a CCLabel!");
With what configuration test software?
When testing. Use the Release Configuration as much as possible. Do not use Debug Configuration.
-
Reprint please specify from: http://blog.csdn.net/prevention
Read the full text of the copyright notice: This article for CSDN Bo main brother (ID prevention) original article, without the Bo Master agreed not to reprint.
Report
- This article has been included in the following column:
0Article comments
-
-
-
Related articles recommended
-
J2ME mobile game engine program structure the game engine has a lot of structure, but basically it is implemented within a main game loop. The main loop inside the program includes the most basic structure of the program framework.
J2ME programs generally include two class files, one is MIDlet, and the other is displayable. ...
- ark1111
- 2004-12-13 17:35
- 1057
-
Send an integrated mobile game development tool Mobilegamemaker Two people developed for a year in their spare time.
From nothing to the completion of the project, and finally accumulated a lot of experience, during the period obtained a lot of javaeye friends and expert help. So to share this set of tools to everyone, is to return everyone. Hope that you support, the software is free, the source code may be public, but now the code is too messy, first not caught dead. Software or version 1.0beta, there may be bugs. I hope you will be more post feedback or send to the software help in the mailbox, thank you, we'll continue to update. Our goal is to engage in a multi-platform multi-type mobile game development tool that now only supports the J2ME platform RPG type game
- 397093109
- 2011-03-12 19:36
- 2603
-
J2ME mobile game basic framework
- Xiaoqguo
- 2009-10-31 19:34
- 583
-
J2ME mobile Game Programming Lesson one (development environment building and first MIDlet program video) This video address: http://www.verycd.com/group/@u3138685 Building development Platform </SP
- Baobaoupup
- 2008-03-30 22:51
- 244
-
cocos2d-x Mobile Games (iOS version number) access to share sharesdk (Sina Weibo and share) records from Sina and backstage, get to the required relevant ID, fill in the corresponding place. Need attention. Xcodeproject need to configure URL types fields in Info.list, share ID and Weibo share ID (wb+ Sina Weibo id);
- sinat_18151103
- 2015-08-10 20:36
- 376
-
-
Big Brother's Technical column + Focus
-
Original
-
151
-
Fans
-
5
-
Like
-
0
- OpenCart Common error Resolution
- How to create a new language pack in OpenCart
- install OpenCart on Ubuntu
- Datang Road (4) number one shop requirements
many other articles
Online Courses
-
Utm_source=blog7 "target=" _blank ">
-
Utm_source=blog7 "target=" _blank ">" Live "Computer vision principle and actual combat-Professor Qu
-
Utm_source=blog7 "target=" _blank ">
-
Utm_source=blog7 "target=" _blank ">" Package "Spark+scala Course Package--Chen Chao
- folder
-
- like to cancel like
- Collection
- share Weibo QQ
Collection Assistant Bad news report