Pitfalls in IBA
Deep and tangled hierarchies
Diamond ring inheritance
Copy-paste code here and there
Special cases
“Warning: don’t touch this!”
Slide 11
Slide 11 text
Component-based Architecture
Each functionality is a game component
Data-driven method for objects creation
Design Patterns: “Favor composition over
inheritance”
Game Engine: Unity 3D
Slide 12
Slide 12 text
Player
WalkableObject
CollidableObject
FlyableObject
Enemy
WalkableObject
CollidableObject
FlyableObject
Slide 13
Slide 13 text
WalkableObject
CollidableObject
FlyableObject
Game
Components
Advantages in Lua
Lightweight, extensible, cross-platform
Robust
Freedom
Simply love it
Other programming languages?
Slide 17
Slide 17 text
Drawbacks in Lua
Most editors don’t support auto-completion code
Goodbye to debuggers & breakpoints
Hello to loggers & print()
No excuse for coffee break time
Slide 18
Slide 18 text
Don’t use CBA... yet
CBA can’t save the (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 19
Slide 19 text
Pitfalls in 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