Game Development Reference
In-Depth Information
The game - Stone Age
This is a match-three game. You know, the kind of game that is making a couple of com-
panies a gazillion dollars and making a gazillion other companies clone those games in or-
der to earn a couple of dollars. Yes, that game!
You must match three or more gems. If you match more than three, a random gem bursts
and turns into a diamond, which you collect for more points.
The game has a timer, and when time runs out, it's game over.
I used pretty much the same structure as in the previous games in this topic. But I broke it
into separate modules so it's easier for you to use the code as a reference.
We have a MenuScene and a GameScene item. I have pretty much all Cocos2d-x ac-
tions in one module called GridAnimations and most of the interactivity inside another
module called GridController . And all object pools are kept inside a class called Ob-
jectPools .
This is a grid game, so it's perfect to illustrate working with table arrays in Lua, and its
main advantages over C++: it's much easier to create and memory manage dynamic lists
(arrays) in Lua. This flexibility, aligned with Cocos2d-x's awesomeness, make for very rap-
id prototyping and development. The actual game will look like this:
Search WWH ::




Custom Search