|
|
This thread is locked; no one can reply to it.
|
1
2
|
| 2d RPG type games |
|
piccolo
Member #3,163
January 2003
|
hmm for object that don't move like trees and houses i put the bottom part on the lower layer then the top on the layer above it. like so. http://www.allegro.cc/depot/screenshots/3138_large.jpg layer 2 http://www.allegro.cc/depot/screenshots/3139_large.jpg layer 3 this way you can put you none passable zones and the base of the house or tree. when you do this it make the object appear 3D because the top part of the object will be draw after the player object so it will look like the player is be hide the tree. wow |
|
Rick
Member #3,572
June 2003
|
That's find if you characters are smaller than a few tiles. If one of your characters is 4 tiles tall and stands in front of your house, the top part will be drawn over him breaking the illusion. That is why I'm thinking of just giving all objects collision rectangles. ======================================================== |
|
piccolo
Member #3,163
January 2003
|
thats not a problem ether. what you do is break your characters in to parts draw the parts on different layers. i am also working on a characters editor the works with characters parts. that is also for my MMrpg and is located in the depot. wow |
|
Rick
Member #3,572
June 2003
|
Wow, I guess I didn't think about putting characters on different layers. That seems like it would be a pain. I'll stick with just making collision rectangles and check against those. ======================================================== |
|
23yrold3yrold
Member #1,134
March 2001
|
I just sort my game objects by y coordinate and draw top down. My big sticking point (and I have an idea for this that suits my engine, but it merits discussion here and I haven't seen it brought up) is brideges and things you can walk iver/under. Fenix Blade, as well as quite a few of the old SNES RPG's, can do this and it's very effective both in terms of looking cool and possibly making map layouts a bit more efficient. Attached a quick montage for visual reference: {"name":"590613","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/6\/a698b3e99672e36c106cf99a6cce39ec.png","w":600,"h":140,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/6\/a698b3e99672e36c106cf99a6cce39ec"} Ideas on how to do that? -- |
|
OICW
Member #4,069
November 2003
|
Maybe putting those bridges onto different layer. Or even better idea: having separate layers for each ground level - only problem is with travelling between them. [My website][CppReference][Pixelate][Allegators worldwide][Who's online] |
|
23yrold3yrold
Member #1,134
March 2001
|
Quote: Or even better idea: having separate layers for each ground level - only problem is with travelling between them. This is my thinking, yes. -- |
|
piccolo
Member #3,163
January 2003
|
there should not be a problem this is how my games works. edit
that is the same as wow |
|
Onewing
Member #6,152
August 2005
|
I'm just going to babble here, but maybe it's some food for thought. Why not have infinite layers? In fact, represent layers with Z (as in X,Y,Z). Each tile stores an X,Y and Z variable as well as b,t,l,r variable (bottom, top, left, right). Now, in your map editor, at any time you can pick which layer (Z) you are adding to. So you could have grass at Z=0 and Z=10 (where 0 would be lower depth-wise than grass at 10). Next, you set the b,t,l,r variables, which determine if you can pass the position of the tile. Alternatively, you could just use BB, but even with b,t,l,r I don't see why this would anger free movement (although it might get a little finicky at the edges). Now here's the kicker: our player is at layer z. That's z, not Z. Meaning, the player is not on a static layer, but his layer actually changes. Say for example you go through a door, well the door has as underlying code that sets the player's z to its Z variable. Thus, in 23's picture (the far left one) above with the bridge and the door, say when you exit that door your now on Z=20 so z = 20. But, before z = 0, so you'd be below the bridge. There's still a bit of confusion in the collision, but maybe it's an idea. [edit] ------------ |
|
Elverion
Member #6,239
September 2005
|
23yrold3yrold, the second image is from Secret of Evermore (during the Prehistoria chapter), and the third from Final Fantasy 3? I'm not so sure about the first one. But yes, I would say that the best way to do that would be to put the ground over multiple layers, and move the character up or down layers when they come in contact with things like stairs or ladders. Stairs could be done by having invisible collision points at both top and bottom of the stair sprite. If the character is on layer 1, and hits the collision point at the top of the stairs, move him to layer 2. Just the opposite, if he hits the bottom of the stairs while on layer 2, move him to layer 1. Walking over/under the bridge would be pretty easy to do, I think. On the layer that you would walk under the bridge, you do not place 'blocking' tiles, and your depth is greater than the tiles above, so you appear under it with no problem. On the above layer, though, you should place invisible non-walkable tiles at the sides of the bridge to prevent the character from walking into nothingness. Again, your depth would be less now that you are up a layer, so you would appear above it. -- |
|
23yrold3yrold
Member #1,134
March 2001
|
Quote: 23yrold3yrold, the second image is from Secret of Evermore (during the Prehistoria chapter), and the third from Final Fantasy 3? I'm not so sure about the first one. Final Fantasy IV. And Onewing/Elverion pretty much suggested it the way I'd do it. Everything in my game is an object, sorted by z for layer and then y for objects on the same layer that overlap. Tiles would have triggers moving objects between layers as they pass over them. I don't know if that's how the old classics did it, but it's my way. Now, how to draw transparent water over the player's lower legs when he's walking in liquid. Another trick some old classics (and Fenix Blade) did .... and one that still stumps me a bit. -- |
|
OICW
Member #4,069
November 2003
|
Quote: Now, how to draw transparent water over the player's lower legs when he's walking in liquid. Another trick some old classics (and Fenix Blade) did .... and one that still stumps me a bit. Funny, I was just thinking about that too when I began reading your post. I think that it's the same as walking in the high grass (another Fenix Blade feature): you just draw seafloor, then begin drawing of translucent water tiles and when it comes to player you draw him and then again the water tiles. Which will end in half of the body (legs) covered by water. Just add some nifty effect of ripples around player and you got it. Where is Sirocco? He could help... [My website][CppReference][Pixelate][Allegators worldwide][Who's online] |
|
Onewing
Member #6,152
August 2005
|
Quote: you just draw seafloor, then begin drawing of translucent water tiles and when it comes to player you draw him and then again the water tiles. I don't know, that sounds like over-complicating things. I've got two ideas: 1) The FFIV way (or some rpg game...). When over a forest tile, the lower half of the body turns translucent. This could just be code inside the player object, in which when the player is on certain tiles, the lower half is draw translucently (that shouldn't be too difficult to do) on top of the forest tile. Thus, when on a water tile, the player code knows to draw the bottom half translucently. Now, we still have the problem of the ripple effect. This is a special function in the tile object that basically is run when the player is moving on top of a water tile. This special function draws the ripple before the player is drawn, so the solid part of the player is drawn over the ripple, while the translucent part appears below the ripple, creating some sort of depth. 2) I scratched this idea as I was writing it. ------------ |
|
piccolo
Member #3,163
January 2003
|
my game can do this as well. what i do is. my player is made up of parts so using my above post code i draw all parts of the play where they need to go. in this case : wow |
|
Rick
Member #3,572
June 2003
|
Since I started this thread I'm using it for transfer of text. Feel free to ignore the following.
======================================================== |
|
23yrold3yrold
Member #1,134
March 2001
|
Quote: Thus, when on a water tile, the player code knows to draw the bottom half translucently.
But now not only is the water showing over the legs, so is the seafloor. -- |
|
Thomas Fjellstrom
Member #476
June 2000
|
I'd just draw the normal water tile, then the player, then a translucent special water tile with ripples -- |
|
2d-forever
Member #8,051
November 2006
|
OK, I'm not much into this (I'm just the artsitic friend of the one who plans on making the game ^^ ). Anyway, you mention the problem of A) B) |
|
Richard Phipps
Member #1,632
November 2001
|
I'd do it how Thomas suggested. |
|
Rick
Member #3,572
June 2003
|
I would think the "foreground" layer could handle walking in water or high grass. That's pretty much what Thomas is saying. I was put a collision rect around what would be the base of objects. Then do simple BB collison checks. It seems to be working well. ======================================================== |
|
OICW
Member #4,069
November 2003
|
Oh by the way Rick: I thought that you're working on that isometric board game. [My website][CppReference][Pixelate][Allegators worldwide][Who's online] |
|
Rick
Member #3,572
June 2003
|
I was but I have drawing technical issues that always get in the way, harder than these top down, and it takes away from programming the gameplay, which is what I enjoy more. ======================================================== |
|
OICW
Member #4,069
November 2003
|
Hehe, me too, me too. That's why I abandoned the idea of isometric engine. [My website][CppReference][Pixelate][Allegators worldwide][Who's online] |
|
23yrold3yrold
Member #1,134
March 2001
|
If I were going to go isometric nowadays, I'd just use a 3D grid and camera angle like Final Fantasy Tactics. -- |
|
OICW
Member #4,069
November 2003
|
Yeah, I'm thinking that if I'm going to make RTS or RPG I'd go for normal tiles or switch to complete 3d. [My website][CppReference][Pixelate][Allegators worldwide][Who's online] |
|
|
1
2
|