I made this platform game that was pretty good but at first it was too long to upload and was jerky. So I reduced its size a lot but it still won't perform well. It's because of a scene change problem.
When my character touches the edge he's teleport to the opposite side of the screen and the scene changes to the next one. This way he's not on the same side he was before. There is a lag before it changes but it doesn't matter when changing x.
But when my character falls down to the edge or hops up to the edge, because of the lag it messes up and doesn't change the scene fast enough. As a result my character changes its y position before the scene changes into the next. It will work for the first fall but otherwise it messes up my character and it ends up touching both sensors which teleports my character from top to bottom over and over again. I need a good programmer to find a fix for this: here is the link http://scratch.mit.edu/projects/bullelk12/2792796
Last edited by bullelk12 (2012-09-21 18:27:13)
Offline
ok ill try
Offline
err there isnt lag it may be your client but
the bug where you fall then go to the ceiling happened once
try making it so when you go down
you fall next room not on the ground but not at the top
slightly under the top so you cant hit the sensors
Offline
thats ok
Offline
Here is the script:
Don't worry my scripts have velocities.
when gf clicked set [xvl v] to [0] set [yvl v] to [0] forever switch to costume [sensor v] if <color [#0042FF] is touching [#000008]?> set [yvl v] to [0.1] end if <key [up arrow v] pressed?> if <color [#0042FF] is touching [#000008]?> set [yvl v] to [15] end end if <color [#FFFF00] is touching [#000008]?> set [yvl v] to [-2] end if <key [right arrow v] pressed?> change [xvl v] by (1) if <color [#00FF52] is touching [#000008]?> set [xvl v] to [-1] end end if <key [left arrow v] pressed?> change [xvl v] by (-1) if <color [#FF0000] is touching [#000008]?> set [xvl v] to [1] end end set [xvl v] to ((xvl) * (0.9)) change x by (xvl) change y by (yvl) switch to costume [ball v] change [yvl v] by (-1) endHope this works.
Offline
bullelk12 wrote:
I made this platform game that was pretty good but at first it was too long to upload and was jerky. So I reduced its size a lot but it still won't perform well. It's because of a scene change problem.
When my character touches the edge he's teleport to the opposite side of the screen and the scene changes to the next one. This way he's not on the same side he was before. There is a lag before it changes but it doesn't matter when changing x.
But when my character falls down to the edge or hops up to the edge, because of the lag it messes up and doesn't change the scene fast enough. As a result my character changes its y position before the scene changes into the next. It will work for the first fall but otherwise it messes up my character and it ends up touching both sensors which teleports my character from top to bottom over and over again. I need a good programmer to find a fix for this: here is the link http://scratch.mit.edu/projects/bullelk12/2792796
Want?Here it is!
when gf clicked set [xvl v] to [0] set [yvl v] to [0] forever switch to costume [sensor v] if <color [#0042FF] is touching [#000008]?> set [yvl v] to [0.1] end if <key [up arrow v] pressed?> if <color [#0042FF] is touching [#000008]?> set [yvl v] to [15] end end if <color [#FFFF00] is touching [#000008]?> set [yvl v] to [-2] end if <key [right arrow v] pressed?> change [xvl v] by (1) if <color [#00FF52] is touching [#000008]?> set [xvl v] to [-1] end end if <key [left arrow v] pressed?> change [xvl v] by (-1) if <color [#FF0000] is touching [#000008]?> set [xvl v] to [1] end end set [xvl v] to ((xvl) * (0.9)) change x by (xvl) change y by (yvl) switch to costume [ball v] change [yvl v] by (-1) end
Offline