View Full Version : [AS2] 3-in-a-row
bartroels
12-08-2008, 02:37 PM
For a school project I want to make a game like "Cradle of Rome", ie a grid with different blocks, you swap 2 blocks -->make a row or column of 3 --> those blocks dissapear --> are replaced by others (http://www.games.com/game/cradle-of-rome). I want to make it simple, eg a grid 5x5 with 5 different coloured blocks. I know about loading, unloading movieclips, a bit of OOP, etc.. but I don't know how to start programming this game.. anyone who already made this who can give tips how to start, what the philosophy is etc...? Or is there a ready to use tutorial which makes this game step-by-step?
Thanks!
Okay, I looked up that game, so it's also kind of like Bejewelled.
Basically you keep info on each piece in a 2D array, so you can compare adjacent pieces, and see if they match. If you know some OOP, maybe look up polymorphism, that's a big thing in my design philosophy; in this case, I'd make a basic piece class, and every type of piece would another class that extends that class, and just initializes the graphics and colour values differently.
bartroels
12-16-2008, 07:33 AM
thanks for your reply! I already read some books/articles on OOP and I really think I should start to use it in practice. I already made a rought version (without OOP) with 2D arrays and it already looks like something, but still a lot of work! I send you the final version when it's finished.
Bart
LeenieGames
12-16-2008, 09:52 AM
5 different colors is too many for a 5x5 grid. Your players will be getting stuck a lot. Also, 5x5 is a very small board.
You'll, of course, want to randomize the spawning of new pieces, but make sure they don't repeat more than twice or you'll end up with a game that plays itself.
Match-3s have become sort of a rite of passage for developers. It's been about 3 years since I made this one (http://leeniegames.com/games/PP_install.exe) for a client, but I still might remember enough about it to help you if you need it. Let me know.
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.