11. Why
• Script + native code
IDE for specific game type
• In-game editor
• Performance
• etc...
12. What’s In It
• Game Object System
Script Integration
• Physics Integration
• Content pipeline tools
Others
• Simple Scene Management
• Action System
Script Key-Value Dictionary
• etc...
24. Game Object &
Game Component
• Composition instead of inheritance
A object of gameplay logic
• Is composed by multiple functional
components
Component #1
Game Component #2
Object
Component #3
25. Game Object &
Game Component
• Add/remove component in runtime
• Key to build an IDE
28. User Components
• Arbitrary stuff that gameplay needs
Rotation forever
• A goal in level
• The behavior of characters
A spike need to be avoided
• Line drawer needed by editor
etc...
52. Naive Port
• Mac➔iPhone
• 20 FPS + Crashes
• Possible causes:
• Memory out of bound
• Script slowdown
• Performance of rendering
53. Memory Limitation
• Unified memory architecture
• User program up to 112M - iPhone 4
54. Beyond Memory
Limitation
• 2D Games - bitmap texture heavy
Preallocate bitmap space
• 22 x 1M x 4 bpp = 88M
• Atlas
Stitch small bitmap into atlas
• Automation tool is a must
55. Beyond Memory
Limitation
• Memory fragmentation
Heap allocation & deallocation
• Script
• dmalloc
• Drop-in, just works
60. Rendering
Optimization
• Fillrate
Number of texels written to
memory per second
• Desktop app, pixel-shader heavy
• Fillrate bottleneck
✔ • Reduce framebuffer size ➔ boost
frame rate
61. Fillrate Optimization
• Hardware limit: 221M/sec
60 FPS: 3.6M/frame
• 30 FPS: 7.2M/frame
• 2D Game
Alpha-blend heavy
• Hard to utilize Z-buffer
62. Fillrate Optimization
• Reduce overdraw
Use Z-buffer for strictly opaque
objects
• Modify art asset guideline