Create an iOS game from 0 in three weeks and submit it for mounting

Source: Internet
Author: User

Prepare the device:

A MacBook Air. I bought it in Hong Kong and spent more than 7 K. It is absolutely nice to use.

The developer account of Apple. At that time, I sent more than 700 yuan to my father by fax. I'm curious. I can ask my credit card and password to make money directly in the United States. What if I do anything else ??

 

Learning phase:

No matter what you learn, choose a book and read it from the beginning to the end.

This sentence can free many self-taught developers from the bitter sea. I have been in contact with a lot of people. When I was studying, I felt that the information was good everywhere. Then I went around and saw that I hadn't mastered anything for a week, but I think I have read a lot of books.

This is why it is not systematic, so choose a good book and start to see it again. Then I decided to read other materials. Here we will introduce 2 documents:

Basic objective-C tutorial

[Basic ios5 development tutorial]. (beginning. ios.5.development. Fixing. The. iOS. SDK). David. Mark. Jack. nutting. Jeff. lamarche. Text Version

No matter what shit information is available on the Internet, read the two books first. It took me 1.5 weeks. Including examples.

 

Then transfer to C ++. Here, I used to study c ++ for a week. The tutorial is:

C ++ primer.pdf version 4

This book took about 1.2 weeks to complete, especially STL, which mentioned some pointer security issues.

 

Then I immediately transferred to the cocos2d-x, there is no good book, so the best teaching material is the official site:

 

Http://cn.cocos2d-x.org/resource

Http://www.raywenderlich.com/tutorials

Http://www.himigame.com/category/iphone-cocos2d

Remember, the Black shot in the example, I knocked it again, I know how to play cocos2d-x, it is too fucking simple.

 

After don't rush to play the game, I want to objective-C how and C ++ combined to understand, so generated a cocos2d-x template project, to study each lineCodeWhat does it mean.

This process is very important. It is a process that allows your knowledge to be smoothly implemented.

Because we cut into iOS in the middle, if the learned knowledge cannot be combined with our original theoretical system, it will be very unreliable and easy to forget, so it must be implemented. I will list the relevant materials:

Http://www.cnblogs.com/lsck/archive/2012/05/15/2501345.html

Http://lizaochengwen.iteye.com/blog/1271788

Http://blog.csdn.net/mengtnt/article/details/6709930

Http://www.cnblogs.com/csj007523/archive/2012/08/22/2650701.html

Http://www.cocoachina.com/bbs/read.php? Tid = 51107

Http://o0o0o0o.iteye.com/blog/650275

Http://stackoverflow.com/questions/492551/eagl-what-does-it-stand-for-exactly

Http://blog.csdn.net/honghaier/article/details/7887873

Http://www.lugw.net /? P = 80005

The above connections answered the steps to start an iOS app to load the cocos2d-x. The process is as follows:

Summary of the entire process:
Main-appdelegate-appcontroller-subviewcontroller + egalview-ccapplication. Run
-
Appdelegate. applicationdidfinishlauching-helloworldscene

 

After mastering the basic tools, we need to learn the tools provided by third parties, such as cocosbuilder and tilemap. These two are very important. In particular, there is an example:

Http://www.cppblog.com/besterChen/archive/2011/01/20/138965.html is very important, it is the use of tilemap level. It must be done once.

Http://ibezstudio.blog.163.com/blog/static/18924613020115234715208/

Http://blog.csdn.net/bill_man/article/details/7981427 this getting started with cocosbuilder

 

 

At this point, we will find that we have encountered a bottleneck, that is, we seem to know a lot, but we do not know how to operate, how to deploy APIs, how to deploy methods, and how to compile a bunch of errors, run a bunch of crashes. At this time, let me give you another path:

Take full advantage of the built-in examples of the framework

This sentence is really a Bible, which saves you 90% of your search work. After you download the cocos2d-x:

Cocos2d-2.0-x-2.0.4/samples/testcpp/proj. IOS has an xcode project, run up, you will find all the answers here, including cocosbuidler, HTTP connection and so on.

At this point, I believe that you have fully started iOS development, and it is the process at which you can achieve the idea.

 

