Skip to main content
GameDev.net gamedev.net
🔒 Locked

Isometric Grid question

Started by kraz007 Jan 16, 2008 at 12:22 PM 2 replies 2.4k views
Original Post
kraz007
kraz007
I'm working with a Flash developer on a turn-based game that's based on an isometric grid. In terms of technology, the game is similar to Dofus (www.dofus.com), i.e. the map is a single JPEG with the grid being an overlay. Characters move from one tile to the next, etc. We have a "conceptual" problem regarding the matrix that describes the grid. Here's the two approaches: The developer suggests that he rotates the normal grid (consisting of squares) 45 degrees. Since the map is a rectangle, this means that the grid will have to be a LOT bigger than the map itself. See: http://www.digitalboys.com/grid.gif (map is in red) My problem is that we'll have to store info for tiles (be it zeroes) that we don't need. The other issue with this approach is that I'd rather have tiles that have a 2:1 ratio (width:height). So rotating a square grid won't work. The way I look at it, the grid should be like that: http://www.digitalboys.com/grid.jpg We don't need all the partial rhombi, so we only keep info for the elements 1-8. I'd appreciate any feedback from the experts who have already done isometric games. How do you apply the grid when you have a rectangular map?
Playing: Riftforge - an online rpg with tactical combat similar to 90s RPGs Sign up for the playtest and get a 50,000 gold headstart!    
TANSTAAFL
TANSTAAFL
isometric grid to fill a rectangular space: use a staggered map

staggered map features X that changes horizontally and Y that changes vertically.

in the picture you shared the URL for, the numbered squares would have the following isometric coordinates:

1 (0,0)
2 (1,0)
3 (2,0)
4 (0,1)
5 (1,1)
6 (0,2)
7 (1,2)
8 (2,2)

Get off my lawn!
dbaumgart
dbaumgart
For my game I'm implementing a staggered grid at a ratio of 2:1 exactly like the one you propose. I think it's a good way to go, if that means anything. I wouldn't call myself an expert, just an enthusiastic amateur.

It's a bit counter-intuitive at first, but once you have the functions down to transform from one grid tile to any neighbor on both odd and even rows, and to find the grid position from a mouseclick, you're pretty much good to go. And be mindful of how a 2:1 ratio, and the staggered grid for that matter, distorts apparent distances and the dimensions of the map (as opposed to the dimensions of the nested lists containing the tiles) from what one would expect. You'll see!
kraz007
kraz007
Thanks for your feedback!

@TANSTAAFL
I found your article on isometric maps - I think I understand what you mean by staggered.

@dbaumgart
OK, so the next challenge will be to do the "isometric mouse" and also do the movement from one tile to the next.

Have you seen any tutorials around that address this topic? I have found this one - http://www.tonypa.pri.ee/tbw/tut18.html - and I'm going to send it to the Flash developer.
Playing: Riftforge - an online rpg with tactical combat similar to 90s RPGs Sign up for the playtest and get a 50,000 gold headstart!    

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.