[casual_games] Algorithm for creating puzzle game boards

Paul Steven paul_steven at btinternet.com
Tue Feb 24 07:09:02 EST 2009


Thanks Juan.

On the Noah's Ark game the intial game board includes isolated tiles as well
as groups with odd numbers of tiles. If I understand you correctly, your
solution would always have the matching tiles in a pair adjacent to each
other - is that correct?

I guess the algorithm for Mahjoong is something similar but a lot more
complex

Paul

-----Original Message-----
From: casual_games-bounces at igda.org [mailto:casual_games-bounces at igda.org]
On Behalf Of J R
Sent: 24 February 2009 11:57
To: IGDA Casual Games SIG Mailing List
Subject: Re: [casual_games] Algorithm for creating puzzle game boards

Since in this game you match from any point on the grid to any point
on the grid its fairly easy. Just generate in pairs. Shuffle the
positions about. So for a 16x16 grid which would have 256 spots on it.
You only need to create 128 random pieces. Then when you populate the
full grid make sure you create two pieces for every index on the 128
randoms you generated.

Games like Puzzle Quest would be different but it all depends on the
mechanics of gameplay.

Danke,
Juan
---
www.yanki.jp
"Pay2Play: Illinois Governor Edition" for iPhone out now.


On Tue, Feb 24, 2009 at 3:15 AM, Paul Steven <paul_steven at btinternet.com>
wrote:

> Does anyone have any resources on the algorithms for creating matching

> puzzle games like the Noah's Ark game on pop cap

> http://www.popcap.com/games/free/noahsark

>

>

>

> I am making a similar type of game and am struggling to come up with an

> algorithm to create the grid of tiles and ensure that whatever sequence of

> pairings the player makes, that there will be no scenario where it is not

> possible to find another pair. Basically the board needs to be such that

it

> is always possible to match all pairs in whatever order the user chooses.

> Well this is the impression I get of the Noahs Ark game - I have never

> encountered a situation where a pairing has not been possible - I just

> always run out of time.

>

>

>

> If anyone can enlighten me on how these kind of games are done it would be

> much appreciated. I am curious as to whether the game boards are randomly

> generated on the fly or they use hard coded game boards that have been

> thoroughly tested.

>

>

>

> Thanks in advance

>

>

>

> Paul

>

> _______________________________________________

> Casual_Games mailing list

> Casual_Games at igda.org

> http://www.igda.org/casual-subscribe

> Archive: http://www.igda.org/casual-subscribe

> Archive Search:

> http://www.google.com/coop/cse?cx=010373383720242846960%3Az3tdwggxil8

> List FAQ:

> http://www.igda.org/wiki/index.php/Casual_Games_SIG/Casual_Games_List_FAQ

>

>

_______________________________________________
Casual_Games mailing list
Casual_Games at igda.org
http://www.igda.org/casual-subscribe
Archive: http://www.igda.org/casual-subscribe
Archive Search:
http://www.google.com/coop/cse?cx=010373383720242846960%3Az3tdwggxil8
List FAQ:
http://www.igda.org/wiki/index.php/Casual_Games_SIG/Casual_Games_List_FAQ



More information about the Casual_Games mailing list