Archived

This topic is now archived and is closed to further replies.

PuyoPuyo Clone problem

This topic is 5507 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im making a puyo puyo clone (same game as kirbys avalanche and dr robotniks bean machine for those who ahvent heard of it). This page offers a good explanation of what it is. So now i have a grid full of blocks. I need to get rid of bunches. And then any blocks that can fall have to, and then more bunches might need to be gotten rid of. Im brainstorming on how to implement this, and need some help. So far im thinking like this: a function delete_bunches gets passed a list of coordinates. This list is all the pieces that have moved. A function is called with each coord which determines if it has 4 pieces touching it (a recursive flood fill kinda thing im thinking). If it has, then a function is called which deletes it. It goes through each coord and does this. then the pieces fall. where they fall to is recored in another list and the function calls itself again. it stops when each piece in the list isnt touching at least 4 pieces. another alternative would be to go through the whole grid each time instead of using a list, but the list seems like a nice optomization. this to me seems like the only way to do it. if you see any problems with this, or can think of a better way, plese let me know.

Share this post


Link to post
Share on other sites