Z order of 'objects'?
Displaying 1-8 of 8 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
allan-mouse-menefee

I've been using various incarnations of RPG Maker for a while, and am working on converting a game I helped a friend make to Verge3.

The first thing I ran into is that (obviously) you have to set the obstructions independently. By this I mean, you can't simply set a tile to obstruct wherever it is placed. That's not a huge conundrum, I'm just stating my thoughts.

On the other hand, I *did* have a bit of trouble with the 'z order'. In RPG2003, objects placed on the objects layer will render behind the player entity when he's below them on the screen, and above him, if he happens to be walking 'behind' them. For instance, a large tree is placed in a clearing, and I want the character to be able to walk on both sides of the tree, but not end up with his head under the tree if he walks in front.

Maybe I'm missing something obvious, perhaps the standard practice is to use entities or something, but I'd like some advice on this little problem.

I also noticed that sometimes entities set to 'wander' in maped will run into an obstruction and just sit there like a lump, like the movement is queued and once it gets blocked, it just keeps trying forever. Maybe I'm wrong about that though.

Posted on 2006-07-18 13:26:49

Omni

Focus on the render-string order.

Maped usually gives a list of your layers -- layer 0, 1, 2, 3, entity layer, etc.

The goal is -- the base of the tree must be obstructed. That way you can't walk through the tree. But only the base is actually obstructed (no need to obstruct everything).

For the player to be able to walk under the tree's "foilage" and "branches", the tiles representing the upper parts of the tree must 1) be on an upper layer and 2) not have obstruction tiles set in the obstruction layer.

Set the tiles for the base of tree (roots, etc), go to obstruction layer and set those tiles to obstructed. Then go to a higher layer (a layer ABOVE the entity layer, so the entities will appear below the 'tree ruffage'), place the 'canopy' tiles, then make sure they are NOT obstructed.

You have to tinker with it to get the exact behavior you want.

Posted on 2006-07-18 14:19:03

allan-mouse-menefee

Hmm...

The chr's height is right around 32 px, and the tiles are 16 x 16. I have several pieces of furniture and shrubbery that are only 2 tiles tall, so I'm not sure that everything you said applies. I'll look into the original, and compare how they react.

Thanks

Posted on 2006-07-18 14:35:29

relaxis

yeah, if there's any 2 things that i would have control over in the whole ruddy world of VERGE game production they would be 1 - A FIX TO THE MAPED3 IMPORT BUG and 2 - 32x32 tiles.

Posted on 2006-07-18 14:51:23

Omni

If my character is two tiles tall, then you have a problem.

Why? Because it's hard to tell what to put on the layer BELOW your player and what to put ABOVE him.

Example: two tile tall player sprite.

So let's make a chair. He must be able to walk in front of it, and also walk behind it -- and be seen through the bars of the chair.

The chair must be AT LEAST two tiles tall. See the dilemma?

It is impossible to create a tile that the player can both walk in front of and <walk behind of.

The base of the chair can be one tile tall. Place it on the layer below the player, and obstruct it.

Result? Assume the player's bottom tile is obstructable.

That means when he approaches the chair from the bottom, there his top tile will overlap the bottom tile of the chair.

The bottom tile of the chair must be on the layer beneath him.

The top half of the chair must be on the layer ABOVE the player. When the player walks behind the chair, again, he is obstructed by the base -- but the top half of the chair now covers his bottom half.

This makes it appear as if we see the player behind the chair.

There is a very simple demonstration of the collision using crappy ASCII art below: sorry for my laziness, but for a true understanding you just have to tinker with it till it makes sense.



Chair:

t-t-t
t-t-t --top half, (assume 16x16 pixels, 1 tile) ABOVE ENT. LAYER
t-t-t
b-b-b
b-b-b --bottom half (imagine 16x16 pixels, 1 tile, OBSTRUCTED) BELOW ENT. LAYER
b-b-b


Player:

-P-P-
-P-P- --top half. (16x16)
-P-P-
-p-p-
-p-p- --(bottom half, 16x16, obstructed hotspot).
-p-p-



Player approaches chair from bottom...

t-t-t
t-t-t
t-t-t
bPbPb
bPbPb --The top of player and bottom of chair. (PLAYER IS ON TOP)
bPbPb
-p-p-
-p-p- --Obstructed.
-p-p-


Player approaches chair from top...

-P-P-
-P-P-
-P-P-
tptpt
tptpt --Player's bottom half and chair top collide. CHAIR HALF ON UPPER LAYER
tptpt
b-b-b
b-b-b
b-b-b


Remember that the bottom of the chair must be on the layer beneath the player. The top half of the chair must be on the layer above the player.

Posted on 2006-07-18 14:52:24

allan-mouse-menefee

I double checked, and it looks like the lower 16 px of the chr *are* blocking in RPGM. And combined with the lower tile of the 'object' being an obstruction, it works great. Thanks Omni, I should have just looked closer before!

Posted on 2006-07-19 12:06:07

Omni

No problem, glad to help.

Posted on 2006-07-20 18:12:10

Gayo

I really wish VERGE had some sort of weird layer where the individual rows of tiles are interleaved with entities based on y-val. It'd be slow but it would present a sexy, sexy solution to this problem, and it'd allow me to have a chr that's a little taller than 16x32 without my having to add extra little edges to all my obses.

As for 32x32 tiles, who cares. What we really need is arbitrary tile brushes.

Posted on 2006-07-27 01:27:29


Displaying 1-8 of 8 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.