^ Week 02, Tuesday
▶ review design document
▶ review system architecture
game prototype
- establish console technique of choice
- trace logging, download and install mm.cfg
- in game HUD, e.g.
com.pixeldroid.tools.osd.Console
- use pixeldroid libraries for controls and high scores
- controls:
com.pixeldroid.r_c4d3.controls.fourplayer.FourPlayerControl
- scores:
com.pixeldroid.r_c4d3.scoring.RemoteHighScores
- stub out every major state (screen)
testing strategies
- use cases — defining interactions between user and game
- start from game flow diagrams in design document
- add detail to areas of higher complexity
- test suites — verifying correct implementation of use cases
profiling techniques
- timing
- fps
- function timing
- execution counting
- identifying bottlenecks with window size
- processing – smaller window has no effect on frame rate
- rendering – smaller window improves frame rate
optimization strategies
less is more!
- test early; test often; optimize last
- do as few things simultaneously as possible
- reduce screen redraw
- share object instances rather than create new ones
- cache memory references, especially long dereferencing chains
- precalculate known values
- defer unnecessary calculations
- use fewer local scripts
- ignore inactive areas
readings
flash