Professional Documents
Culture Documents
Choices
Let you play the game in a style that you want Effect the world in real ways including minor and major story outcomes Give you different choices based on the choices you made earlier
Performance
200+ onscreen objects + shadows Map 400 times larger than screen 8000 world objects in total 60 FPS on HTC Desire Add 100 moving objects such as in AOE FPS ~ 20 Z Sort taking 80% of CPU time during a frame render.
MS PAINT MOCKUP
First problem
Canvas ran at 20FPS on Samsung Galaxy tab Add sort overhead and game was completely unplayable Canvas is frame buffer limited, tablets have higher resolutions but not necessarily better 2D graphics capabilities Simply clearing canvas can take 12-20% of CPU for a frame
Options:
Push ahead and make game anyway?
Options:
Push ahead and make game anyway? Give up?
Options:
Push ahead and make game anyway? Give up? Save what you can and start over in OpenGL?
Options:
Push ahead and make game anyway? Give up? Save what you can and start over in OpenGL?
OpenGL can do Z buffering in hardware! How hard could it be to port?
Why 6 months?
That sounds crazy
Why so long:
Straight backend change not so trivial, had been written in a particular way Lots of custom code to get around limitations in Java and canvas now needed porting
Example?
Drawing text was done as drawing images of each character in a way to avoid GC Overhead of drawing quads for text greater than drawing the game
Other Issues?
When using alpha blending with Z buffer, blend occurs with images already in buffer, so Z order still important
Should we have shipped the first one and gone OpenGL for sequel?
Maybe but it turns out there was a third brick wall we didnt notice ahead of us and it turned out to be reinforced concrete.
Solutions?
Reduce quality of images? Have less variety on a map? Less animations? Make a smaller game?
BUT
With OpenGL. Textures use main memory and only 2D images have memory limit.
October 20 2011
Novermber 30 2011
Turns out
Implicit overhead simply running two buffers Despite every pixel in Canvas taking cpu, and every blend being slow in both Canvas and OpenGL Sending Canvas with alpha values to graphics system, blending is effectively free. Each layer can run happily at different speeds and sub Canvas changes
April 22 2012
So you want to make your first game? (advice you wont heed)
Before you make your first game, you must first make a game.
Make your
th 0
game instead
No Assets
Populate with creative commons art, sound, meshes, text
And then?
If it works? Congratulations you havent lost any time anyways, your proper assets can slot straight in and you can extend your game If not? Rethink how you are using your assets, perhaps you need to do something differently. In any case you dont have the situation of assets made for one purpose that now need to be redone for another.
And finally?
TAKE BACKUPS
USB, phone, dropbox, R-Sync, SVN
THANK YOU