Jigsaw puzzle

This forum is meant for people to share their knowledge by writing their own tutorials for Adventure Maker.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

Jigsaw puzzle

Postby marina » Tue Jan 27, 2009 6:35 am

JIGSAW PUZZLE
(Thanks Imari, Lyberodoggy and Mercedes)

What you need to create the puzzle:

The image of the puzzle assembled
A transparent real-size gif for each piece
An icon for each piece and one for the assembled image
Variables corresponding to each piece

Given that the player has already the pieces of the puzzle in the inventory, this is what you should do with the frame where you want it to be reassembled:

Create as many hotspots as the pieces of the puzzle, smaller than the size of the real pieces (you can make one and duplicate it), and place them at the center of the area where each piece is supposed to belong; change the shape of the cursor in something that looks like an interactive point, as the cross or so.
Then follow this steps for each of them:

Open the ?Manage inventory items? option, drag the icon of the correct piece for that place, whatever it?s called, onto the hotspot frame and when the ?Hotspot properties? window opens go to the tab ?Variables? and set the corresponding variable?s value to become 1. Repeat this procedure for each hotspot. Do not forget to check the ?Remove the dragged item from the inventory? option in the ?Action? tab, otherwise the pieces will remain in the inventory together with the ones not yet placed!

Then create much bigger hotspots (they will automatically resize to fit the imported image) to be placed over the first set of hotspots and for each of them follow this steps:

After tracing the hotspot the ?Hotspot properties?window opens; in the tab ?General?, in the bottom, set the ?Hotspot appearance? as ?Picture?, DO NOT check the ?Resized to fit the hotspot size? option, and import the graphic file .gif corresponding, in the assembled puzzle, to the position of that hotspot. The frame will resize around the fragment and the missing parts will result in transparency that, overlapped on the contiguous pictures, will show what?s behind (Thanks Lyberodoggy!!!).
Then go to the ?Variables? tab and set the second option so that the hotspot should be visible only if the value of the corresponding variable is 1. Repeat this procedure for each hotspot.
While creating and giving properties to this second set of hotspots assemble them in the proper positions, so that the ripped edges fit each other.
In the end create a little ?Check hotspot? (thanks twice Lyberodoggy!), just the size of the cursor (whatever you?ll like it to be), that you will place somewhere suitable (if your image fills the whole frame, my advice is to make it a little smaller so as to save a little space for your ?check hotspot?).
In the ?Advanced? tab of this last hotspot enable VBScript and write this code:
If (variable name)=1 AND (variable name)=1 etc?(repeated for all the variables needed to complete the puzzle) Then Action.GoToFrame "(frame name containing the assembled image)"

I hope not to have forgotten anything, if you find mistakes please post here. I apologize for my bad english and... yes, I know that this tut may sound naive... but it's just what I'd have looked for at my small stage of knowledge...

P.S. I couldn't attach the project folder with the jigsaw realized, maybe depending on its size... anyway I hope that the text is clear enough. :)
I'm fond of Rhem-like games!
User avatar
marina
Member
 
Posts: 44
Joined: Sun Nov 23, 2008 8:27 pm
Location: Rome

Postby Lyberodoggy » Tue Jan 27, 2009 2:44 pm

Nice tutorial, should help a lot of users...

If you can't upload the project, you can zip it and/or upload in filefront, then link us to it :wink:
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby marina » Tue Jan 27, 2009 3:40 pm

:idea: Thanks for the tip! I didn't know the site.

I had modified my tutorial to make it clear even without looking at the project, but now I will add a few words for the users that wish to download it:

In my game when you take the map in pieces it becomes added to the inventory as a single object (of course, at your choice, you?ll let the player find the pieces separately in various locations as Imari?s chips). When the map is dragged onto the hotspot on the stone face it splits in separate pieces that will be added to the inventory; each of them must correspond to a variable. So, dragging the ?map in pieces? onto the stone face hotspot results both in having the separate pieces in the inventory and going to the frame where the player is expected to reassemble it.
The frame is called ?capitello zoom? and the tutorial is only refering to the work that has to be done on this frame.

I know that the fragments don't fit perfectly, but, apart from the fact that I don't know if it's possible to obtain, in my case I like some slight imperfection in the joining to give a more realistic impression.

The puzzle in the sample project is indeed far too simple? you can even see the edges of the pieces in the inventory without need of a lens. But it?s just a sample? in my game maybe the map will be ripped in 36 pieces, or 64? who knows :lol:

Map_jigsaw.rar:
http://files.filefront.com/Map+jigsawrar/;13109479
I'm fond of Rhem-like games!
User avatar
marina
Member
 
Posts: 44
Joined: Sun Nov 23, 2008 8:27 pm
Location: Rome

Postby Lyberodoggy » Tue Jan 27, 2009 5:22 pm

Bravo!
Very good :)
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby marina » Tue Jan 27, 2009 9:21 pm

Thanks! :D
I hope it will come in handy to some beginners like me!
I'm fond of Rhem-like games!
User avatar
marina
Member
 
Posts: 44
Joined: Sun Nov 23, 2008 8:27 pm
Location: Rome

Postby Imari » Wed Jan 28, 2009 12:59 am

Terrific, Marina. I'm glad that you finally were able to figure it out. And thanks for the tutorial. :D
User avatar
Imari
VIP
 
Posts: 872
Joined: Fri Jun 20, 2003 4:49 pm
Location: Virginia, USA

Postby marina » Wed Jan 28, 2009 8:03 am

With "a little" help from my friends Imari :wink: ...
You opened the way for me, thanks again! :D
I'm fond of Rhem-like games!
User avatar
marina
Member
 
Posts: 44
Joined: Sun Nov 23, 2008 8:27 pm
Location: Rome


Return to Post Your Own Tutorials

Who is online

Users browsing this forum: No registered users and 0 guests