6
\$\begingroup\$

I am working on a RPG using the JMonkey engine. While I was conceptualizing the map, I realized I would have a problem with the terrain.

My problem is this: I want to have a click to move interface, and have the player move in increments of 1 world unit (wu). This is actually rather reminiscent of a tile based engine, but in 3d. While making the world map, do I need to make an object made of the world geometries, and load the one object, or would it be better to build a map out of the necessary tiles, using a file to tell the engine how to build the map (similar to 2d tile games)?

I might also add, the game isn't going to use heavy collision detection or real time physics, which is why I thought a tile based "pass-abilty" system might work.

Would loading that many objects for a tile be too much as far as memory goes? What if I make a single object, constructed of tiles by a definition file, and just make the player move in 1 wu increments, giving the illusion of "tile-based"?

I'm assuming that a combination of any of these might work, it's just that I don't have any prior experience making a system like this and would like some opinions on the most efficient method of doing what I'm trying to do.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ If they click 2+ wu/tiles away from where they are, are you going to move them 1 wu/tile in that direction as best you can figure or to the closest complete wu/tile they clicked on? \$\endgroup\$
    – James
    Commented Mar 30, 2011 at 21:50
  • \$\begingroup\$ @James: If they clicked 2 wu away, the idea is that it detects the closest wu "tile" to the coordinates of the click, and moves them to that wu tile. So in that case, they would move two "squares" in that direction. \$\endgroup\$
    – Lord Zero
    Commented Mar 30, 2011 at 21:54

1 Answer 1

1
\$\begingroup\$

Not sure about JMonkey, but for most 3D engines having lots of different objects has a negative impact on performance (not memory). That's because every object requires a separate call to draw it. If that's the case with JMonkey too, you'd be better off having one, or few, bigger objects. You might even build them from tiles on-the-fly.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .