Scrolling Question

ZackGSZackGS Member Posts: 313
edited November -1 in Working with GS (Mac)
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

Comments

  • ZackGSZackGS Member Posts: 313
    bump..
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    how much have you increased the speed?

    I would try adding the full scrolling speed to the current speed.
  • ZackGSZackGS Member Posts: 313
    tenrdrmer said:
    how much have you increased the speed?

    I would try adding the full scrolling speed to the current speed.

    Yeah, even doubled and tripled it, doesn't seem to make any difference.
  • PhoticsPhotics Member Posts: 4,172
    Are you trying to do Parallax scrolling?

    If this is a problem about enemy movement, do you have a maximum speed set?
  • ZackGSZackGS Member Posts: 313
    Just basic scrolling. background moves left then resets.

    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
  • PhoticsPhotics Member Posts: 4,172
    ZackGS said:
    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

    That can't be right. That's the correct solution to this problem. So the question is... why isn't that working?

    I'm going to send you a possible solution to this.
  • ZackGSZackGS Member Posts: 313
    Photics said:
    That can't be right. That's the correct solution to this problem. So the question is... why isn't that working?

    I'm going to send you a possible solution to this.

    My thoughts exactly, Thanks, help is appreciated
  • PhoticsPhotics Member Posts: 4,172
    ZackGS said:
    My thoughts exactly, Thanks, help is appreciated

    I'm going to post it here... as private messaging ruined the formatting...

    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.
  • ZackGSZackGS Member Posts: 313
    Photics said:
    I'm going to post it here... as private messaging ruined the formatting...

    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 I will give it a go
  • ZackGSZackGS Member Posts: 313
    Edit : it turns out i was being a moron. The idea i mentioned above does actually work. I stupidly had Max speed checked and set to 100. Never remember doing that, but changing that to the correct 200 speed fixed it.

    Thanks anyway guys and sorry for being such a tool :P
Sign In or Register to comment.