Allegro.cc - Online Community

Allegro.cc Forums » Game Design & Concepts » Isometrix hex map

This thread is locked; no one can reply to it. rss feed Print
Isometrix hex map
Max Savenkov
Member #4,613
May 2004
avatar

I'm working on my own tile-base isometric engine, and came to this philosophic question: which way is better?
a) Make map from hexagonal tiles (the way I'm doing it now)
b) Make map from square tiles and then overlay hexagonal grid over it (the way it is done in Fallout, for example).

First way is simplier when it comes to determining blocked hexes on map: each tile has CAN_PASS flag, so if it is not set, player can't walk here.

Secon approach is simplier, because it's easier to create square tiles that hexagonal tiles. But then, I need to map square tiles to hexagonal grid to check for passability.

I'm sure that both methods have some other troubles connected with them, and I need some advice to choose one. Express your opinions on this topic, please.

P.S. It seems that every map cell in Fallout consists of at least three bytes: tile number, wall number and can pass/cannot pass flag. Am I right or wrong about this?

HoHo
Member #4,534
April 2004
avatar

Have you considered xcom-style? Diamond shaped tiles. I personally would probably go* with xcom style because I think it makes engine a little easier to code. Also I think map making is a little easier.

*) actually I did go already and made a working xcom graphical engine with allegro that could draw custom maps without animated stuff. Unfortunately I have stopped developing it any further.

I'll attach a screenshot of my "engine" from almost two years ago. It hasn't changed almost at all scince then

[edit]
Unfortunately I know little about hex tiles so I can't say a lot about them. I just gave another option for you to think about :)

__________
In theory, there is no difference between theory and practice. But, in practice, there is - Jan L.A. van de Snepscheut
MMORPG's...Many Men Online Role Playing Girls - Radagar
"Is Java REALLY slower? Does STL really bloat your exes? Find out with your friendly host, HoHo, and his benchmarking machine!" - Jakub Wasilewski

Ashteth
Member #3,310
March 2003
avatar

Overlaying the Hex tile is ever so much easier. Drawing seamless hex tiles can be a real pain when it comes time to do something complicated. It's not too difficult to do hex deserts or plains using a program like Reptile, but that only works when its difficult to see the edges anyways. Try drawing a building or more complex ground cover using hex tiles... augh...

Depending on the size of your map, you could also ignore tiles altogether and simply opt for a pre-rendered background. If you use OpenGL, you can usually get away with using a quad that is 50% bigger than the pre-rendered texture background and still have it look nice. For my hex-based game, I don't use tiles at all and it works remarkably well.

Hex Overlay
Hex Overlay 2

If it turns out for some reason you do insist on drawing authentic hex tiles and your tiles are in a ratio similar to mine, let me know because I have a bunch of old tiles you can have that I made before I switched to pre-rendered backgrounds.

Fladimir da Gorf
Member #1,565
October 2001
avatar

He-hey, isn't that a nice looking HOMM clone, Ashteth! :)

OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori)

Ashteth
Member #3,310
March 2003
avatar

Thanks for the compliment... Hopefully it will be finished someday;D

Of course seeing things like:
Heroes 5
It gets a little depressing. My game isn't a Heroes clone though and is more like a hybrid of Heroes and Magic the Gathering, so there's still a chance I can win on the gameplay front.

Dylan O
Member #5,403
January 2005

That really is a nice ripoff of Xcom. Great job :D

Max Savenkov
Member #4,613
May 2004
avatar

Thanks for your responses.

Quote:

Have you considered xcom-style? Diamond shaped tiles. I personally would probably go with xcom style because I think it makes engine a little easier to code. Also I think map making is a little easier.

Diamond-shaped tiles are OK, but still, I'll need to overlay hexagonal grid over them, because square grid is evil (for RPG).

Quote:

Depending on the size of your map, you could also ignore tiles altogether and simply opt for a pre-rendered background

I'd say "no". I'm not good enough with Photoshop and it's hard to find a designer for free these times :) It's a bit easier to design level from tiles, I suppose, though it will look a bit duller (anyway, Fallout rules and Baldurs Gate sucks :)).

I'd say I'll use diamond-shaped tiles then with overlayed hex grid.

Quote:

Of course seeing things like:
Heroes 5
It gets a little depressing.

Hey, cheer up! GFX isn't what makes a game great! I'd vote for Master of Magic over Age of Wonders any day of week.

