[TIP] A Way To Create A Grid Based Game
Ever think about creating a Battleship or Score Four type game with GameSalad? The template posted here might help: http://gamesalad.com/game/play/79432
The project dynamically tracks occupied slots of a grid, with no need to "hard code" the slot numbers or available positions. You provide some of the basic positioning attributes, and the template takes care of the rest. You can then test an attribute attribute to see if a grid slot is occupied or available. Neat feature: pieces can be removed at will, and the template will track which ones (can't say if this feature will perform well on a grid with hundreds of pieces though...).
Hope this is useful.
The project dynamically tracks occupied slots of a grid, with no need to "hard code" the slot numbers or available positions. You provide some of the basic positioning attributes, and the template takes care of the rest. You can then test an attribute attribute to see if a grid slot is occupied or available. Neat feature: pieces can be removed at will, and the template will track which ones (can't say if this feature will perform well on a grid with hundreds of pieces though...).
Hope this is useful.
Comments
Just updated the project to fix a small bug that misreported the Y grid coordinate. Should be working correctly now.
(Again, using this technique you can use a single actor for your grid, and track all occupied slots in one attribute, instead of using separate grid tiles and multiple attributes.)
http://gamesalad.com/game/play/79432
http://gamesalad.com/game/play/30842
http://gamesalad.com/game/3228
-Josh
Hmm. Not what I thought it was.
So for example I clicked on the edge of 4,1 5 times, so 4,1 appeared on the 'Used Slots' 5 times.
strange, no?