Sliding Tile Puzzle, please help.

Started by Weston_Kaunk, Wed 16/08/2017 04:47:27

Previous topic - Next topic

Weston_Kaunk

Hello everyone ^w^ know I've been out of the threads for a while, school and life stuff, I did keep to my projects though; which is why I'm asking about Sliding Tile Puzzles ^^

I'm still very new to coding and am trying to make a sliding tile puzzle similar to Bioshock's Hacking mini-game, any ideas how to format the code besides a massive "if" tree? So far I'm just sketching out pseudo-code in a notebook and all I can kinda think of is having a bunch of, (if x block is above y block or c or d or cd or sck).. and I'm getting the sense I'm doing it the harder-not-smarter way. Can anyone explain(baby-code talk, because I'm a simply person) how they set up their matrix's or whatnot to work for Sliding Tiles? mostly the 'how to store the info of what has moved where' and 'making specific patterns trigger stuff'. I thought it was going to be so easy as just copying a sliding tile game and making multiple win states, but ehhh, code is hard.

Your time and suggestions are very much appreciated ^^ thanks all and good day.
tldr: I say too much
http://westonkaunk.itch.io/

Kumpel


Kitty Trouble

It depends what you are trying to accomplish really. What patterns need recognizing and how is the puzzle set up?

Weston_Kaunk

Quote from: Morgan LeFlay on Wed 16/08/2017 12:03:28
It depends what you are trying to accomplish really. What patterns need recognizing and how is the puzzle set up?
I'm playing around with the idea of a modular map. Like the sliding tile puzzle shows each tile as a room, so I wanted to make it where the tiles would mark which other tile is adjacent and that would be pulled up in the script in any instance of room transition. For example, main room has one door, the tile that represents the main room only has it's right hand face that leads anywhere, when I have the right hand face of the tile next to another tile's left hand face, that main room's door will lead to that next tile's respective room. Sorry about the late reply, with work and family I only really get to crack open the program once a week. Again, thank you for your time ^^
tldr: I say too much
http://westonkaunk.itch.io/

Weston_Kaunk

Quote from: Kumpel on Wed 16/08/2017 11:16:10
Maybe this thread helps you.
exactly what I was looking for, ^^ thanks a heap. Going to give this a shot now and see what I can figure out, I'll keep you guys updated how it goes. peace
tldr: I say too much
http://westonkaunk.itch.io/

SMF spam blocked by CleanTalk