Puzzle help

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
xNick1
Party member
Posts: 267
Joined: Wed Jun 15, 2016 8:27 am
Location: Rome, Italy

Puzzle help

Post by xNick1 »

Hi guys!

This is my first post here.
Nice to meet you all!
I tried to make some stuff about a year ago but I didn't succeed.

I recently tried to follow some tutorials, and I've made a pong clone and a space invaders clone so far!

I'm now trying to make a puzzle.

If you recompose the entire image with the pieces put in random order by the game, you win.

Image

I'd like it to be kind of this puzzle, but with a picture.

I tried to write something, here's the link to the love file: https://www.sendspace.com/file/ivo3n4
I'm a little unsure about how to handle the pieces to move.
I generally have a character and I move it with the wasd keys, but with the puzzle I'd have to select a piece to move first!
What's the best way to handle that?

Any suggestions in general about how to make a puzzle?

Thank you for your patience :D

Edit: I'm sorry, I attached the file
Puzzle.love
(1.5 MiB) Downloaded 70 times
Last edited by xNick1 on Wed Jun 15, 2016 4:46 pm, edited 2 times in total.
User avatar
pgimeno
Party member
Posts: 3548
Joined: Sun Oct 18, 2015 2:58 pm

Re: Puzzle help

Post by pgimeno »

No need to select a piece to move first. There's always at most 4 possible moves. Think of it as moving the hole.

Edit: If you still prefer the player to select a piece, there's only at most 4 pieces that can be moved, and each of them can move in just one direction, so there's nothing else the player needs to do after selecting a piece. That can be done with a square moving around the puzzle. However I'm used to puzzles that require me to move the hole, or to move the piece, like this one: http://www.chiark.greenend.org.uk/~sgta ... fteen.html

Edit2: Please attach the .love file to the post next time. Having to solve a captcha to get the file is annoying.
User avatar
4aiman
Party member
Posts: 262
Joined: Sat Jan 16, 2016 10:30 am

Re: Puzzle help

Post by 4aiman »

pgimeno wrote:Having to solve a captcha to get the file is annoying.
It's off-topic, but... what captcha? Didn't see anything that can't be ignored :)
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Puzzle help

Post by zorg »

4aiman wrote:
pgimeno wrote:Having to solve a captcha to get the file is annoying.
It's off-topic, but... what captcha? Didn't see anything that can't be ignored :)
Maybe it only gives you a captcha sometimes; It's still jumping through hoops with sendspace and other "shit tier" hosters; even mediafire is starting to get worse; mega's tolerable, but if the forums allow attachments, then one should do that istead, as how the op fixed it.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
4aiman
Party member
Posts: 262
Joined: Sat Jan 16, 2016 10:30 am

Re: Puzzle help

Post by 4aiman »

I agree, that attachments should be used for the purpose of adding a file.

But what I'm trying to say is "getting rid of anything irrelevant is not that difficult".
RequestPolicy+NoScript+RefControl and you'll be able to easily tell apart what you have to see and fill in and what is shown to you only to make you believe you need a *pro* account and doesn't really mean anything ;)

Here's how it looks like for me:
test.png
test.png (116.97 KiB) Viewed 4370 times
All I have to do is to click on the "Download" button and to save my file:
Снимок экрана_2016-06-16_23-33-19.png
Снимок экрана_2016-06-16_23-33-19.png (15.38 KiB) Viewed 4370 times
No captcha, no ads no irrelevant info. :awesome:

I'd say it's the responsibility of the one who downloads stuff to keep things he/she doesn't want to see away ;)
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Puzzle help

Post by zorg »

In a perfect world, there would be no need for these kinds of things, but alas.
(AdBlockPlus and uMatrix here)
Image
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
pgimeno
Party member
Posts: 3548
Joined: Sun Oct 18, 2015 2:58 pm

Re: Puzzle help

Post by pgimeno »

I'm a TOR user, and it's likely that some TOR exit node was used for multiple downloads, which were confused with bot activity because they were all done from the same IP, so I was asked to confirm I was not a bot.

Anyway, to the OP: do you have an idea now on how to move the pieces?
User avatar
xNick1
Party member
Posts: 267
Joined: Wed Jun 15, 2016 8:27 am
Location: Rome, Italy

Re: Puzzle help

Post by xNick1 »

Hey guys,
I made some progress.
Could you check it?

I'm not sure about how to move the pieces.
When I try to move the pieces, everything goes in a wrong direction xD

Thank you :D
Attachments
Puzzle.love
(1.5 MiB) Downloaded 71 times
Xugro
Party member
Posts: 110
Joined: Wed Sep 29, 2010 8:14 pm

Re: Puzzle help

Post by Xugro »

You could take a look at my code. Just click on the piece you want to move. If you manage to get every piece into position it shows you the complete picture.

The idea is that you look at which piece a player clicks. If the empty space is next to it, then you switch the places of the clicked piece and the empty space.
Attachments
moving_puzzle.love
(97.26 KiB) Downloaded 65 times
User avatar
xNick1
Party member
Posts: 267
Joined: Wed Jun 15, 2016 8:27 am
Location: Rome, Italy

Re: Puzzle help

Post by xNick1 »

Xugro wrote:You could take a look at my code. Just click on the piece you want to move. If you manage to get every piece into position it shows you the complete picture.

The idea is that you look at which piece a player clicks. If the empty space is next to it, then you switch the places of the clicked piece and the empty space.
Thank you! =)
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 39 guests