Scrolling Question
![ZackGS](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
Hey guys.
I have scrolling set up in my game and it works fine.
1) I am using two 480x30 images to give the illusion of the floor scrolling
2) My main character doesn't move, just does a animation to simulate it.
3) My enemies do move from right to left until they reach the player or die.
However...
When my player isn't moving and the background isn't scrolling, they move toward the player at the expected speed, however... if i am moving and the background is scrolling, it looks like they are barley moving at all ? (they do get closer, but the speed looks nothing like it was before i started to move)
I have tried making them move faster when i move but to no avail? Why is this such a big issue ? Any workarounds ?
Thanks in advance
I have scrolling set up in my game and it works fine.
1) I am using two 480x30 images to give the illusion of the floor scrolling
2) My main character doesn't move, just does a animation to simulate it.
3) My enemies do move from right to left until they reach the player or die.
However...
When my player isn't moving and the background isn't scrolling, they move toward the player at the expected speed, however... if i am moving and the background is scrolling, it looks like they are barley moving at all ? (they do get closer, but the speed looks nothing like it was before i started to move)
I have tried making them move faster when i move but to no avail? Why is this such a big issue ? Any workarounds ?
Thanks in advance
Comments
I would try adding the full scrolling speed to the current speed.
If this is a problem about enemy movement, do you have a maximum speed set?
The guy moves fine when the background isn't scrolling, when it is scrolling it looks like he is barley moving though
Note : I am using the move rule at 100 speed. My enemy moves at 100 speed also. I tried setting his speed to 200 when the background was scrolling (and more) but it seemed to have no effect
I'm going to send you a possible solution to this.
A multiplier might work...
In the move behavior
100+(100*game.scrolling)
If right button is down
change game.scrolling to 1 (use a real or integer, not boolean)
otherwise change game.scrolling to 0
So if the game is not scrolling, there is no multiplier. With negatives and different values for the multiplier... something other than 100... maybe you'll get the effect you're looking for.
Thanks anyway guys and sorry for being such a tool :P