IsoHex Game Programming Book Q - Ch 19

Started by
4 comments, last by vovansim 19 years, 9 months ago
Another question for those that read Isometric Game Programming with DirectX 7.0. I finished Ch. 19 (mini map example) and am trying to get a minimap to work staggered maps instead of the diamond map example. Pg. 546 states a formula for determing the size of the mini map needed based on the map and tile dimensions used, but it is only for diamond maps. Can anyone point me to a formula for staggered maps? I tried the formula in the TilePlotter to determine world space for such a map, but it is not coming out right (it is way too big). Thanks in advance, TG
Advertisement
I just ordered that book and it should be here tomarrow?
Is it worth my money?
Maybe once I get it and read through it we could help each other or I could help you.
Rygar-

I found it to be an outstanding book (and I have about 15 or so different programming books currently on my shelf) I am only a "weekend coder" when my job/family permit, so it took me two reads over the course of 2 years before I finally started "getting" it and incorporating concepts into my own engine/game. The one down-side of course is that the book focuses primarily on DirectDraw which, while still backwards supported by DirectX, is no longer cutting edge - but for people just learning like me (I am focused primarily on creating my own space strategy game), I don't think it really matters. I have made a number of enhancements/changes to the basic IsoHexEngine over the course of the past 6 months, so feel free to fire away questions, with the caveat that I certainly still have a number of open questions myself. My hope is to eventually convert the engine to Direct3D to take advantage of the new DirectX GUI system just introduced with the 2004 DirectX summer release, but I want to first get all of the basic issues in my game ironed out first.

-TG
Quote:Original post by Tampa_Gamer
I tried the formula in the TilePlotter to determine world space for such a map, but it is not coming out right (it is way too big).


Hi,

TilePlotter should work, the only thing you need to make sure is that when you set it up, you use the MiniMap tile dimensions (2x4 pixels, say) instead of the real map tile dimensions (16x32 pixels, say).

Vovan
Vovan
Sorry - I should have been more specific. The author determined that the physical size of the minimap for his diamond map needed to be 160x80 pixels based on the following formula:

Minimap Width = (MAPWIDTH + MAPHEIGHT) * MINIMAP TILEWIDTH /2
Minimap Height = (MAPWIDTH + MAPHEIGHT) * MINIMAP TILEHEIGHT/ 2

or

Width = (40 + 40) * 4/2 = 160
Height = (40 + 40) * 2/2 = 80

However, the author also states that this formula will change based on the type of map it used for (i.e. diamond, staggered, hex, etc.). I am currently trying to determine the formulas for staggered and hex type maps, but am having a mental block and no success.

-TG
Hi,

Well, let's see. Suppose we have a staggered iso map. Then, what would be the height? Well, that would be:

MiniMapHeight = (MAPHEIGHT + 1) * TILEHEIGHT / 2

Similarly, the width would be:

MiniMapWidth = (MAPWIDTH + 0.5) * TILEWIDTH

I think. That, if you shift rows, not columns, otherwise it'd be the other way around.

What I'd suggest, basically, to figure those out is, draw a little map, say 5x5 on a piece of paper, and stare at it, and then it'll be easy to come up with the forumla. Granted, the above might be wrong, I cam up with them looking at the Figure 11.7 on page 293. ;)

Vovan
Vovan

This topic is closed to new replies.

Advertisement