Glitchy tiles on slider puzzle

FrontRoomGamesFrontRoomGames Member Posts: 116
edited August 2012 in Working with GS (Mac)
got my puzzle game done, but now when i go to move the pieces they're all like glitchy sometimes and don't move very smooth.
I did tsb tutorial on movement and tutorial on keeping pieces from moving thru each other when your moving them around.

Thanks for any help you may have.

Comments

  • rhinokeyrhinokey Member Posts: 158
    what is it with all the vague calls for help? you can tell us how you made them move, what rules, maybe a vide, some screens of your rules.

    you mention a tutorial, but don't even post a link to it, I'm not going to go search around try and find a video that may or may not be the one you followed. and then try and imagine all the ways it could have got messed up.

  • FrontRoomGamesFrontRoomGames Member Posts: 116
    sorry, i wasn't thinking about that. I thought i was describing it good enough.

    heres a video of what its doing [URL=http://tinypic.com/r/6f10z9/6]View My Video[/URL]

    screens of the code.
    [IMG]http://i50.tinypic.com/opy4is.png[/IMG]
    [IMG]http://i46.tinypic.com/5v0p3d.png[/IMG]
    [IMG]http://i49.tinypic.com/10y0668.png[/IMG]
    [IMG]http://i45.tinypic.com/uslc6.png[/IMG]
  • rhinokeyrhinokey Member Posts: 158
    that should be better :) i'm at work now but i'll look over it when i get home, see can i figure out any problems,
  • FrontRoomGamesFrontRoomGames Member Posts: 116
    thanks man! I just have no idea what to do to smooth it out. I've played with some numbers and stuff but its always the same.
  • FloridaGamesFloridaGames Member Posts: 328
    -Make a table identical to your puzzle(rows and columns) all booleans. Call it Puzzle1. Check the box the corresponds to the empty slot( should only have 1 checked box)
    -give all your pieces a row and column integer attribute.
    -assign all pieces the column/row attribute corresponding to its position on the board.
    -make a integer attribute self.desired position
    -give the pieces 4 boolean attributes (up,down,left,right) *all false
    -add four constrains (self.up to "tablecellvalue(puzzle1,self.row+1,self.column)")
    -do the same for the other boolean except for down use self.row-1, for left self.column-1, for right self.column+1.
    -create a rule: when actor receives event touch:
    add four rules within the rule:
    if self up is true:
    change table value: puzzle1, self.column, self.row to true.
    change table value: '', self.column-1, '' to false
    change attribute self.desired position to self.postion.y+100
    interpolate self postion y to self.desired position.

    make 3 other similar rules for down right left, changing the needed numbers.
  • rhinokeyrhinokey Member Posts: 158
    forgot about this last nite, got wrapped up in trying to put a multiple player profile system in my project. but it seems florida has you hooked up
  • FrontRoomGamesFrontRoomGames Member Posts: 116
    -Make a table identical to your puzzle(rows and columns) all booleans. Call it Puzzle1. Check the box the corresponds to the empty slot( should only have 1 checked box)
    -give all your pieces a row and column integer attribute.
    -assign all pieces the column/row attribute corresponding to its position on the board.
    -make a integer attribute self.desired position
    -give the pieces 4 boolean attributes (up,down,left,right) *all false
    -add four constrains (self.up to "tablecellvalue(puzzle1,self.row+1,self.column)")
    -do the same for the other boolean except for down use self.row-1, for left self.column-1, for right self.column+1.
    -create a rule: when actor receives event touch:
    add four rules within the rule:
    if self up is true:
    change table value: puzzle1, self.column, self.row to true.
    change table value: '', self.column-1, '' to false
    change attribute self.desired position to self.postion.y+100
    interpolate self postion y to self.desired position.

    make 3 other similar rules for down right left, changing the needed numbers.
    thank you for this help!

    only one question. Im working on it now, and when you say add four rules within the rule do you mean like click create rule 4 times and just drag them into each other or what cause I'm confused at the 'if self up is true' part.
  • rhinokeyrhinokey Member Posts: 158
    make a rule, and set it to be "when touch is pressed"
    then make a rule inside of it. you may have to drag it into it.. i cant remember off hand if you can create one inside with the quick rule button. i just drag from the behavior list.
    when you put the other rules in make sure they are inside the original ones, but not inside each other, so its one rule with 4 inside it, not 4 all stacked inside of each other.
  • FrontRoomGamesFrontRoomGames Member Posts: 116
    thats what i was wondering , I'm working on it now then! hopefully it'll work like i think it will.
  • FrontRoomGamesFrontRoomGames Member Posts: 116
    did all that but now when i click on a piece it will move but only up or down. they don't go to the right spot. heres some screens of what i did.

    [IMG]http://i47.tinypic.com/346kk5v.png[/IMG]
    [IMG]http://i45.tinypic.com/714igg.png[/IMG]
    [IMG]http://i45.tinypic.com/2u9ljxh.png[/IMG]
Sign In or Register to comment.