3
\$\begingroup\$

How can I represent 3D world space with 2D tiles? I do not mean isometric, which is visually represent 3D objects in 2D space.

Let's say there's some height map, and each 2D tile (X, Y) represents a coordinate on the top of the map - so the Y is generated automatically, X stays the same and the tile's Y is the 3D Z component. Is it the right way to transform 2D coordinate to a 3D coordinate (again, on top of the terrain)?

Also - is it possible to implement water effect this way?

I'd like to read any articles/tutorials/opinions on this subject and how to implement it.

Thanks!

\$\endgroup\$
2
  • 3
    \$\begingroup\$ Could you try rephrasing the question? It's not making any sense to me. \$\endgroup\$ Nov 7, 2010 at 22:42
  • \$\begingroup\$ Cisco, I think what the OP means is: how can I take the x and y of a point on a heightmap to mean the x and z coordinates? Which is sort of what a heightmap already does. \$\endgroup\$ Nov 9, 2010 at 13:47

2 Answers 2

8
\$\begingroup\$

In order to represent 3d data, you need 3 coordinates (x,y,z). There's no way around that.

If you are using a heightmap, let's say, like this one:

11111111111111
11122222222111
11222333322211
11222300322211
11222333322211
11122222222111
11111111111111

Then you are already using 3 coordinates. x and y are the coordinates of each tile, and z is the number inside the tile.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Yep, don't think there's any more to it than this. Nicely explained. \$\endgroup\$ Nov 9, 2010 at 0:10
1
\$\begingroup\$

I think the best solution for you would to be to make a 3D evironment and have a fixed camera, somewhat similar to Starcraft 2. Where they have actual 3D models and terrain, water, etc. Just that you use a fixed camera angle. There are many pre made 3D engines available to buy, and you can customise the camera to stay fixed.

Trying to implement 3D visuals into a 2D game will probably just be far too much work when there's a simple solution already available :)

\$\endgroup\$

You must log in to answer this question.

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