Please help with my first Jigsaw puzzle game

franken2778franken2778 Member Posts: 54
edited February 2012 in Working with GS (Mac)
Hi Guys,

I´m making a jigsaw puzzle game and I want to add the following functionality:

1- When a piece of the jigsaw is placed on the right position I want it to stuck in place so it cannot longer be movable.
2- The next piece is going to be created once the previous piece is placed in the right position
3- Once the jigsaw is completed the player will be directed to the next level (game has three levels)
4- I have a countdown for 20 seconds to finish each jigsaw, once timer goes to zero I need to display an animation of 2 images (two pieces getting together stating that player ran out of time)

Well, I have some ideas about how to develop my game but I’m pretty new to game salad, what would be the best way to do it? I’m thinking about making an invisible actor for each piece (I mean to put a piece on the right position and other piece will stuck to it once it is put in the right place) but I need direction on how to do that, I know probably I’ m asking too much information but guys I really need your help with the topics I mentioned before, I’ll really appreciate if you take the time to give me some ideas to complete the four steps previously mentioned

Comments

  • fzeedfzeed Member Posts: 247
    I have that template, it works really well for me. I just made a few changes to suit my needs. Its well worth the money. I learn some new tricks as well!
  • franken2778franken2778 Member Posts: 54
    Thank you tshirtbooth; man believe me, almost all I know so far about Gamesalad is because of you and your great videos and posts , thanks for sharing all your knowledge with us and I’m more than sure that life will reward you big time for being such a kind person, I’ll try what you recommended and will let you know. Thanks again pal.
  • franken2778franken2778 Member Posts: 54
    I’ll go for the template right away tshirtbooth and will ask you for help in other steps if needed
  • SAZ_1SAZ_1 Member Posts: 397
    yep templates the right way to go ... tshirtbooth's the man!
  • franken2778franken2778 Member Posts: 54
    Thank you guys, purchasing already! ^:)^
  • fzeedfzeed Member Posts: 247
    I always use the templates as sort of a base, then modify them from there.
  • franken2778franken2778 Member Posts: 54
    Hi tshirtbooth, could not purchase the template yet; need to activate some feature with my card to allow online purchases, weird but I’ll need to go to the bank tomorrow. I’ll work on my game later today and will come to you with any questions till I’m able to get the template. Thanks!
  • franken2778franken2778 Member Posts: 54
    Hi Tshirtbooth, I´ve been trying to do your first recommendation but seems I´m doing something wrong, I´m supposed to make the attribute for the section I´m about to place in the right spot correct? I´m sorry but promise you once I learn how to use all GS stuff I won´t bother this much, I´ll appreciate a step by step for dummies in this first concern ^:)^
  • franken2778franken2778 Member Posts: 54
    Hi Tshirtbooth, I think I'm making it, can drag my 1st piece, now I need to know how to set or stop the piece in the right spot, I know I have to change the attribute drag to 0 when the piece is in the right position but can I specify a y and x? I tried making the piece collide with the other piece and then change the atribute but it does not work since as soon my piece touch anywhere the spot it stops moving
  • franken2778franken2778 Member Posts: 54
    I'll try that right away, I have 13 consecutive hours working on my game and I have achieved many of my initial concerns, thanks my friend I'll let you know how it goes :D
  • franken2778franken2778 Member Posts: 54
    Ok Tshirtbooth, I made a invisible piece and placed it in the right position to get the correct x and y for the piece I'm working on, these are the details:
    Position x=170.9688
    Position y=621.7305

    Question, the attribute self.distance is a self attribute for my piece right? if so could you please let me know if this would be the right rule:

    if self.distance is greater then magnitude(self.position.x-game.170.9688.x,self.position.Y-game.621.7305.Y)

    interpolate self.positionX to 170.9688.X
    interpolate self.positionY to 621.7305.y

    I really appreciate it man!
  • franken2778franken2778 Member Posts: 54
    Hi Tshirtbooth, Finally I was able to purchase your template; I'll check it as soon I get home to see how it was made in order to adapt rules to my game. Thanks man!
  • franken2778franken2778 Member Posts: 54
    Hi Tshirtbooth, trying to work with your template but it has many rules and functions, I just need to be able to drag my pieces, put them in the right position and then lock them down, I can see your template has all of them (and more advanced ones), Could you please guide me? let's say I'm working in the first piece of my jigsaw and it has to be placed on Position x=170.9688 Position y=621.7305 and then lock it down. I'm playing a little bit with your jigsaw to try to figure out the best way to edit it. Thanks pal.
  • franken2778franken2778 Member Posts: 54
    I made it my friend! I was able to make the first level of my jigsaw thanks to your template and video, I really appreciate your patience through all this process, you are the MAN!!! ^:)^
  • franken2778franken2778 Member Posts: 54
    Hi again Tshirtbooth, having a little problem now, I created the behavior self distance to spot 600 (in your template it is 555) , my function if close to the spot in 1st piece is:
    self.distance to spot is less than 600 the I interpolate the piece and everything works great, the problem is with 2nd piece, I do exactly the same but it goes to respective spot regardless of the place I released it, lets say I'm not even close to the spot and release the piece and it then moves to the spot.

    I try to put it to self.distance to spot is less than 40 but it does not work, happens the same the piece goes to the spot even if it is far away from it. Please help!
  • franken2778franken2778 Member Posts: 54
    Hi tshirtbooth,

    Do you think my problem could be that I'm not using the function to return my piece to start position? I do not need that so I'm not using the function on your template which declares that if distance from spot is >than 40 the return to Self. Start.X (if NOT close to the right spot), I don't know if that could be the reason why things do not work, pieces goes to the right spot even if touch is released far away.
  • GLGAMESGLGAMES SingaporeMember Posts: 988
    the whole jigsaw puzzle size is how big in the first place? the distance for each individual puzzle pieces should not intersect with the rest. Or could you have left out the distance checking rule in the following pieces ? So it ends up anything you drag and release it will just snap into the correct position automatically.
  • franken2778franken2778 Member Posts: 54
    Thanks tshirtbooth, GLGames the jigsaw area is 576px width and 720 px height; it has 6 pieces and they are pretty much of the same size. Behavior distance from spot is set to a value of 600, the distant checking rule was modified according to the final position of each piece. Now, I'm making my jigsaw with a rule that creates (spawn) the next piece once the previous piece is locked in the right placed, the following pieces are all created in the same position than the first or previous piece. I've been trying to figure it out for about 6 hours now. Any recommendation? Thanks my friend ^:)^
  • franken2778franken2778 Member Posts: 54
    edited February 2012
    Forgot to mention that the 6 pieces totally cover the 576px width and 720 px height area. Only the 1st piece acts as desired. Thanks!
  • franken2778franken2778 Member Posts: 54
    And now with only 1 click to the pieces they start getting fired to all spots like bullets!! :((
  • franken2778franken2778 Member Posts: 54
    edited February 2012
    Any idea guys? What about if I just make a tiny actor for every piece and put it on a strategic spot and then when "piece 1 collides or overlaps with actor- interpolate self.position X and y with right spot position" after that I think I could use tshirtbooth's rule "lock section down", what do you think? Now the attribute " distance from spot" I created is a real attribute (cause I saw that on TSB template) should this be an index attribute? Thanks guys, if I figure this out I promise I won't be bothering for a very long time
  • franken2778franken2778 Member Posts: 54
    Hi guys,

    I made it! I took a really good rest (slept for about 6 hours, something I haven't been able to do for the last 2 weeks) and started seeing things clearly, thank you guys for your support and patience, this is by far the best community I've ever visited. You are simply great, all of you, all those who take the time to read the threads and bring help to others. Long life to Gamesalad's Forums, developers, sous chefs, members!
  • Hey Guys,
    I got TSB template for jigsaws and have been tweaking it for a master's research
    project that is due in a week, but I can't get it to work quite right.
    I've triple checked all the settings between the template project and mine
    to make sure that I'm not missing something simple. The issue I'm having
    with my test project is when I take the draggable piece to put it over the
    outline it won't lock down on the outline. Since it is a test, I'm just
    using one puzzle piece of a frog both are sized at 512 x 512. At this
    point, the sizing is the only thing I can think of that would be causing
    the issue. So my big question is how did you set up the interpolation in
    the fulloutline actor (i.e. what are the numbers representing).
Sign In or Register to comment.