Graphics Theoretical
Moderators: Ice Cream Jonsey, joltcountry
-
- Posts: 878
- Joined: Tue Jun 25, 2002 9:55 pm
- Location: Aurora, IL
Graphics Theoretical
Suppose some twisted soul wanted to depict movement on a hex map in Hugo: Is it possible to do overlaying graphics so you could depict the map as one file and icons depicting the actors as seperate files and move them in relation to one another?
-
- Posts: 119
- Joined: Fri Jun 27, 2003 12:10 pm
Graphical tiles
I'm thinking not quite the way you'd like, especially if you want to be overlaying hex tiles on a map. Hugo's graphical display is (partly by design) not pixel-specific. There's been a bit of a trade-off in low-level functionality vs. portability and being adaptable to different screen resolutions/shapes/etc.
It is possible to do graphical overlays over a background image or set of images--for instance, I do this in my nearly finished work-in-progress. But it's easiest if the overlaid images are square (because JPEG doesn't support transparency) and if they're not required to be precisely aligned with respect to the background (because the built-in scaling and alignment functionality of the engine might work against you in that case).
It is possible to do graphical overlays over a background image or set of images--for instance, I do this in my nearly finished work-in-progress. But it's easiest if the overlaid images are square (because JPEG doesn't support transparency) and if they're not required to be precisely aligned with respect to the background (because the built-in scaling and alignment functionality of the engine might work against you in that case).
- Ice Cream Jonsey
- Posts: 30193
- Joined: Sat Apr 27, 2002 2:44 pm
- Location: Colorado
- Contact:
Re: Graphics Theoretical
Along those same lines: if I remember right, the "patent" on GIFs expired a while back. I think GIFs (which allow transparencies) would allow hex mapping to be realized. Is the addition of GIFs "in the works" as they say?Debaser wrote:Suppose some twisted soul wanted to depict movement on a hex map in Hugo: Is it possible to do overlaying graphics so you could depict the map as one file and icons depicting the actors as seperate files and move them in relation to one another?
(If it's in 3.1 already, I respectfully withdrawl my argument to disolve the senate.)
the dark and gritty...Ice Cream Jonsey!
- Ice Cream Jonsey
- Posts: 30193
- Joined: Sat Apr 27, 2002 2:44 pm
- Location: Colorado
- Contact:
-
- Posts: 878
- Joined: Tue Jun 25, 2002 9:55 pm
- Location: Aurora, IL
From here:Ice Cream Jonsey wrote:Huh. I could have sworn that the Slashdot nerds just lost it over the revelation that Compuserve's laughable patent had expired.
We were able to search the patent databases of the USA, Canada, Japan, and the European Union. The Unisys patent expired on 20 June 2003 in the USA, but it does not expire in most of Europe until 18 June 2004, in Japan until 20 June 2004 and in Canada until 7 July 2004. The U.S. IBM patent expires 11 August 2006, (we are still searching the databases of other countries).
-
- Posts: 119
- Joined: Fri Jun 27, 2003 12:10 pm
Graphics format
I think I'd probably end up going with PNG vs. GIF. PNG is just so much better in that it allows alpha vs. paletted transparency (and of course is 24-bit color to boot).
I've played around with basic PNG display on Windows, BeOS, Mac, and Linux, but haven't pulled the trigger partly because, at least so far, there hasn't been any pressure to do it.
(However this still wouldn't solve the alignment issues you'd face in trying to do a hex-style map grid with overlays.)
I've played around with basic PNG display on Windows, BeOS, Mac, and Linux, but haven't pulled the trigger partly because, at least so far, there hasn't been any pressure to do it.
(However this still wouldn't solve the alignment issues you'd face in trying to do a hex-style map grid with overlays.)
-
- Posts: 2544
- Joined: Tue Jun 04, 2002 10:43 pm
Re: Graphics format
Well, sorta. For any size regular hexagon, there's a maximum-size square that will fit inside it, and that size is the side length. The spacing of the centers of the squares is the same as the spacing of the centers of the hexes (because their centers are the same), and is sqrt(3) ~= 1.732 times the side length.Kent wrote: (However this still wouldn't solve the alignment issues you'd face in trying to do a hex-style map grid with overlays.)
So if you can plop down an image at a specified pair of coordinates (which if you don't have pixel resolution maybe you can't do), you can still drop square tiles onto a hex grid and have it look OK.
Bruce