Hex tileset needs very large y offsets, problems ensue

Contribute, display and discuss art and tilesets for use in Freeciv here.
User avatar
HanduMan
Posts: 44
Joined: Sat Feb 02, 2013 9:14 am

Re: Hex tileset needs very large y offsets, problems ensue

Post by HanduMan »

cazfi wrote:
HanduMan wrote:If someone is going to do it, they should also correct what is said about is_isometrcic and is_hex in the booleans section.
Dear someone / HanduMan, please enlighten us about what's wrong there, preferable by updating the wiki.
HanduMan about his iso-hex tileset wrote:

Code: Select all

; Basic tile sizes:
normal_tile_width  = 128
normal_tile_height = 34
small_tile_width   = 15
small_tile_height  = 20

; Basic tile style.
is_isometric = 0
is_hex = 1
hex_side = 30
Note that to make an isometric hex set we need to define is_isometric = 0 :roll:
Treefingers wrote: I've been using the hex2t settings as a reference since it's a complete non-iso hex set. So I actually have "is_isometric=1" (I second the :roll: ) since that's what hex2t was using. I haven't had any problems with pathing so I assumed this was fine. I did have pathing issues when I switched to "is_isometric=0", so I just put it back.
I cannot update the wiki myself. As a noob in that thing I cannot find the rolling eyes emoticon in there. :roll:
Treefingers
Posts: 20
Joined: Fri Nov 08, 2013 11:40 pm

Re: Hex tileset needs very large y offsets, problems ensue

Post by Treefingers »

I think my little closing rant might have dropped the tone of this thread. Sorry for that. It was late and I just had a meatspace argument with another open source fan about a similar topic. Not that that excuses me.

As for the wiki/documentation, I'm actually not sure what the update's content should be. With square grid maps, it's broadly accepted across many games that diamond shaped tiles means "isometric" and square tiles means "non-isometric". There isn't an accepted orientation for hexagonal tiles, though.

So I don't know which part of the wiki is incorrect or incomplete.
When is_hex is specified (see is_hex, below), this value gives the length of the extra side of the hexagon. This extra side will be on the top/bottom of the tile if is_isometric (below) is given, or on the left/right of the tile otherwise.
(from the "hex_side" entry) This defines the orientation of the hexagons, and the boolean value for is_isometric contradicts this. But it's not clear whether the boolean is reversed or the definitions are wrong.

What does an isometric hex tile look like? Is the top a vertex or edge? It's not at all obvious, though I do think vertex-at-top makes more sense for perspective views (as in civ5; and since iso-square is also vertex-at-top) while edge-at-top is better (or maybe just not worse) for non-iso (worked nicely for Civil War General). Personally, because of this ambiguity, I'd rather see the hex tiles delineated differently (say, using "___-at-top" rather than "is_isometric"), so they're defined by pathing rules, not by assumptions about the graphics. Then just let artists pick which orientation they'd like to use, and choose whether to use foreshortening or not:
hex orientation.png
hex orientation.png (9.46 KiB) Viewed 10242 times
As for unit_height and unit_width, can't experimental features that at least sort of work still be documented? Why not just document the feature, but slap a "this is experimental" disclaimer on it? Then it's all out there.

The effect of unit_height and _width is difficult for me to figure out. I've tried a number of sizes from 0 to 256, and all that seems to happen is that the graphics get a little glitchy. The units stop blinking while selected, and are partly obscured by the terrain. There is no visible effect, however, on the things I've been trying to fix.

Thanks to all for your input so far.
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Hex tileset needs very large y offsets, problems ensue

Post by cazfi »

Treefingers wrote:The effect of unit_height and _width is difficult for me to figure out. I've tried a number of sizes from 0 to 256, and all that seems to happen is that the graphics get a little glitchy. The units stop blinking while selected, and are partly obscured by the terrain. There is no visible effect, however, on the things I've been trying to fix.
Have you changed size of your unit sprites to match the values you have been giving?
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Hex tileset needs very large y offsets, problems ensue

Post by cazfi »

Treefingers wrote:As for unit_height and unit_width, can't experimental features that at least sort of work still be documented?
Ok, they can, but documenting them is lower priority than documenting main features, especially when that feature might disappear again in the future (at worst we fail to update documentation back at that point, and at least documentation changes back and forth take our valuable time)
User avatar
GriffonSpade
Elite
Posts: 578
Joined: Mon Apr 29, 2013 4:41 pm

Re: Hex tileset needs very large y offsets, problems ensue

Post by GriffonSpade »

Most of the stuff on tiles does not have a special offset anywhere, and offsets must be made by manually editing the image files. Feel free to take a look at for reference or ripping anything from my isophexbig tileset to help you. Though yes, there tends to be a rather large amount of whitespace, though that itself can have uses (such as placing the upkeep costs)
Treefingers
Posts: 20
Joined: Fri Nov 08, 2013 11:40 pm

Re: Hex tileset needs very large y offsets, problems ensue

Post by Treefingers »

Yeah, it looks like I'll just have to suck it up, move forward with things, and just hope that someday fixing the image positioning and GUI padding wanders to the top of the devs' priority list. I mean, surely the fact that unit and city images don't start anywhere near the tile they occupy counts as a proper bug?

I'm also vaguely aware that there exist alternate GUIs for the game. Are there any out there that might not have the giant whitespace in the city management dialogues? As a stop-gap, I'd could suggest it to anyone who ends up using my set.

Matching my unit image sizes to the unit_height/_width properties didn't do anything relevant to my issues. There weren't any tile-overlapping-unit glitches, though.

So if I can manage to line things up with image sizing, I'll push forward and ignore the wonky city management panels. If not, I'll make a final post to let you all know I've given up for the time being and not to hold your breath for what surely would have been the greatest something in the history of everything. ;)
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Hex tileset needs very large y offsets, problems ensue

Post by cazfi »

Treefingers wrote:counts as a proper bug?
If you have bug to report, please report it to bug tracker (I could do it for you, but it's better that you do it) https://gna.org/bugs/?func=additem&group=freeciv
Not all devs follow forums, and even who do can esily forgot a bug reported only here (if not addressed immediately), but not to tracker where we constantly recheck for them.
Treefingers
Posts: 20
Joined: Fri Nov 08, 2013 11:40 pm

Re: Hex tileset needs very large y offsets, problems ensue

Post by Treefingers »

cazfi wrote:If you have bug to report, please report it to bug tracker
You're right, I should (and will). Though I'm never sure what to report for bugs that are more at the aesthetic end of things, since it's always debatable whether there's a problem in the first place, and the solution tends to be a matter of taste. I'll head over and do what I can, though.
Treefingers
Posts: 20
Joined: Fri Nov 08, 2013 11:40 pm

Re: Hex tileset needs very large y offsets, problems ensue

Post by Treefingers »

Compiled 2.4 for myself just to make sure the problem persists in the latest stable release (it does) before filing a report.

I've also squashed the grid a little more, increasing the foreshortening and consequently reducing the tile's overall vertical dimension. Combined with larger unit graphics that match my tiles' size, I've got the unit y offset down to 64, which is much more reasonable. I may even shrink this further if I use taller unit images to make room for more aircraft height and longer polearms.

This also adds fuel to my suspicion that the "is_iso" Boolean is programmed correctly, and that it's the wiki/terminology that is applied incorrectly. If done with a full top-down perspective, those y offsets would be extremely large, when they should be closer to zero in that orientation/perspective. But, like I said before, since there's no such thing as a "natural" orientation for a foreshortened hexagon, I'm not confident enough where the problem is to go reporting bugs or editing wikis about this part.
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Hex tileset needs very large y offsets, problems ensue

Post by cazfi »

I have no time to investigate all the tileset related problems reported here at the time, but quick note anyway: Fixing these would probably require changes to tileset format, so won't happen in 2.4. I hope to get them handled before 2.5 format freeze.
Post Reply