trakos/fbpviewer

Spritesheet generation

Closed this issue · 2 comments

Hi @trakos,
Do you have an automated way of generating the spritesheet that is necessary to download from the Factorio game data file, or are you doing it manually whenever a new version comes out? I would like to try to build an command line tool that generates static images from the blueprint strings and if that was possible it would be immensely helpful.

Thanks,
-- FB

Hey,

it's semi-automated. I prepared definitions for all entities mostly by hand, basically by trial and error. You can see the definitions here: js/factorio/entities. As you can see I simply include information where is the image for this entity, how it's stored, whether it's a compilation of multiple images, how many rows/columns it has, animation definitions, etc.

Then there's that tool: bin/dev_atlasgen.sh that runs this file: bin/fbpvatlasgen/atlasgen.js that results in the spritesheet you can see on the page.

It generates this spritesheet: http://fbpviewer.trakos.pl/images/spritesheet.png described by this json: http://fbpviewer.trakos.pl/images/spritesheet.json.

However, it's not fully automated, as I have to edit the definitions themselves.

I see. Well, it's automated enough, I would say. You must have put a serious effort to compile the entities the first time and keep them updated. Kudos to you!

Anyhow, thanks for the answer, it's greatly appreciated.

-- FB