📜 ⬆️ ⬇️

Developing a game application for the iPhone. Part 3

Development time - 6+ months of two people in their free time.
Team composition - 1 artist 1 programmer.
Time from idea to prototype - 1 week
Art data - 288 megabytes, 1400 files
Code Engine and Games (without third-party libraries) ~ 50024 lines of code, 485 files
Game Code - 4338 lines - 12 files
The final size of the distribution for upload in AppStore 22mb
Final size in AppStore 25MB



The code was measured using blog.schuager.com/2009/01/line-count-in-visual-studio.html (Only engine and game projects were left in the solution)
')

Prehistory


Part 1
Part 2

Work organization



Project management was organized online using Google Sites and Google Docs.

image
Project home page. On the left is a list of projects and their internal pages:

image
You can create pages whose template are file storages, for example:
Limit 20 MB per file and 100 MB for the entire site.
When our builds became larger than 20 megabytes, we started fumbling through Google Docs

image
You can create pages, the template of which are all sorts of Issue Trackers

Pros:


Minuses:



Development


Development went on weekends (up to 10 hours in total over the weekend) and sometimes in working hours after 7 pm (2-3 hours).
The gameplay from the prototype stage and until the release almost did not change. A lot of time was spent balancing spawn, as a result so-called spawn waves, falling helmets and arrows were added. Initially, the game was planned as a paid one, but at some point we decided to experiment with the free version. Plans for features for the future paid version are now very carefully sorted, weighed and discussed. A strong optimization of load time and memory (details below).
Switching to Xcode 4 is busy for 2 days. For me, the xCode 4 environment didn’t seem very much, even compared to xCode 3 (lack of compilation and preprocessing capability, lack of the ability to customize the toolbar, Build for Archive constant rebuild glitches, brakes, etc.). I liked very much to use the profiler - in my opinion this is the most convenient of all profilers I've used (including Windows). From now on I prefer through it.

Assets


Art was originally made in the vector and exported to png. I hope that when the 3rd iPad comes out and there will be another netivny permission, the conversion will be quick and painless. Now it is exported as for 1024x768 and special scripts are prepared for iphone (480x320), iphone retina (960x640).

Total:

Sound


Sound in .ogg. Some of the sounds are played in streams, the number and length of the OEnAL buffers is set via the config. Streaming sound playback was completely debugged on Windows and earned on the iPhone without any changes.
Now I am considering alternatives to vorbis-ogg because of the relatively slow decoding. I look towards IMA4 (which is maintained at the level of iron).
Perhaps the sound in IMA4 will be converted during the compilation of the pack (described below).

Game resources


For iOS builds, all data was pushed into a pack file.
A packfile is compiled assets for the required platform using additional optimizations:

Why do you need it:

Features of the implementation of the pack file

This is not a zip file, but a simple proprietary format (which often changes from version to version).
Why not a zip file - unpacking zlib on iPhone does not give any advantages - loading time from a file for uncompressed data is faster than unpacking.
The options that I tried:

Do not forget that the application from the AppStore is downloaded in a packed form, therefore the level of compression is not very important.
Linking fastlz and over zip (appstore) arranged for me. Zip for appstore compresses packs by another 4 MB. C 19 to 15 megabytes.
In the future, there are plans to recheck snappy.
On pre-release days, JPG was also revised as an alternative format for storing textures, not all, but only 24 bits, and only those that after JPG differ by the minimum error (large textures that satisfy this condition, I found at least 5). This will be an additional step at the stage of compiling the file pack.
Now the pack build takes about 15 seconds and is done only before compiling for the iPhone (climbed through the RSync from the Wind Machine)

A 20 MB limit appeared on the size of the application in the AppStore (restriction for downloading through 3g).
As the data does not pack, and how not cool we always get more than 20. If our product were paid, we would certainly be divided into HD and not HD.
In our case (free application) decided not to share.

Advertising


Advertising from iAd and AdMob is embedded in the application - banners are not shown in the gameplay (and will never be shown)
On the latest version of my first application, the ad logic has been fixed. The final version works like this: If iAd for some reason feils, (judging by the reports, this happens almost 90% of the time for non-USA, Germany, France) then adMob is connected. As a result of this change, the amount of money brought up by adMob has seriously increased.

Result


The application can be downloaded in the AppStore and it is free (honestly free). Brings money only for clicks on banners. Universal application for iPhone, iPhone4 (Retina) and iPad.

Useful software



What well:



What is wrong:



What's next:


Source: https://habr.com/ru/post/128953/


All Articles