Author |
Message |
yodu123
|
Posted: Wed Apr 15, 2009 6:43 pm Post subject: scroll |
|
|
i`m doing a game that looks like Mario. but i don`t know how i can make the screen move as Mario runs. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
saltpro15
![](http://compsci.ca/v3/uploads/user_avatars/9776171634ced6278d14c2.png)
|
Posted: Wed Apr 15, 2009 8:14 pm Post subject: RE:scroll |
|
|
maybe have a set of background pictures, and then just load them as mario moves, so it creates that illusion of moving backgrounds? there's probably a better way though... |
|
|
|
|
![](images/spacer.gif) |
andrew.
|
Posted: Wed Apr 15, 2009 9:04 pm Post subject: RE:scroll |
|
|
You have to have a background image and move it in the opposite direction that Mario is running in. e.g. if Mario is running left then move the background right. |
|
|
|
|
![](images/spacer.gif) |
yodu123
|
Posted: Wed Apr 15, 2009 9:16 pm Post subject: Re: scroll |
|
|
ya that is what i thought. but my problem is i don`t know how i can make the background move |
|
|
|
|
![](images/spacer.gif) |
zero-impact
![](http://compsci.ca/v3/uploads/user_avatars/872397874480c7089d4888.gif)
|
Posted: Wed Apr 15, 2009 9:29 pm Post subject: RE:scroll |
|
|
You just load a really wide picture for the background (or many smaller ones) and have their x values change as the characters does. |
|
|
|
|
![](images/spacer.gif) |
|