Jump to content
  • Advertisement
Sign in to follow this  
ufinii

Need help for Super Puzzle Fighter-like game

This topic is 4565 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
Do you want to find all squares/rectangles, even overlapping ones? Or just one? And what size constraints apply?

Share this post


Link to post
Share on other sites
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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!