How to create a 3D world with 2D sprites similar to Ragnorak online?

As far as I know Ragnorak Online is a 3D game world with 2D sprites overlayed. I would like to use this style in a game I am making in Unity, so I would like the player to be able to select little square tiles on the terrain.

There are a couple routes I could take such as using a bunch of cubic polygons and linking them together or using one big map. The former approach doesn't seem to make any sense if the world is not flat as polygons wouldn't be reused often. The goal is to break down a 3D polygon into tiles which is hard to wrap my head around.

I believe using something like an interval tree or array would be appropriate to store the rectangle grid, but how would I display a rectangle around the selection the player has his mouse over on the polygon terrain itself?

Here is a screenshot. Here is a gameplay video. Here is the camera usage.

• Sounds like a way too vaste question to be asked by someone who'd be enough skilled to implement it afterward anyway. Mar 19 '12 at 15:29
• It sounds like you are just getting started on the idea but the format is called isometric so maybe start by searching on "unity3d isometric game" Mar 19 '12 at 15:30
• @user14170 I believe one way would be to find where the mouse intersects the terrain and look up the polygon. I'm just trying to figure out if I should make my terrain as a sum of little polygon or one big polygon. There are pros and cons to each method (such as additional overhead for storage and rendering), but I am also interested in what others think of it. It also bears a resemblance to runescape except I do not believe players could select grid tiles. Mar 19 '12 at 15:54
• @Rubber-Mallet I'm sorry that I didn't include a good description of the game, but the camera isn't isometric. Here's a good intro video. Gameplay starts at 1:00. Mar 19 '12 at 15:58
• are you asking specifically how to do ground picking, or about the "2d" art in the world itself? Mar 19 '12 at 17:32

1 Answer

Ragnarok terrain is actually a rectangular heightmap, so there's no question of breaking down the terrain into little tiles-- the terrain IS little tiles.

The things like boats and pillars are doodads placed on the map. The map itself is a rectangular heightmap, kind of like the following code. Note that each tile stores 4 heights (for each corner) not just one, so completely vertical walls are possible.

class HeightMap {
int width, height;
Tile[] Tiles;
}
struct Tile {
fixed float[4] CornerHeights,
byte TileType;
}


A separate file then dictates for each cell what texture and lightmap area to use for its top, front, and side faces.

In response to your comment: I'm not familiar with Unity, but it seems like there's a straightforward way to import traditional heightmaps easily (with a single vertex height instead of 4x corner heights). There's plenty of articles and tutorials online, since a heightmap is one of the simplest ways to do 3D landscapes. See this for example: http://unity3d.com/support/documentation/Components/terrain-Height.html

You can read more about the way Ragnarok Online handles it at http://rolaboratory.ximosoft.com/file-format and checking the file layouts for the RSW, GND, and GAT formats, but it's not really a very straightforward strategy and definitely not something easy to learn for beginners.

What you can take away from the RO method, is that they actually use two heightmaps: one invisible heightmap used for collision detection, and a visible one used to draw the map. That way, they can extend the "invisible wall or platforms" around various objects (eg those boats or docks placed in the scene that are not part of the heightmap

• Are there any more resources on this technique? It really looks interesting, but I'm trying to figure out what the width and height mean (I'm assuming it's the area covered by the tile array). This looks like a pretty good resource when working with heightmaps. Thanks for the reply too. Mar 19 '12 at 22:36
• +1 For awesome answer, +1 for mentioning ximosoft and they nice work with RO's files. I've worked much a year with RO tools, and the answer is pretty right about everything ;) Mar 19 '12 at 23:48