View Full Version : Making the view follow an object in platform games using ActionScript
DarkSyreph
06-07-2005, 10:51 AM
I am left subdued and beggard (too exhausted) from searching for any sort of ActionScript because too many professionals leave us intermediate/advanced-beginners (or any of us who learn faster than the rest of the class) to wander the face of the internet, starving for information and any kind of breadcrumbs we can find that really don't help us, or mostly those who first don't know where to look/search. I do, though, appreciate the professional scripters who help us get on our programming feet. Might I add, ANY additional information is useful.
DarkMatter - Syreph
I would appriceate anyone who could tell me how to cause the view (or "a" view) to follow an object, usually in platform games (e.g. Sonic the Hedgehog, Super Mario Bros., Metroid (but follows in real-time), or any of your favorite platform games.) I, myself, am trying to make a Game using a variety of characters form an arsenal of games in a compiled strategy/action/adventure/fighting-style game but this skill is required to make this game possible.
Thank you. Syreph
farafiro
06-07-2005, 11:44 AM
Syreph
welcome to the forums
u can start from here:
http://www.freewebs.com/savco/site.htm
http://oos.moxiecode.com/tut_01/index.html
sleekdigital
06-07-2005, 02:07 PM
Just keep the x position of the character static while you move the platform and background elements the opposite direction of the percieved movement.
DarkSyreph
06-08-2005, 09:24 AM
Thanks for the help, but, I've always known that (I started making games on "Game Maker" for crying out loud). I don't want the entire stage to move though. If that's the only way possible, I'll do it that way then, but, otherwise, I feel the scripting process will be more tiring, confusing :confused: , and pointless if then I could get just "the view" moving (:D). Do you actually know how many objects, enemies, items, startpoints, endpoints, and whatever else ( :eek: ) goes onto a platform-based game and what I have to do to make all of these move? I know, as well as our old friend does, Common Sense, that it would be much easier to move one object throughout a stage than the whole stage move about that one object. If anyone else might have another option, please do let me know.
Once again, Thank you.
Syreph
sleekdigital
06-08-2005, 02:21 PM
What else to you expect to do? There is no camera or "view" in flash. You have a stage and ojects on it. if you want the illusion of a camera view moving to follow an character, you move the other objects while the character is still.
Do you actually know how many objects, enemies
Sure, I've made games before too. and you need to keep these things limited for performance reasons anyway. Also, in some cases you can nest objects in one movieclip and just move that one clip. Another common practice is to remove elements when they are not in view (to help performance).
There are lots of techniques you can use to make platform games manageable, there is plenty of info online and in the many Flash books available.
sleekdigital
06-08-2005, 04:21 PM
this site may interest you...
http://oos.moxiecode.com/
DarkSyreph
06-08-2005, 10:51 PM
But thanks anyway, I'll have to do just that. And I WILL remove objects once they are out of view. I have played too many games where the action bores me to death, and gameplay usually is slow as hell.
I hope ActionScript improves, though, so that, when making games, the view moves instead of an entire level.
Also, I am a newbie in AS scripting, so I hope I do not become a nusiance when asking for your guidance. Though some things may seem simple, I may not know the first thing about it (that if I ask). I am already familiar with the movie-making process and design, so anything else will most likely be on AS.
Thanks for your time and guidance and I'm looking forward to chatting with you all.
Syreph
sleekdigital
06-08-2005, 11:16 PM
good luck. Flash will probably never be ideal for making platform games, but its do-able.
farafiro
06-09-2005, 06:15 AM
Hi Syreph
I am a bit confused of what u want?? could you sort your asks in a list form
vBulletin® v3.7.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.