Pitfalls of IBA
Deep and tangled hierarchies
Diamond ring inheritance
Copy-paste code here and there
Special cases
Magic: don’t touch it
Slide 12
Slide 12 text
Component-based Architecture
Each functionality is a game component
Data-driven method for objects creation
Design Patterns: “Favor composition over
inheritance”
Slide 13
Slide 13 text
Player
WalkableObject
CollidableObject
FlyableObject
Enemy
WalkableObject
CollidableObject
FlyableObject
Slide 14
Slide 14 text
WalkableObject
CollidableObject
FlyableObject
Game
Components
Don’t use CBA... yet
CBA can’t save your world
OOD can do good things too
Don’t make everything a component
Leave messy code alone
You might need an editor or tool
Slide 17
Slide 17 text
No content
Slide 18
Slide 18 text
Who Are Using Lua
Slide 19
Slide 19 text
Advantages of Lua
Lightweight
Extensible
Cross-platform
Robust
Openness
Community
Slide 20
Slide 20 text
Drawbacks of Lua
Most editors don’t support auto-completion code
Goodbye to debuggers & breakpoints
Hello to loggers & print()
No excuse for coffee break time
Slide 21
Slide 21 text
Pitfalls of Lua
Naming convention for global variables
Do garbage collection manually
Don’t forget to compile scripts & strip debug info
My Programming Trilogy
C++
Generic framework
Objective-C
iOS platform-specific
OpenGL ES implementation
Lua
Data description
Game logic
10%
65%
25%
C++ Lua Objectitve-C