[project1dev] Re: Project1 - SVN Update 478

  • From: Kent Petersen <kentkmp@xxxxxxxxx>
  • To: project1dev@xxxxxxxxxxxxx
  • Date: Wed, 11 Nov 2009 21:50:09 -0800

The part I am currently having a problem with is the swapping process. I
think I got everything else figured out.

On Fri, Nov 6, 2009 at 9:18 AM, Alan Wolfe <alan.wolfe@xxxxxxxxx> wrote:

> hey kent what about something like this...
>
> #1 - have a variable called something like PuzzlePeiceSelected.  Set it to
> -1 to start out meaning "no puzzle peice selected"
>
> #2 - when an image is clicked it checks the PuzzlePeiceSelected variable.
> If it's -1, it sets it to whatever the current peice is.  If it's not -1 it
> does the swap.
>
> I think what you will need to do too is for each puzzle peice have 3
> variables...
>
> XPos  - the peice's current X position
> YPos - the peice's current Y position
> Rot - the peice's current rotation
>
> that way you'll know what the location should be when you swap image
> locations.
>
> That info will be useful too for being able to tell if the player has won
> (they have won when all the xpos and ypos and rot variables match what they
> should for the puzzle solution).
>
> A nice spit and polish touch might be showing which puzzle peice is
> currently selected.  This might be able to be done pretty easily by making
> an image that is just a white rectangle.  You can either set it's color to
> yellow from in script, or set it's color to red 1.0 and green being sin
> (Time).  If you do the 2nd way, the rectangle outline will pulsate from red
> to yellow and back and might look kinda neat.
>
> Another nicety would be instead of the puzzle peices rotating in one frame,
> having them spin over time to their final position (so like it might take 10
> frames to rotate to the new orientation).
>
> Just some thoughts tho :P
>
>
> On Wed, Nov 4, 2009 at 7:28 PM, Apache User 
> <dhapache@xxxxxxxxxxxxxxxxxxx>wrote:
>
>> User:korgath
>>
>> Message: puzzle piece code is in here. uploading progress.
>>
>> <Files Changed>
>> U   Scripts/Personal/Kent/crushtest.lua
>>
>>
>>
>

Other related posts: