Page 1 of 1

Z offset

PostPosted: Sun Jan 08, 2006 3:02 pm
by Game A Gogo
How do you make an object move slower then the screen when the screen move, just like the background in super mario bros 2??

its ot make it look more 3-D??

PostPosted: Sun Jan 08, 2006 3:08 pm
by Novice
Type in parallax scroling in the forum search. BeyondTheTech made a small demo.

PostPosted: Sun Jan 08, 2006 3:13 pm
by Game A Gogo
thx

PostPosted: Sun Jan 08, 2006 3:15 pm
by Game A Gogo
I cant download it

PostPosted: Sun Jan 08, 2006 3:16 pm
by Game A Gogo
do you know the script to do it?? if so, please tell me

PostPosted: Sun Jan 08, 2006 3:31 pm
by Novice
I dont know the exact script but it goes something like
Code: Select all
bkg.x=view.x/50;

that should make the background slide slowly while you move the view, play around with it.

PostPosted: Sun Jan 08, 2006 5:09 pm
by Game A Gogo
thx a LOT!!!
ill try it when ill do my game

PostPosted: Sun Jan 08, 2006 6:56 pm
by Novice
I just tried it out and it works well. The leser number you use to divide, the slower the background seems to move.

PostPosted: Sun Jan 08, 2006 7:16 pm
by Game A Gogo
thx again!!

PostPosted: Mon Jan 09, 2006 7:34 am
by robin.deman
What i did was make a background and make it parent to the center view.
Than i made used sprites to make a background without collision.

Doesn't really look like scrolling but might give more depth to it.
Most games on mobile phones use it to fake it a little and keep the preformance up.

PostPosted: Fri Jan 13, 2006 10:19 pm
by Game A Gogo
that dos not seems to work, why??

PostPosted: Fri Jan 13, 2006 11:36 pm
by Game A Gogo
I made it work, for the code, you needed to replace "view" by:"(the name of the main actor )".