Glitchy tiles on slider puzzle
FrontRoomGames
Member Posts: 116
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.
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
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.
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]
-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.
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.
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.
[IMG]http://i47.tinypic.com/346kk5v.png[/IMG]
[IMG]http://i45.tinypic.com/714igg.png[/IMG]
[IMG]http://i45.tinypic.com/2u9ljxh.png[/IMG]