• Advertisement
Sign in to follow this  

Need help for Super Puzzle Fighter-like game

This topic is 4477 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

Hi, I am working on a "Super Puzzle Fighter 2" clone. In this game you have different coloured gems. I have to find a good algorythm to find (when a gem is dropped) squares or rectangles of the same color formed by gems. Example: W=White; B=Blue; Y=Yellow YB YBB WBB (next move ->) WBB When an "agglomerate" is found I will have to change the textures to make a big tile. There is some good algorythm for finding those squares?

Share this post


Link to post
Share on other sites
Advertisement
Constraints are:

minimum size = 2x2 elements

Every rectangle that is at least that size is valid group. Elements in a group are all of the same "color".

One group can't be broken to "donate" gems to another group. Two groups can be merged to make a bigger group.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement