Game Development Community

Moving the background; depending on movement of the player

by Keith Mc Dowell JR · in Torque Game Builder · 06/06/2007 (9:03 am) · 5 replies

Hey,
I've playing around with a ship move and figure out how to move the ship in the directions it would need to go, but I want to also move the background depending on movement of the player

background

up/down +/- (2) px
right/left +/0 (2)px so it would give the impression that the player's world is moving in that direction, but the problme is.. I can not figure out how to make the map seem continuous, I get th blackscreen of death onces the background image reaches it viewing limits.

Any suggestions or coding sample would be most helpfull.
Thanks,

#1
06/06/2007 (9:28 am)
Have you tried using a scrolling background?
#2
06/06/2007 (9:35 am)
As Anthony has suggested I would use a scrolling background, you can then just alter the scrollSpeedX based on the simulated speed of the player.
#3
06/06/2007 (9:44 am)
Hmm,
When it was imported it was showing up as a static object. I see.. how do you import it as a scrolling background. I've been using gimp to come up with mock artwork.
#4
06/06/2007 (9:46 am)
Make sure it's power of two and it should show up under "Scrollers" automatically.
#5
06/18/2007 (11:03 am)
Another way of doing it, its using tiles...

when you do use tiles, you can control the pan speed of it, so, when your player moves to a certain direction, you can set the pan speed to be modified in the factor you want, and when your player stops, you can set the pan speed to Zero, so that it will stop moving.