Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Peter Fisla

Wargame Design - working with hexes

This topic is 6931 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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.


Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!