GrfMaker revival - call for test data

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Re: GrfMaker revival - call for test data

Post by belugas »

AndersI wrote:...the more I look at the program, the more I appreciate the tremendous lot of work gl2 has put into it. Give him my best wishes!
Add me to the list of new fan! I forgot to mention that. The work done is incredible, the imaginative solutions to different problems encountered are fascinating too. I just hope we'll be able to make it even better :)

It is a real pleasure to play around with the code, and I feel priviledged to be able to contribute to this project, the same way I feel about been able to contribute to OpenTTD.

And a big thank you to all those who supplied test cases :bow:
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: GrfMaker revival - call for test data

Post by DaleStan »

Csaboka wrote:The basic trick is keeping 2K of the previous sprite data in the memory, and using two-byte "back pointers" instead of the data itself when the new data is already present somewhere in the buffer.
For more fun and games, you can even say "copy the next ten bytes from the buffer, starting three bytes ago". This type of encoding can save some space, but is probably more complicated than encoding that guarantees that the count is at least as large as the offset.

(If you ever decide to deal with decoding, note that if you've got equivalents to the C memcpy and memmove, neither are safe. The former has undefined behaviour in that circumstance, and the latter has the wrong behaviour.)
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
minime
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 18 Jan 2004 10:02
Skype: dan.masek
Location: Prague, Czech Republic
Contact:

Re: GrfMaker revival - call for test data

Post by minime »

DaleStan wrote:This type of encoding can save some space, but is probably more complicated than encoding that guarantees that the count is at least as large as the offset.
From my experience, there is only little extra work in implementing this type of encoding strategy. In practice, when you use the maximum possible overlap that the format allows (15), you gain another 2-5% on the compression ratio.

I somewhat suspect that the current encoder in GrfMaker isn't very well done, since all the files I've seen produced by it were quite a bit bigger than what even grfcodec can produce.

You can have a look at my c++ implementation of grf encoder/decoder in it's repository. I haven't touched it for a while, and it could certainly use some work, since it's a bit on the slow side, but it does the job.
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. --Albert Einstein
Image Image Image
User avatar
Aegir
Tycoon
Tycoon
Posts: 2884
Joined: 09 Feb 2004 10:02
Contact:

Re: GrfMaker revival - call for test data

Post by Aegir »

When I get off my lazy arse I'll re-upload my entire portfolio of sets I have coded in grfmaker. I still intend on swapping to full NFO (I devoted far too much time to my custom makefile), but my .lst's should be of use for grfmaker's development.
Currently working under the name 'reldred' on Github, and Discord.
NFO/NML coder, part-time patch writer for JGRPP, and all round belligerent.

14:40 <orudge> I can't say I discriminate against any particular user
14:41 <Aegir> orudge: I can!
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: GrfMaker revival - call for test data

Post by AndersI »

Csaboka wrote:While testing the sources, I was reminded to another annoying thing - the loading times are way too high. The LST has 3460 entries, and v3.03 needs 30 seconds to load it on this machine.
Just a little teaser: I'm down to ~30 seconds for the full cycle: start GrfMaker, load TTRS3, create GRF, close GrfMaker :P

That's with compiler optimizations ON, range and overflow check OFF. Flipping these three gives me ~52 seconds full cycle. If you compile GrfMaker yourself, check those settings.

Edit: After my latest changes the times are down to 23 resp. 34 seconds, so now the unoptimized compile is almost as fast as the optimized was previously...
User avatar
karlneil
Engineer
Engineer
Posts: 53
Joined: 10 Jul 2007 08:32
Location: Estonia

Re: GrfMaker revival - call for test data

Post by karlneil »

any hope of getting road vehicle (trams) articulation in grfmaker. I got all of my set done in grfmaker and its a real handy program :mrgreen:
Projects: Modern Tram Set (Topic)
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: GrfMaker revival - call for test data

Post by DaleStan »

That has exactly nothing to do with the topic. Go find the right topic next time.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Ahrefs [Bot], Amazon [Bot] and 12 guests