2d World Vs 3D Character. 90's JRPG

23 posts

Flag Post

Hi, First please excuse my english.

I try to recreate the look&feel of 90’s JRPG
<Chrono Cross, Legend of Dragoon, FF7, Baten Kaitos, Chaos Ring>

Exemple: <5:25>
http://www.youtube.com/watch?v=0eZ4TIVMTv8

I would like to know if someone try it before.
What is the good engine for it?
How did I need to do the collision?
How to recreate the sensation of drive away the character? <see>

I know C#, Javascript, AS3 & little bit of C++.

Thanks in advance! This mean a lot for me ^^

 
Flag Post

If this is your first time to make a video game, you should probably try making something much simpler than an RPG. Good RPGs are hard to design and take a long time to program. You’ll have to take into account character generation, story, level design, combat resolution, and user interface among others, not to mention having to make a ton of art assets. If you want your game in 3D, then your learning curve will get even steeper.

As for the choice of engine, you should first decide what platform you want to make your game for. Will it be for a browser, iDevice, Android device, standalone PC/Mac, or some other console?

 
Flag Post

It’s not my first game and I don’t really want to create a Rpg from scratch. I just want to know how to do the navigation like the video <3d character navigate inside 2D with collision (Like Chrono Cross)>. For the browser PC is enough. ^^

 
Flag Post

Short of asking the developers how they did it, we can only surmise how it was done. It seems obvious that the 3D characters are actually traversing 2D space. The paths are probably defined by using a set of nodes that are connected wherever there is a path between them. There are many ways to find a path from a starting node to a destination node, but the most practical way is to probably use the A* algorithm.

To handle character collision, each character has an invisible bounding polygon that is attached to them. The simplest bounding polygon is a single box, which ought to be sufficient for the type of game you’re after. Games that require a finer degree of precision in their collision detection use several bounding polygons to cover different parts of a character’s body. These polygons are usually either boxes or spheres. At each game tick, the game detects if an object has collided with another object by checking their collision boxes or spheres. If you want to know more about the math behind this, click here.

If you want to make a browser-based game in 3D, you can use either AS3 or Unity3D. There are several 3D graphics and physics engines that are available for AS3. You can find them by googling “AS3 3D engine.” Perhaps someone with more experience than I can recommend some good ones.

 
Flag Post
Originally posted by Elyzius:

To handle character collision, each character has an invisible bounding polygon that is attached to them.

I would like to know, does C++ games use invisible bouncing polygons too? or does it handle collisions in a different way?
And for example, in as3 when someone is attacking I create invisible object which is attached to a weapon and test collision against that object, not weapon. Is it possible to do the same in C++? that invisible object must appear just for a short period of time? I’m asking out of interest.

 
Flag Post
Originally posted by AMD_Paulius_J:

I would like to know, does C++ games use invisible bouncing polygons too? or does it handle collisions in a different way?

Nope, not at all. C++ does not come with predefined “collision routines” or anything like that. Almost no programming language does. Instead, you should create your own collision testing rather than relying on something built-in which might not do what you want it to do.

And for example, in as3 when someone is attacking I create invisible object which is attached to a weapon and test collision against that object, not weapon. Is it possible to do the same in C++? that invisible object must appear just for a short period of time? I’m asking out of interest.

I super recommend you stop doing that, it’s terrible in so many ways. A relic of Game Maker style programming.

 
Flag Post

You test collision against the bounding polygon, which should stay with their attached characters and other objects at all times. It would be inefficient to keep making them appear and disappear on each game tick.

 
Flag Post

I super recommend you stop doing that, it’s terrible in so many ways. A relic of Game Maker style programming.

I thought about that too, but I never found any information on how to test sword collision in a right way..

 
Flag Post
Originally posted by AMD_Paulius_J:

I thought about that too, but I never found any information on how to test sword collision in a right way..

The trick is that a “collision” is really nothing but two things touching each other. But how do you know if two things are touching each other? Simple, you compare positions.

If object1 is in x position 100, and is 30 pixels wide, that means any other object between 100 and 130 will be touching object1. To test for all possibilities between two rectangular objects, you essensially just need four if() statements:

if( x1 < x2+w2 ) {
  if( x1+w1 > x2 ) {
    if( y1 < y2+h2 ) {
      if( y1+h1 > y2 ) {
        applyDamage();
      }
    }
  }
}
 
Flag Post
Originally posted by Drakim:

if( x1 < x2+w2 ) {
if( x1+w1 > x2 ) {
if( y1 < y2+h2 ) {
if( y1+h1 > y2 ) {
applyDamage();
}
}
}
}

