Announcement: Be excellent to each other.


Caravel Forum : Other Boards : Crystal Shard Games : Rivers in Leylines
New Topic New Poll Post Reply
Poster Message
Danjen02
Level: Roachling
Avatar
Rank Points: 11
Registered: 11-08-2007
IP: Logged
icon Rivers in Leylines (0)  
I'm curious how these were programmed. They change appearance based on how many adjacent rivers there are, so there must be a large number of combinations, and I was wondering what the most efficient way to implement something like this was.

I'm working on a simple puzzle game, and the walls behave very similarly, and I anticipate 54 unique combinations (not 64, oddly enough...), and there's no way you'd do a check for each combination, there's gotta be a simpler way.

____________________________
SubTerra
- Ultimate rank
- 2009 level design contest, 2nd place
05-16-2011 at 08:43 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Radiant
Level: Moderator
Avatar
Rank Points: 142
Registered: 02-05-2003
IP: Logged
icon Re: Rivers in Leylines (0)  
Danjen02 wrote:
I'm curious how these were programmed. They change appearance based on how many adjacent rivers there are, so there must be a large number of combinations, and I was wondering what the most efficient way to implement something like this was.
Simply by checking the six adjacent squares, and drawing up to six partially-overlapping patches of water.

____________________________
= Radiant =
05-16-2011 at 11:23 PM
View Profile Send Private Message to User Visit Homepage Show all user's posts Quote Reply
Danjen02
Level: Roachling
Avatar
Rank Points: 11
Registered: 11-08-2007
IP: Logged
icon Re: Rivers in Leylines (0)  
I feel really stupid for thinking of this and then dismissing it as "too complex". Thanks Radiant!

____________________________
SubTerra
- Ultimate rank
- 2009 level design contest, 2nd place
05-17-2011 at 04:29 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
New Topic New Poll Post Reply
Caravel Forum : Other Boards : Crystal Shard Games : Rivers in Leylines
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.