Page 1 of 1

How to make a scroller game

PostPosted: Mon Aug 29, 2005 8:00 pm
by Sabor Boricua
I want to make a side-scroller game. I already have the background and the main sprite (helicopter)--------But, I can't seem to make the environment to scroll to the right. Is there anybody that can help me make this happen?

PostPosted: Mon Aug 29, 2005 8:01 pm
by willg101
Make the player the view's parent.

PostPosted: Mon Aug 29, 2005 8:14 pm
by Sabor Boricua
willg101 wrote:Make the player the view's parent.


Tried that, but my goal is to make the scroller to scroll independently from the player.

PostPosted: Mon Aug 29, 2005 8:15 pm
by willg101
Ummm...
Give the view the same "key down/up" actions?

PostPosted: Mon Aug 29, 2005 8:23 pm
by BeyondtheTech
Make the background move by setting its xvelocity. You can also make the background x-infinite as needed.

But, I agree that the view should be set to the player, if at least within a number of pixels from the player. That way, the player is always on the screen, but moving within the view.

PostPosted: Tue Aug 30, 2005 4:58 pm
by Sabor Boricua
BeyondtheTech wrote:Make the background move by setting its xvelocity. You can also make the background x-infinite as needed.

But, I agree that the view should be set to the player, if at least within a number of pixels from the player. That way, the player is always on the screen, but moving within the view.


Since I'm new at the program, I don't know much about scripting. Can you give me an example or instructions on how to do it?

I tried it yesterday to no avail. But seriously, I'm in the dark here, don't know what I'm doing in terms of scripting the background to move........

PostPosted: Tue Aug 30, 2005 7:11 pm
by Game A Gogo
What I do Is:

I make a sprite(the size of the screen(Can be a Hud)) and on the ship make a physical respond whit the actor.

for the background In draw actor event:
Code: Select all
For up or down:yvelocity:(+=up,-=down);,For left or right: xvelocity:(+=left,-=right);


for the ship(so it can mouve):for going up in Key down event:
Code: Select all
y=y+(your number);
ect...