Wargame Design - working with hexes

Started by
5 comments, last by Peter Fisla 23 years, 11 months ago
Hi All, I''m having a hard time finding on the net some good C++ sample how to work with Hexes. I''m working on a WW2 operational wargame and I would like to implement hexes. Here is basically what I want: 1) I will have a big bmp file with all the hex tile terrain 2) I want to have a map editor where based on map size I select a tile I want to basically make my own map hex by hex. 3) My game will then load a scenario file + map file to play a historical battle scenario. So what I''m looking for is a simple example how to work with hexes + graphics like transparent bitmaps etc... Thanks all for your help I really appreciate it... Peter Fisla
Advertisement
http://www.gamedev.net/reference/programming/isotile/article747.asp


http://www.gamedev.net/reference/programming/isotile/article748.asp


keep in mind that these were written about two years ago
Amit J. Patel''s Home Page is at
http://www-cs-students.stanford.edu/~amitp/gameprog.html



David "Dak Lozar" Loeser
Dave Dak Lozar Loeser
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."--anonymous
If you treat hexes like a simple grid, with the one difference that every alternate row is offset half a square to the left or right (depending on how you wish to do it), a lot of the calculations become clearer. Drawing them is still pretty complex compared to square tiles but the game logic is not, really.


Just wanted to let you know about something we did here. I understand that you are doing a wargame related thing, so hexes look like the thing to do. (I like them anyway)

However, our test groups have hammered the idea whenever hexes are used (twice) as opposed to plain squares or iso tiles.

So if you''re doing this for fun, more power to you! If you''re doing this to make money, you might think twice.
quote:Original post by Buster

However, our test groups have hammered the idea whenever hexes are used (twice) as opposed to plain squares or iso tiles.


I think there is a perception of hexes as being ''old'' and just suited to turn-based WW2 wargames Which is a shame.
Buster: Well I''m doing it for fun but I wouldn''t mind publish it through the internet as well.

I don''t know, well I went with hexes because I have not really seen an operational wargame without hexes. I have some experience with square tiles working on Close Combat 1 editors and I know they are easier to draw as well as manipulate.

At this point I can draw hexes with transparency and navigate myself on the hex map using mouse but I''m not really happy with the speed of drawing hexes. I have tried different methods (I''m developing with VC++ and MFC) so far using CImageList and then using Draw function I find it to be the best solution so far but not great.

Basically my game will be about WW2 Eastern Front 1941 - 45 with 1 or 2 week turn (I haven''t decided yet) Division/Regiment level with 1 hex = 16 miles. I want to use one big map of the whole Eastern Front which rougly translates into 153x81 hexes.

I don''t know, I would like to try to use squares as I think navigating as well as drawing would be much faster but I can''t come up with a good tile graphics design. Also I''m using some board game map layout and that is done of course in hexes and I can''t really figure out how to do it well.

I was thinking about doing the graphics in DirectX 7 but I just started with Directx and I want to really make the wargame in windowed mode, not in full screen + I want to be able to use dialogs etc...other GUI features of the operating system which is actually Windows 2000 Pro.

Peter

This topic is closed to new replies.

Advertisement