• Register

The Core is a space trading / combat game... Here's the official blurb.. Set in the year 3520, interstellar travel is a reality and we most certainly are not alone. Travel the galaxys core systems (known as "The Core") to over half a million stars, each with unique planetary formations. Every colonised planet has its own market, economy and diplomacy making for an in depth trading game. Trading is only one aspect of the game, the core will also feature real time combat, generative mission system, mining, levelling, ship upgrades and planet exploration modules as well. Once all these modules are in place an immersive story arc will be added alongside the free roaming sandbox play that will be playable at any point during your time in the core. So, that's the outline, onto the game specs: 23 space ships, 15 weapons, 8 different human and alien races, half a million stars, over 1.5 million planets, and more upgrades and equipment than I can count.

Post news Report RSS Optimizing Unity Games for the iPad

Some important findings over the course of development of the core relating to optimzation on the iPad. It's a unique platform and has its own pitfalls during development.

Posted by on

As some will know I started developing the core before the iPad was available to buy. This meant a lot of guesswork in terms of rendering performance, draw calls, vertex count and all the other fun stuff you have to think about from time to time.


This weekend just past I spent a good amount of time doing optimisation to get the core to run nice enough to make it playable.
The map screen is very light with just the star sprites and the ship taking basically no vram, and the background being the biggest memory hog here theres also no light sources and nothing really moves. So I'm getting a solid 60fps in the map screen.

Coming into a system view with planets is a different story: originally I was getting around 15 fps on the sol system (Sol is the heaviest a system can really be with 9 planets and asteroids). The sun for each system is a particle system and a point light.

Alpha Test Not AdvisableIn the first system view I had clouds of very light dust sweeping through the background crossing each other. It seems alpha test is very pricey so any layered transparency means big performance hits so unfortunately they all had to go, but I immediately gained about 5fps.
Next the planet orbit lines. These were originally drawn with line renders, one for each line.
The only problem with that was line renderers don't batch, So even though they all share a material, if there's 9 planets that's 9 extra draw calls, just for little lines.

Line Render AlternativeSo instead of line renderers, I just built custom meshes in runtime for the lines, that way batching works and i save 8 draw calls. The intensity of the sun was something worth changing, originally it was 50 particles which gave the sun some life as you can see the shape moving and flaring
away. However I reduced the particle number to 12 and made the particles bigger which seemed to have a positive effect on the frame rate and still looks good, the sun kept its
shape a little more too it just has slightly less movement, which is fine.
Lastly it seems the ipad fill rate isn't so hot, so having large areas of the screen changing frequently hurts. Simply zooming out with the camera slightly making all objects appear smaller had a very positive effect on the frame rate.


Now the system view is running at around 30fps I feel confident it'll be playable. The only problem I can see is because the map view is so smooth, maxed out at 60 fps, you notice the drop to 30 when you enter the system view. Perhaps I should cap the framerate to 30 to ensure the game is consistent throughout. It just seem a shame because it looks really slick at 60 :)

So to summarise:

The key thjngs to remember on the iPad are low fill rate and alpha test causes strain. For those just interested in the numbers, the draw calls in system view are 33-45 with optimisations and 48-58 without. The triangle count didn't change as i didn't remove any meshes, so the triangles are 15,000, which means I don't think polygon count is going to be an issue with most games on the iPad. Your more likely to hit a speed bump from fill rate before you need to redo your models.

Remember the iPhone 3GS? Well the iPad has the same GPU but it has 5 times the pixels to draw. So by that nature things on the iPad cant really be expected to look "better" than they do on their smaller sibling, just bigger (which could be construed as better). I do think that having a nice big multi touch display that's the most responsive on the market definitely makes the little niggles worth putting up with and remains a tremendously fun device to develop for.

Post comment Comments
MN8
MN8 - - 15 comments

Thanks for the insightful article. It was very interesting to hear you talk about increasing FPS using the various methods. We have wondered about that and our Game Studio is just starting to develop our first iphone game using Unity. Normally, we use Unreal 3, and UDK, and are still learning Unity, and we are actually looking for another programmer to join our iphone team at Ipodtouch1.com and our main team at Unrealphd.com. We have several 3d modelers and textures, and can make anything from custom characters, weapons, and props, etc... now we just need a good Unity and iPhone person. We knew that we would encounter some different issues with the iphone and ipad than we are use to with UDK and next gen games, and its great to hear you discussing those things.
Thanks,
Mn8
UnrealPHD Game Studio

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: