Make a Tileset from Scratch?

Contribute, display and discuss art and tilesets for use in Freeciv here.
cazfi
Elite
Posts: 3227
Joined: Tue Jan 29, 2013 6:54 pm

Re: Make a Tileset from Scratch?

Post by cazfi »

Hans Lemurson wrote:Haven't tried this with debug launches from console, though. Maybe it would give the full list of problems as opposed to just #1 out of 137.
Not necessarily even debug log level thing, but if you run client from the console, you would see what it prints to the console in general.

Gui is more for the end user of your tileset. She/he is not interested about technical jargon of why your tileset fails to load.
Hans Lemurson
Veteran
Posts: 108
Joined: Mon Aug 22, 2016 10:25 pm

Re: Make a Tileset from Scratch?

Post by Hans Lemurson »

cazfi wrote:
Hans Lemurson wrote:Haven't tried this with debug launches from console, though. Maybe it would give the full list of problems as opposed to just #1 out of 137.
Not necessarily even debug log level thing, but if you run client from the console, you would see what it prints to the console in general.

Gui is more for the end user of your tileset. She/he is not interested about technical jargon of why your tileset fails to load.
I'll keep that in mind, thanks. Gotta break out of my GUI-centric habits.
Wishes he could convert Civ2's scenarios to FreeCiv...
But instead, he made his own tileset variants, RoundSquare and Sextant-enHANSed, and refuses to play on anything else. Check them out!
Hans Lemurson
Veteran
Posts: 108
Joined: Mon Aug 22, 2016 10:25 pm

Re: Make a Tileset from Scratch?

Post by Hans Lemurson »

More fun facts: The gtk-3 client will not launch if a tileset contains a graphic accidentally saved in an unreadable format.

Renamed a file to *.png which was NOT a png, and the client crashed saying the graphics file was missing. The client then refused to launch (silent instant crash) until I fixed the graphic.

No luck on getting debug messages when launching freeciv-gtk3.exe from Windows PowerShell.
Wishes he could convert Civ2's scenarios to FreeCiv...
But instead, he made his own tileset variants, RoundSquare and Sextant-enHANSed, and refuses to play on anything else. Check them out!
cazfi
Elite
Posts: 3227
Joined: Tue Jan 29, 2013 6:54 pm

Re: Make a Tileset from Scratch?

Post by cazfi »