BTW, I've attached a screenshot of what I have now in my engine (so far, it uses hexagonal tiles).

HoHo
Member #4,534
April 2004
avatar

Quote:

because square grid is evil (for RPG).

Why? I thought of doing a RPG with my xcom-like engine and I didn't see anything evil about it.

At first when I read that you are going to use diamond shape tiles overlayed with hexagonal grid I thought it would be a nightmare. But seeing the screenshot I think it might work out quite nice

__________
In theory, there is no difference between theory and practice. But, in practice, there is - Jan L.A. van de Snepscheut
MMORPG's...Many Men Online Role Playing Girls - Radagar
"Is Java REALLY slower? Does STL really bloat your exes? Find out with your friendly host, HoHo, and his benchmarking machine!" - Jakub Wasilewski

Ashteth
Member #3,310
March 2003
avatar

Quote:

BTW, I've attached a screenshot of what I have now in my engine (so far, it uses hexagonal tiles).

Oh teh noes! Your using the wrong type of hexagons :)

If you decide to use the correct type of hexagons, here is part of my old tile set:
Hexagon Tiles

You (and everyone else) are free to use these tiles in any commercial or freeware project you desire. Don't even have to give me credit. If you get a good demo, I might even be tempted to create some more...

In case you want to make your own, I highly recommend the free version of Reptile (1.0) from Sausage Software. Make a bland/generic texture that is easily tileable and then in a paint program, play around with the brightness and contrast. Once you have a nice base, save a bunch of copies and use the color dodge/burn tool to add variety. I kind of like how a lot of my hex tile set turned out, but then I like pre-rendered with hex overlays even more:)

Max Savenkov
Member #4,613
May 2004
avatar

Quote:

Oh teh noes! Your using the wrong type of hexagons

Hey, what's wrong with them? :) Ofcourse, they have different size from yours, but my engine can handle it with minimal changes, if needed :)

Quote:

Why? I thought of doing a RPG with my xcom-like engine and I didn't see anything evil about it.

You'll have either to forbid diagonal movements (the way it is done in X-Com, but it's a bit unrealistic) or make some special decisions about them. It is OK after all, but you'll have your own troubles.

HoHo
Member #4,534
April 2004
avatar

Quote:

You'll have either to forbid diagonal movements (the way it is done in X-Com, but it's a bit unrealistic) or make some special decisions about them.

In Xcom its possible to move in eight directions. Of cource, diagonal moves are usually a bit more costy in some circumstances.

Quote:

It is OK after all, but you'll have your own troubles.

I'm quite positive threre would heve been several bigger and a bunch of smaller problems to solve, just like in any kind of game/engine.

__________
In theory, there is no difference between theory and practice. But, in practice, there is - Jan L.A. van de Snepscheut
MMORPG's...Many Men Online Role Playing Girls - Radagar
"Is Java REALLY slower? Does STL really bloat your exes? Find out with your friendly host, HoHo, and his benchmarking machine!" - Jakub Wasilewski

Fladimir da Gorf
Member #1,565
October 2001
avatar

Quote:

Hey, what's wrong with them? :) Ofcourse, they have different size from yours, but my engine can handle it with minimal changes, if needed

Imagine a character to walk right with your tiles, then with Ashteth's tiles. ;)

OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori)

Max Savenkov
Member #4,613
May 2004
avatar

Oh, OK their orientation is different...

BTW, I came up with "brilliant" idea: what if I'd make (have someone make) pre-rendered map of territory (without accesable building, which sould be constructed from objects, not tiles) and then approximate it with tileset to save disk space and memory? I.e. if large part of pre-rendered map is filled with grass texture, let's make a several "grass" tiles and use them instead. Ofcourse, this way we'll have separate tileset for each scene and there will be some quanity of "unique". Oh, well, I'll need a good algorithm to compare two images then. Does anybody know one?

EDIT: tried naive algorithm of comparing pixel-by-pixel HSV-wise. The best result is 88 40x40 tiles instead of 300 (if every one was unique) and not very distorted image... 1/3 compression doesn't seems very bad, but it was only 800x600 pixels bitmap. So think: if location is REALLY big (like, 10x10 screen sizes), I'd have 8800 tiles agains 30000 without "compression". That's still bad enough, though, because 8800 40x40 tiles in png would take A LOT of space, and BTW Fallout ONLY has 1600 tiles for ALL locations!! Gotta think harder...

Go to: