Z order for an rpg -need help
Can anyone help?
I'm making a SNES-style rpg, and I want my obstacles (backdrop objects) on a layer above the player character, so that she can pass behind them. Obstacle collissions have been solved by an invisible detector on another layer.
My problem is making the player character go *in front* of these backdrop images.
I *could* make all my obstacles active objects, but wouldn't that require loads of memory and cpu power?
thanks in advance..
file is here: Download
Re: Z order for an rpg -need help
The best way is to make anything you can walk behind into an active object, and use the layer object's sort by Y pos function.
Re: Z order for an rpg -need help
is this really how they programmed it in, say, pokemon or Tales of Phantasia?... Won't it make a huge difference in performance?
Re: Z order for an rpg -need help
I turn background objects that need to be positioned in front of active objects into active objects because I don’t know any better and because I don’t see any noticeable difference in speed.
Re: Z order for an rpg -need help
cool then!
thanks to both of you!!
Re: Z order for an rpg -need help
Also as an extremely competent visual artist, you will be tempted to add a bit of animation to your active background objects. It’s so hard to resist that extra bit of movement! − and extra work!
Re: Z order for an rpg -need help
that's so nice of you mico!
and yes it's hard to stop sometimes...
Re: Z order for an rpg -need help
I is rather inefficient to have your bg's be huge actives. Instead (what I do, at least), have the bg's repeated twice--one in the original layer, being behind the player. The other, in an invisible layer in front of the player sprites. For small objects, yes, use actives or active box objects.
[Edit] Obviously, whenever you want the player to be behind the backgrounds, make the 2nd layer visible.
Re: Z order for an rpg -need help
Quote:
Originally Posted by Christina
is this really how they programmed it in, say, pokemon or Tales of Phantasia?... Won't it make a huge difference in performance?
IIRC in pokemon they made the walls so that you could never walk over and under the same tile. i.e. the walls were all at least as thick as you were tall.
Re: Z order for an rpg -need help
awesome you guys.
Cool piece of info this one
Re: Z order for an rpg -need help
Alonso that was brilliant, thank you!!
Re: Z order for an rpg -need help
My experience is that the sort by Y is actually very fast. I've used it with a few hundred objects onscreen with no slowdown.
Re: Z order for an rpg -need help
This is a technical specs question[smile].
I did a test in MMF 1.5 one time and the results are that Active objects actually take up the same amount of memory as backdrop objects. The slowdown usually comes from transition and ink effects.
Also if the active has multiple animations in it, then it will slow down somemore.
Movement contributes to slowdown also when it concerns active objects it takes memory to move the object >calculations<
So a back drop is going to do very little, and it's set up to function on a limited scale.
The only limitations I see are the actual amount of active objects you can have in a frame. If your doing an RPG, try to keep it room based for the intensive active objects and backdrops for wide open areas.