Change font size
It is currently Wed Oct 17, 2018 10:44 am

Forum rules


{L_IMAGE}



Post a new topicPost a reply Page 1 of 1   [ 7 posts ]
Author Message
 Post subject: jigsaw puzzle
PostPosted: Fri Aug 10, 2018 9:16 am 

Joined: Mon Feb 13, 2017 1:53 pm
Posts: 24
Hi again !
I've got another idea that I think is pretty simple to carry out
for someone with advanced scripting knowledge,
but I just can't figure it out.

Djphil was so kind to make a bilingual vocabulary memory game for me once:

Two matching words in the respective two languages must be matched by clicking them.
When the two words match, one of the two is moved on top of the other one.

The game is here: https://forums.osgrid.org/viewtopic.php?f=5&t=6116


On the basis of that script I think it should be possible to make a jiggsaw puzzle.
It can already be done through the above mentioned script:

One piece is the actual puzzle piece, with a texture of a piece from a photo /text /painting etc.
The other piece lies on the ground as a background for that picture, with no texture.
Several of these background pieces lie next to each other on the ground.

The script of each background piece matches one of the puzzle pieces.
When the two to matching ones are clicked,
the puzzle piece is moved onto its corresponding background piece,
and thus, it is in the correct place.

This is repeated with all other puzzle pieces until the puzzle is finished.


The problem is the following:
This makes it possible to randomly click pieces together,
without thinking.


What I would like to have is this:

Each puzzle piece can be matched with each background piece
and no correct solution is given in the script.
When a piece is clicked a second time, it moves back to its original position.

This means the player must solve the puzzle through looking and thinking.


Do you maybe have any ideas for this?
There might also be completely different approaches for this.

Thank you very much in advance!


Top
 Profile  
 
 Post subject: Re: jigsaw puzzle
PostPosted: Sat Aug 18, 2018 9:11 am 
Furious Typer
User avatar

Joined: Fri Mar 26, 2010 12:11 pm
Posts: 144
Location: Belgium / Brussels
This could made you happy! :) Source code available in github.

_________________
Webmaster @ digitalconcepts.free.fr & digigrids.free.fr


Top
 Profile  
 
 Post subject: Re: jigsaw puzzle
PostPosted: Sun Aug 26, 2018 8:44 am 

Joined: Mon Feb 13, 2017 1:53 pm
Posts: 24
Thanks, mate, this is exactly what I've been looking for.
I'm still having some trouble rebuilding it using the files from github,
since the Secondlife package is not transferable to OSGrid.
So, I'm still trying.
If you have any groundbreaking ideas of how to make it transferable to OSGrid
or what is important building it,
let me know.
But thanks very much, either way.


Top
 Profile  
 
 Post subject: Re: jigsaw puzzle
PostPosted: Mon Aug 27, 2018 9:26 am 
Furious Typer
User avatar

Joined: Fri Mar 26, 2010 12:11 pm
Posts: 144
Location: Belgium / Brussels
Well, the simplest thing I think is to start from the main script (puzzlefun.lslp) and to progressively go back up actions in the script.
But hey, 20 scripts to make this puzzle, it seems to me a lot of scripts. In my opinion, 2 or 3 scripts would be enough ...

_________________
Webmaster @ digitalconcepts.free.fr & digigrids.free.fr


Last edited by dj phil on Fri Sep 28, 2018 3:39 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: jigsaw puzzle
PostPosted: Thu Sep 27, 2018 4:57 pm 
Furious Typer
User avatar

Joined: Fri Mar 26, 2010 12:11 pm
Posts: 144
Location: Belgium / Brussels
So how are things going?
Did you manage to make this puzzle work?

_________________
Webmaster @ digitalconcepts.free.fr & digigrids.free.fr


Top
 Profile  
 
 Post subject: Re: jigsaw puzzle
PostPosted: Sat Oct 13, 2018 6:54 am 

Joined: Mon Feb 13, 2017 1:53 pm
Posts: 24
Hi again,
thanks for asking.

I haven't been successful so far.

I sort of managed to reverse-engineer it in Second Life and make it work.
But I haven't been able to rebuild it on OpenSim, and I can't really tell why.

Maybe there are some differences between the structure of Second Life and OSgrid that cause this.

edit: When saving the main script, there is the following error message:

Error CS0236: A field initializer cannot reference the nonstatic field 'SecondLife.XEngineScript.CLOSED'.



If you happen to have a ground-breaking idea, I'm always grateful.

Cheers!


Top
 Profile  
 
 Post subject: Re: jigsaw puzzle
PostPosted: Tue Oct 16, 2018 7:41 am 
Furious Typer
User avatar

Joined: Fri Mar 26, 2010 12:11 pm
Posts: 144
Location: Belgium / Brussels
To fix the compilation problem, you can proceed like this:
remplace:
{L_CODE}:
integer screenState=CLOSED;
by:
{L_CODE}:
integer screenState;
and add:
{L_CODE}:
screenState = CLOSED;
in the main default state_entry()

Same for:
integer gameState=GAME_OVER;
list randColors=[RED,ORANGE,PINK,PURPLE,BABYBLUE,YELLOW];

_________________
Webmaster @ digitalconcepts.free.fr & digigrids.free.fr


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 7 posts ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
610nm Style by Daniel St. Jules of Gamexe.net