Development encapsulation Reconstruction

All the basic tools are available. Next, Every programmer must encapsulate the framework. Cocosbuilder is troublesome and inconvenient to use. Therefore, I perform secondary packaging to encapsulate all the custom classes, custom events, custom attributes, and interface nesting, the development is completed with simple calls.

This is very important. Joint debugging often occurs in game development. If the process is not smooth, it will be a waste of time.

 

Next is the second encapsulation of the cocos2d-x genie, there are a lot of animation operations such as the original API is very inconvenient, after I encapsulate, after a row of calls, the image cache, cutting, acquisition, and Animation Generation are completed. Hundreds of Sprite images on the same screen.

Finally, problems such as HTTP, MD5, String, sneakyinput, and MAC address retrieval on the mobile phone are encountered during development. Search for information. Although I have already solved it.

 

Game Development Process

First, use cocosbuilder to create the interface

Then, make the first simple level to implement interface switching, collision, and movement. It basically only uses the previous knowledge. It's great to download some materials from 66rpg.

After the technology is stable, the layers are laid out to reconstruct the architecture. Use tilemap to implement level maps and other operations.

 

 

Real machine debugging

This step is confusing. I recommend several links and try it several times.

Http://blog.sina.com.cn/s/blog_68e753f70100r3w5.html

Http://kqwd.blog.163.com/blog/static/4122344820117191351263/

Http://mobile.51cto.com/iphone-276988.htm

Note: Do not use the method of cracking. Use the genuine process. Connect to your iPhone. At this time, we will find a problem. The interface made with cocosbuilder is 480*320, but the mobile phone is a Retina screen, and the remaining half is put.

A bunch of crap on the InternetArticleFinally, let me find the solution:

Http://blog.csdn.net/xiaoxiangp/article/details/8079744

Cceglview: Export dopenglview ()-> setdesignresolutionsize (800,480, kresolutionshowall );

Just a line of fucking code is OK.

 

Publish an application

This part is also the biggest headache, a bunch of errors. It is mainly about the registered bundleid and certificate issues.

Http://blog.sina.com.cn/s/blog_68e753f70100r3w5.html

Http://kqwd.blog.163.com/blog/static/4122344820117191351263/

Http://mobile.51cto.com/iphone-276988.htm

Http://www.cocoachina.com/bbs/read.php? Tid-2776.html

Http://www.cocoachina.com/bbs/read.php? Tid = 14781

Http://blog.csdn.net/li6185377/article/details/7534831

These tutorials are good, but they still seem messy. Let me briefly describe the process:

Go to ituneconnect to add an application, and prepare all the images. Note that the bundle ID must be written. For example, I am com. pixysoft. P001. This is required by xcode later.

In xcode, select archive for compilation, and you will see the packaged project in organizer. Note that the bundle ID of the Project plist must be written, which corresponds to the website.

Then select a distribute... in the archive of organizer. You will be prompted to enter the user name and password, the uploaded project, and so on. After 10 minutes, you will be notified that the submission is successful and is awaiting review.

There will be some problems, such as the failure or expiration of the certificate at most during compilation. Don't worry, the money must be provided for service; I went to the Apple developers to put the develop, the two licenses of distirbutionare generated, and then double-click the license to add xcode. In this way, you can package.

Sometimes the bundle ID issue is mentioned. Pay attention to the corresponding two.

 

Follow-up

I started learning objective-C, C ++, cocos2d from 0, cocos2d-x took less than 3 weeks. The reason is that I have a good team! Instead of my personal efforts. As the team leader, I have made a good job of division of knowledge points. Each person is responsible for a part and communicates with each other every day, so the learning speed is very fast.

I have been developing games since the November 20, and have finished development in less than two weeks, mainly without detours. An online cocos2d-x example (shooting) + tilemap example (wilderness hacker) after careful twice, you will have their own ideas.

I finally submitted the application for approval because I paid 99 USD wisely last year, so I did not have to wait 12 hours.

If you are interested, you can join the group to chat with each other. If you want to get started with iOS in three weeks, I will open a paid training class to help you! (Heheh, earn extra money)

 

 

 

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.