Hans Lemurson wrote:No luck on getting debug messages when launching freeciv-gtk3.exe from Windows PowerShell.
Right. There might be code making it to detach from the console in Windows (I think I've cursed such behavior in the past).
Not as good as seeing it to print messages to screen, but you may have better luck with writing log to a file with "-l <filename>" commandline parameter.
Hans Lemurson
Veteran
Posts: 108
Joined: Mon Aug 22, 2016 10:25 pm

Re: Make a Tileset from Scratch?

Post by Hans Lemurson »

I got the debug info printed out into a log file, so that's good.

The bad news is, I've been getting an error ever since I changed the name of a file. I made sure to change the .png file name, the .spec file name, the name of the file that the .spec file loads, and the name of the .spec file that the .tilespec file loads.

And now I get the following crash no matter what I do: 2: in tileset_error() [../../../../client/tilespec.c::583]: Map topology and tileset incompatible.

Did I forget a comma somewhere? Maybe a file isn't properly terminated with a newline.
Who knows?

But I know two things for sure:
-It is NOT a topology incompatibility. That message is sooo useless. (the tileset was working 20 minutes ago, and my only changes were with the "unitcost" file)
-Editing tilesets is like walking through a %!#&@ mine-field. :x All it takes is one trivial error, and the whole system comes crashing down.

...
The problem in this case was that I accidentally deleted the file reference to unit.spec when I was changing unitcost.spec.
I had to go to debug level 3 to find this out.

Important lesson: Any error in the ".tilespec" file shows up as a Topology Incompatibility.
Wishes he could convert Civ2's scenarios to FreeCiv...
But instead, he made his own tileset variants, RoundSquare and Sextant-enHANSed, and refuses to play on anything else. Check them out!
cazfi
Elite
Posts: 3227
Joined: Tue Jan 29, 2013 6:54 pm

Re: Make a Tileset from Scratch?

Post by cazfi »

Hans Lemurson wrote:Map topology and tileset incompatible.[/b]
To get so far that one gets that error would indicate that tileset has loaded succesfully, and only when its topology is compared to that of the game settings, it fails.
cazfi
Elite
Posts: 3227
Joined: Tue Jan 29, 2013 6:54 pm

Re: Make a Tileset from Scratch?

Post by cazfi »

Improving that particular error message -> Feature #899315.

Can you send your non-working tileset so I can investigate what goes wrong, and why it's not giving good error message?
Hans Lemurson
Veteran
Posts: 108
Joined: Mon Aug 22, 2016 10:25 pm

Re: Make a Tileset from Scratch?

Post by Hans Lemurson »

cazfi wrote:Improving that particular error message -> Feature #899315.

Can you send your non-working tileset so I can investigate what goes wrong, and why it's not giving good error message?
Is attaching a zip file to this message good enough, or would you like it through some other channel (since this isn't technically the bug-reporting section)?
Attachments
RoundSkew Bugged.zip
(377.69 KiB) Downloaded 430 times
Wishes he could convert Civ2's scenarios to FreeCiv...
But instead, he made his own tileset variants, RoundSquare and Sextant-enHANSed, and refuses to play on anything else. Check them out!
cazfi
Elite
Posts: 3227
Joined: Tue Jan 29, 2013 6:54 pm

Re: Make a Tileset from Scratch?

Post by cazfi »

Even after disabling number of debug features (which were producing more logs about the situation) from my freeciv build to make it like more like what gets built for Windows as official release, I get:
1: in tileset_read_toplevel() [../../../src/client/tilespec.c::1775]: Could not open '/fast/freeciv/rulesets/3rd/S2_6/data/RoundSkew.tilespec':
In secfile_from_input_file() [../../../src/utility/registry_ini.c:465]: secfile '/fast/freeciv/rulesets/3rd/S2_6/data/RoundSkew.tilespec' in section 'tilespec': Expected value
file "../../src/data/misc/colors.tilespec", line 1, pos 0
looking at: '[colors]'
included from file "/fast/freeciv/rulesets/3rd/S2_6/data/RoundSkew.tilespec", line 127
This was with default debug log level (number '1' in the beginning indicates that this is an error level message)
Hans Lemurson
Veteran
Posts: 108
Joined: Mon Aug 22, 2016 10:25 pm

Re: Make a Tileset from Scratch?

Post by Hans Lemurson »

More fun facts!
In an isometric tileset, some images are not centered the same way that Terrain is.

The graphics like Bases and Units have their base Y-value shifted upwards by about half a tile. This is reasonable, since you want to have the possibility of going extra-tall. If you need to go lower, you can just draw the graphics lower-down

However, a great annoyance is that the graphics for Tile Yields, have an inherent X-offset which prevents you from displaying them any further left than this:
Image
I wanted to get the blue production-pips aligned with the center of the tile, but this seems physically impossible.
The Food dots are already at the leftmost edge of the graphic.

Is there any way to control this graphical offset? There are controls for many offsets, but I haven't seen any reference to this one. It might not have come up before, because I'm not sure how many people have tried to make a 48px wide isometric tileset.
If my graphics were 64px wide, the inherent 12-pixel offset wouldn't be much of a problem.


........
Looking further into it...
This appears to have been a deliberate design decision: https://github.com/freeciv/freeciv/blob ... 4676-L4696
The const ints ox and oy are set to 1/3 of the tile-width for isometric tilesets.
A negative value for Y, shifting the graphic upwards (fine, you can always go lower if you want in your graphic)
A positive value for X, shifting the graphic rightward (which is impossible to compensate for).

There's a small chance it was a bug (forgot to make X negative too? Maybe was only supposed to apply to iso-hex?), but given that every single isometric tileset that's ever been made has its tile yield graphics aligned based on these...could be a pain to fix.
Wishes he could convert Civ2's scenarios to FreeCiv...
But instead, he made his own tileset variants, RoundSquare and Sextant-enHANSed, and refuses to play on anything else. Check them out!
Post Reply