Page 1 of 1

BonkyGFX - Create a new Base Graphics set on macOS

Posted: 12 Dec 2023 14:43
by nanapipirara
Hi everyone,

When I was a kid I once created a full stylized pixel art 'skin' for SimCity2000. Unfortunately it's been lost in time and space. But I'd like to create a similar very stylized colorful set for OpenTTD. Just to replace all the main graphics. I understand it won't match with all the interesting NewGRFs out there if the style is completely unique, but I think it would be a fun project nonetheless.

I am a professional animator and know my way around graphical software and pixel art, I can code a few languages on an intermediate level, but I'm having trouble getting started.

Is there a way to unpack and repack the base graphics on macOS? Where do I start?

Re: Create a new Base Graphics set on macOS

Posted: 12 Dec 2023 15:18
by kamnet
The source code for OpenGFX is here: https://github.com/OpenTTD/OpenGFX

Compiling this copy of the code will require using Python as a pre-processor, and downloading and installing nmlc (NML compiler). NML is a meta-language that is fairly easy for those with some programming experience to pick up on, and it's not too terribly horrible for novice users, either. The pnml and nm files are plain text files that can be edited in any text editing program. There's a pretty detailed online manual and plenty of people to help you with questions.

You can "fairly easily" do a sprite replacement of all the graphics by editing the sprites, which are in either an 8-bpp indexed or full-color 32 bpp PNG file. You can use any graphics programs which exports to PNG. There are THOUSANDS of files here, so it's going to be a daunting task for sure, but not insurmountable. As a matter of fact, right now the guy who is largely responsible for OpenGFX has been working on a 2x and 4x scale revision, OpenGFX2, for a few years now.

But, basically - edit all the sprites, save in PNG, make whatever modifications to the source code you need (new file names, different dimentions/offsets/boundaries if needed, etc). Run the compiler to merge the code and graphics together and VOLIA! New base set graphics.

Re: Create a new Base Graphics set on macOS

Posted: 18 Dec 2023 18:50
by Zephyris
Did someone mention opengfx2? :)

Kamnet has covered everything pretty well. I'd just add that you'll probably get better responses/support on the discord openttd/add-on-development channel. And, it might be easier to try making a few simple graphics replacement newgrfs (add ons/mods) at first, the dive into making a base set. Essentially all of the concepts/methods transfer.

Re: Create a new Base Graphics set on macOS

Posted: 19 Dec 2023 12:23
by nanapipirara
Thanks for the replies :)

What I have in mind stylewise will clash with anything already out there. So I think a simply add-on is useless in this case. (I realise this is not what most people are looking for btw! I understand most people play with a bunch of extra stuff installed) I just like creating a new style, so I think a new base set would be smartest in this case.

I've looked into it, got completely stumped trying to compile a forked version of opengfx. Installing the Prerequisites alone is a daunting task. :/

I'll try again soon, and will keep an eye out on Discord.

Re: Create a new Base Graphics set on macOS

Posted: 19 Dec 2023 12:40
by nanapipirara
I was thinking something colorful and crisp like this. At the default TTD zoom level. I think it would suit the game very well, and would be a fun hobby project.

Image

Re: Create a new Base Graphics set on macOS

Posted: 19 Dec 2023 12:53
by kamnet
nanapipirara wrote: 19 Dec 2023 12:23 What I have in mind stylewise will clash with anything already out there.
This wouldn't be the first time. See, also: zBase, Night TTD, NightGFX, OpenGFX Mars, Brickland, RAWR, etc, etc.
So I think a simply add-on is useless in this case. (I realise this is not what most people are looking for btw! I understand most people play with a bunch of extra stuff installed)
There is a bunch of extra stuff that's popular, but I wouldn't assume that most people play with them. Most might use one or two things, but they're not slavishly devoted to it.
I just like creating a new style, so I think a new base set would be smartest in this case.
I like it! It's a wonderfully colorful alternative! I think people would enjoy it without having a bunch of supporting add-ons.

Re: Create a new Base Graphics set on macOS

Posted: 19 Dec 2023 13:36
by Emperor Jake
That would be a very cute baseset! I think it would work better at 2x zoom though, as the cartoony outlines would become proportionally very thick on 1x zoom :wink:

Re: Create a new Base Graphics set on macOS

Posted: 19 Dec 2023 14:29
by nanapipirara
Yeah absolutely, 2x might be more suitable. The default resolution is quite cramped for trucks etc, although that makes for a fun design challenge. But it's probably actually harder in this case. I will experiment a bit first.

Is it possible to only create the 2x graphics and will it display correctly when zoomed out? Will the graphics be pixel perfect since we run OTTD on high res displays nowadays? Or does it scale down the resolution and apply some kind of aliasing?

Does anyone have the OpenTTD palette for Aseprite? https://newgrf-specs.tt-wiki.net/wiki/P ... s#Palettes gives me a 502 Bad Gateway error.

The design I posted above is not my own btw, but I'm sure it gives a good impression of my goal.

Re: Create a new Base Graphics set on macOS

Posted: 19 Dec 2023 15:06
by 2TallTyler
I would love a base set in that style.

Here's the palette, as a Photoshop .act file.
https://github.com/2TallTyler/danish_tr ... td-dos.act

You might come join us on the OpenTTD Discord server. Most of us hang out there, and that's where Zephyris is working on OpenGFX2, which might be a good reference for you. ;)
https://discord.com/invite/openttd

Re: Create a new Base Graphics set on macOS

Posted: 19 Dec 2023 15:17
by Emperor Jake
No need to follow the palette at all, you could make 32bpp graphics but with its own limited palette to give it a unique look that sets it apart from other TTD graphics. The TTD palette is somewhat lacking when it comes to the bright pastel colours anyway.

I find it fun to draw stuff in the original palette though, so you might too (until there's liveries you just can't get quite right) :P

Re: Create a new Base Graphics set on macOS

Posted: 24 Dec 2023 09:18
by nanapipirara
Started development, with generous code help by ldpl.

BonkyGFX on GitHub

First few sprites

Re: BonkyGFX - Create a new Base Graphics set on macOS

Posted: 25 Dec 2023 08:01
by kamnet
It's a good start!

Re: BonkyGFX - Create a new Base Graphics set on macOS

Posted: 26 Dec 2023 21:45
by Lurkmore
Awesome! I might actually play with no vehicle grfs if this gets completed!

Re: BonkyGFX - Create a new Base Graphics set on macOS

Posted: 27 Dec 2023 09:25
by WolfRamXx
Indeed, if this set get's finished i maight actually have a go at playing vanilla game again.

Re: BonkyGFX - Create a new Base Graphics set on macOS

Posted: 04 Jan 2024 12:25
by nanapipirara
Image

Re: BonkyGFX - Create a new Base Graphics set on macOS

Posted: 04 Jan 2024 14:04
by 2TallTyler
This looks fantastic. I'm so excited for this. :D

Re: BonkyGFX - Create a new Base Graphics set on macOS

Posted: 05 Jan 2024 00:41
by skc
LOVING the look & feel these teasers are giving.

Can't wait to have a usable set to play with.