PDA

View Full Version : Scrolling Advice Needed



Shneidr
May 1st, 2010, 09:39 PM
Okay, Im trying to find the most practical method of making my platform game have a scrolling background/environment. I was thinking of putting everything that I want to scroll inside a movieclip(limits, enemies, objects etc) and then just telling that movieclip to move when the hero reaches a certain place on screen. I was just wondering if this would be a practical method or if there is some easier way to tell all the objects to move?
Any input would be nice.
Thanks!

NateTheGreatt
May 1st, 2010, 10:23 PM
Sounds good to me. I'm pretty new to the whole Flash and Actionscript 3 game design field, but that's exactly how I would do it. I don't know how much easier it gets, really.

Shneidr
May 2nd, 2010, 01:20 AM
yea, I posted this on some other forums at the same time and they all said the same thing. damn, haha I'm not looking foward to all the referencing mcs within mcs. oh well, I'll manage. thanks for your response!

dandylion13
May 2nd, 2010, 06:41 AM
I was thinking of putting everything that I want to scroll inside a movieclip(limits, enemies, objects etc) and then just telling that movieclip to move when the hero reaches a certain place on screen.

Yes, that works fine, but you'll need to keep in mind that if you want to do collision detection you'll have to convert points from local to global.

I sometimes find it easier to keep all the objects in the same co-ordinate space and just scroll them individually (in a loop) using a "scroll velocity" (The scroll velocity will be the opposite of your main character's velocity). That way you don't have to do any point conversion.

Maybe someone else out there has some other clever ideas?