3x3 slider puzzle problem

Discussion and feedback on Construct 2

Post » Tue Jan 19, 2016 2:01 pm

Hello!

I'm making a 3x3 slider puzzle game and have ran into a problem: I just leaned that the pieces can be layed out in an unsolvable way so I need some way for the game to check if the current order of bricks is possible to solve. Has anyone made a game like this before?
B
32
S
10
G
6
Posts: 259
Reputation: 6,776

Post » Tue Jan 19, 2016 3:07 pm

Haven't made a game like this before. However in the free e book: level 0 for C2 it goes over a jigsaw game. In it it confines the pieces within a box and gives each piece random angles and shoots it as a bullet to mix them up.

My thoughts are that you could create the puzzle assembled and then randomly change the angles about 90 deg while making them all bullets. If done for a long enough time it could jumble up the puzzle, but only in a way that is repeatable to get back to where you started.
B
4
Posts: 4
Reputation: 204

Post » Tue Jan 19, 2016 4:14 pm

Thanks for answering :) However, the jigsaw game is nowhere close to what I'm trying to do. I'll keep trying and if I solve it I will post what I did.
Thanks again.
B
32
S
10
G
6
Posts: 259
Reputation: 6,776

Post » Tue Jan 19, 2016 6:23 pm

This video shows what I need to do:
https://www.youtube.com/watch?v=TKXiHdgOHaU

Just can't figure out how to do it :)
B
32
S
10
G
6
Posts: 259
Reputation: 6,776

Post » Tue Jan 19, 2016 6:48 pm

What you do is start the puzzle in a solved state then have it do 100 random moves to jumble it up, that way it's known to be solvable.

viewtopic.php?f=147&t=164031&p=992987&hilit=15+puzzle#p992987
B
92
S
32
G
109
Posts: 5,291
Reputation: 70,993

Post » Tue Jan 19, 2016 8:13 pm

Yep that was way easier, now my headache is gone :D Thanks!
B
32
S
10
G
6
Posts: 259
Reputation: 6,776


Return to Construct 2 General

Who is online

Users browsing this forum: matriax, sunisa2532 and 22 guests