PDA

View Full Version : How do you make a moving view for a side scroller like mario?




MrPenguin9
Nov 23, 2008, 02:01 PM
How do you make a moving view for a side scroller like mario? I want to make a side scroller, but I don't know how to make the view move as my character moves?

Thanks



detz
Nov 23, 2008, 02:05 PM
How do you make a moving view for a side scroller like mario? I want to make a side scroller, but I don't know how to make the view move as my character moves?

Thanks

Hey, I meant to respond to your other post but I forgot. :P

There are a few ways but probably the easiest is to not move the "guy" but to move everything around him. So when he moves forward you move the background to the left and it gives the illusion that it's moving. The other way is to use a UIScrollview and and just move the guy along the uiscrollview. I use a combination of both for Super Pig.

MrPenguin9
Nov 23, 2008, 03:03 PM
Thanks for the reply.:)

How do you use UIScrollview? Can you give me any examples?

Thanks.

detz
Nov 23, 2008, 04:11 PM
Thanks for the reply.:)

How do you use UIScrollview? Can you give me any examples?

Thanks.

There are tons of tutorials online, Google UIScrollView and you should find some information.