But isn’t this is the same as hitTestObject? This method would still require a secret object with same x and y of the sword.

 
Flag Post

No, because YOU decide what the variables x1, y1, x2, y2 are in your own class, you don’t need an invisible displaylist object for that.

 
Flag Post
Originally posted by Drakim:

No, because YOU decide what the variables x1, y1, x2, y2 are in your own class, you don’t need an invisible displaylist object for that.

Okay, thanks for explaining. I see that it would become complicated if it wasn’t a rectangle but still that’s a right way to go.

 
Flag Post

If you actually need pixel perfect testing, then I think it’s okay to use AS3’s hitTest, but I thought you were talking about using invisible objects for “hitboxes” when it’s completely unnecessary.

 
Flag Post

Why are you guys talking about pixels and pixel-perfect collisions when the OP is referring to games with 3D models? There are no pixels to test for in 3D.

 
Flag Post
Originally posted by Elyzius:

Why are you guys talking about pixels and pixel-perfect collisions when the OP is referring to games with 3D models? There are no pixels to test for in 3D.

OP is talking 3D models on a 2d plane. It’s actually surprisingly relevant, as normal 3D collision routines would be next to useless.

 
Flag Post
Originally posted by Drakim:

If you actually need pixel perfect testing, then I think it’s okay to use AS3’s hitTest, but I thought you were talking about using invisible objects for “hitboxes” when it’s completely unnecessary.

Yes I was talking about invisible objects, your example makes sense and it is definitely better than invisible hitbox.

 
Flag Post

Sorry, but this method does not seem to work correctly for 3D characters, even if they are on a 2D background. Take a look at the video that the OP linked to. At around the 7:38 mark, the player character almost collides with a spectral creature but manages to avoid it in the nick of time.

How would you handle that with a 2D solution? Even without sticking an invisible box to each character, for purposes of this discussion, Drakim’s solution works as if there were invisible 2D boxes present. Let’s call them “virtual bounding boxes” since no actual geometry is stored with the characters. Would they be something like this? If so, it looks like the main character hit Mister Specter.

One could argue that the main character is at an angle, and his bounding box should therefore be much smaller. Fair enough, but for that to work regardless of the relative angle of the character, the bounding box would also have to be rotated correspondingly. The simple math proposed here would not suffice. The vertices of the box would have to undergo some matrix transformations. Anyhow, brushing up on linear algebra shouldn’t be too hard. Let’s see how that solution would fare in the case of the Chrono Cross game mentioned by the OP.

Still no dice. Actually, the spectral guy’s shoulders aren’t really that broad, but if you’re looking for a 2D solution to collision detection, you might wind up with a box that is either too narrow for certain situations or too wide. The only plausible solution I see is a 3D solution.

Bingo.

 
Flag Post

Elyzius

…the bounds of the player is probably a circle positioned directly on his feet.

The video is most likely a case of 2d collision.

After examining the video the game could possibly using 3d collision (which would be pointless), but I want to mention that a 2d solution can be just as and even more accurate that 3d AABBs.

 
Flag Post

It’s not really pointless. Having also examined the video further, I take back my earlier statement that the characters are traversing 2D space. It only seems that way because of the 2D backdrop, but I now realize they are traversing 3D space. The developers probably wanted to model the entire scene in 3D, but the old Playstation didn’t have the power to render a detailed 3D scene. Storing the pathways as a 3D mesh is not really a problem as long as the Playstation didn’t have to render them. Hence, the 3D pathways are as invisible as the bounding boxes surrounding the characters and creatures but are “solid” for all intents and purposes.

 
Flag Post

Yes these are most likely 3D models rendered in a 3D world, except the world itself is not rendered. Instead, the 3D characters are displayed over a fixed background image. The advantage in doing it this way is that you can have a very detailed background. The disadvantages are that the camera can’t move and that the end result looks like puke.

Why does the OP want to reproduce a band-aid solution that the developers originally only resorted to because they had no other choice, again?

 
Flag Post

I just want to know how to create it. I don’t have any secret projects or anything like that, I’m just very curious to know if it’s possible.

 
Flag Post

The riddle inside this is if I use a

- Perspective Camera.
Good : I got the 3D world collision and the the perspective view for the characters.
Bad : I can’t have the layered background perfectly over each other. (This will be offset)

- Orthographic Camera
Good : I can’t have the layered background perfectly over each other. (No offset)
Bad : I loose the 3D collision system and my character have no more perspective.

^^ I’m sorry if what I say have no sense <Because of my english!>.

 
Flag Post

- Orthographic Camera
Good : I can have the layered background perfectly over each other. (No offset) <sorry>
Bad : I loose the 3D collision system and my character have no more perspective.