I want to create a game like this. I already thought about how I would manage the logic of this game but I can't find a solution. Any idea on how to develop a game like this?
Thanks all
Comments
tatiangMember, Sous Chef, PRO, Senior Sous-ChefPosts: 11,949
edited December 2012
Well, if you put each square in a table cell with a value for the type of square like this:
And have each square actor change it's own self.Type (index) to the table cell value for its own row and column, based on position and table layout...
Then, when touch is pressed, you would record the cell value where the player started dragging. With touch still pressed, you would check overlap (collision) and if the value of the cell of the actor being collided with is the same as the initial cell value, you would highlight the actor there. If not, you wouldn't.
The next step would be to limit the player to squares that are adjacent so that you can't drag your finger around the screen and connect similar types that are spread out from each other. You could do that by checking the last collision position (row, column) and the current collision position.
Wow...thanks a lot for the demo. I will take a look at it soon
Braydon_SFXMember, Sous Chef, Bowlboy SidekickPosts: 9,273
Since I've now seen this, I just have to add something here...with the help of Mr. @tatiang 's demo and our free Bejeweled demo over at GSHelper.com, this could be extremely neat.
Comments
And have each square actor change it's own self.Type (index) to the table cell value for its own row and column, based on position and table layout...
Then, when touch is pressed, you would record the cell value where the player started dragging. With touch still pressed, you would check overlap (collision) and if the value of the cell of the actor being collided with is the same as the initial cell value, you would highlight the actor there. If not, you wouldn't.
The next step would be to limit the player to squares that are adjacent so that you can't drag your finger around the screen and connect similar types that are spread out from each other. You could do that by checking the last collision position (row, column) and the current collision position.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx