NightGFX Base Graphics Set [Updated 3-30-2019]

Find and discuss all the latest NewGRF releases for TTDPatch and OpenTTD here.

Moderator: Graphics Moderators

User avatar
Andrew350
Route Supervisor
Route Supervisor
Posts: 488
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: NightGFX Base Graphics Set [Updated 1-30-2019]

Post by Andrew350 » 31 Jan 2019 07:45

Ahem...

After over 5 years since release, NightGFX has finally received an update! This new release brings a major change by decreasing the level of darkness by 15%, making it much more bearable to play with while still giving a night-time feel. I also added the one missing sprite that OpenTTD has been complaining about for the last 4 years or so, making it finally "up-to-date", although I haven't (yet) included the 2x zoom GUI sprites found in standard OpenGFX. Other than that the set is basically still the same, so no big changes to the lighting effects yet, although I still would like to at some point, along with a few other ideas I have.

I've also made sure to take the time to create proper, layered source files this time around and actually save them, to make further editing in the future much easier. :wink: Along with that I've been working on re-writing my simple documentation to be a little more in-depth than before, since after 5+ years away, even I found it difficult to get back into. Once I'm done I may post it here, but for sure I will add it to the directory next to the source archive on my website (link in first post) if anyone is interested. At least the basic build instructions are included in the source bundle now :)

See below for the comparison pics, and as before the set can only be downloaded via the online content. Let me know what you think, otherwise enjoy :)
Attachments
ngfx1.png
ngfx1.png (637.49 KiB) Viewed 2891 times
ngfx2.png
ngfx2.png (687.98 KiB) Viewed 2891 times


User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9291
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: NightGFX Base Graphics Set [Updated 1-30-2019]

Post by planetmaker » 31 Jan 2019 10:22

very nice! :)

User avatar
Gwyd
Chief Executive
Chief Executive
Posts: 698
Joined: 17 Apr 2017 16:52
Location: Western Ile-de-France Region

Re: NightGFX Base Graphics Set [Updated 1-30-2019]

Post by Gwyd » 31 Jan 2019 19:46

Let's get some night GRFs :)

User avatar
Andrew350
Route Supervisor
Route Supervisor
Posts: 488
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: NightGFX Base Graphics Set [Updated 1-30-2019]

Post by Andrew350 » 03 Feb 2019 23:45

Thanks everyone :)
Gwyd wrote:Let's get some night GRFs :)
I agree, and on that front, I've finally completed a first draft of my more in-depth tutorial for converting sprites to night:
32bpp-nightgfx-tutorial.txt
(14.64 KiB) Downloaded 63 times
I may have gone slightly overboard on my explanation; it sort of turned into a "How to make 32bpp graphics" tutorial rather than just focusing on doing a night conversion, but maybe someone will find that useful also. :)

If anyone feels like reading it and has any comments/suggestions for improvement that would be welcome!

User avatar
Andrew350
Route Supervisor
Route Supervisor
Posts: 488
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: NightGFX Base Graphics Set [Updated 1-30-2019]

Post by Andrew350 » 21 Feb 2019 06:21

Large multi-topic post incoming...

Tutorial
==========

Since there were no complaints about the tutorial, I've gone ahead and added it to my website next to the source bundle for future authors to find. If you still happen to find any errors or have any questions, do let me know. :)

Progress update
==========

I've been working a little on adding some more lighting effects, starting first with a suggestion by supermop long ago to add some extra runway eyecandy at airports:
Bondworth Falls Transport, Jun 11th, 2050.png
Bondworth Falls Transport, Jun 11th, 2050.png (39.13 KiB) Viewed 1820 times
These lights unfortunately only really work on the City Airport, but it looks cool nonetheless.

Also started adding some navigation lights to planes and will do the same for ships. Improvements to industries and buildings will hopefully come next.

NewGRF News! (Sort of)
==========

So in the first post of this thread I made a claim that it is not possible for NewGRFs to detect a base graphics set, therefore making and playing with night NewGRFs wasn't really viable unless you wanted to always be stuck in the dark.

Well, I've proven myself wrong.

As it turns out, it is in fact possible for NewGRFs to detect NightGFX, and thus conditionally provide nighttime sprites only when it is active. It's done basically the same way you detect if another NewGRF is active, in NML specifically the grf_current_status function. The nightgfx_extra.grf file, which is part of the baseset bundle, has a GRFID (in this case "\FFOTN") which can be queried to see if it is active, and surprisingly it actually works despite being part of a baseset.

[Example]:
The way I did it was start by defining a simple test for NightGFX:

Code: Select all

nightgfx_check = (grf_current_status("\FFOTN") == 1);
Later, somewhere in the graphics callback (just before deciding what spritesets to use) include a switch to test for this:

Code: Select all

switch (FEAT_SHIPS, SELF, switch_spriteset_rhododendron_ferry_night_check, nightgfx_check) { 
	1: spriteset_rhododendron_ferry_1_stopped32;
	spriteset_rhododendron_ferry_1_stopped;
}
This switch will point to either the normal "daytime" graphics or, if the condition is true, a dummy/copy of that spriteset with a unique identifier that will later be used by the alternative_sprites block where the "night" graphics will be provided.
[/Example]

Doing this I was able to make a test NewGRF switch between daytime and nighttime by saving the game, exiting to the menu, switching base sets, and reloading the game. Admittedly it's a little bit of a hackish solution, but it does seem to work. It certainly could make it easier for NewGRF authors to decide to make night grfs now that it doesn't need to be exclusive :) I'm just more than a little disappointed I didn't realize this earlier, it's so obvious :lol: (The same technique could be used to detect other base graphics sets as well, as long as you know the GRFID to query, but what purpose that might serve I don't know.)

Anyway, hopefully someone will find this interesting; I know I certainly did :)


User avatar
Andrew350
Route Supervisor
Route Supervisor
Posts: 488
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: NightGFX Base Graphics Set [Updated 3-30-2019]

Post by Andrew350 » 30 Mar 2019 07:07

NightGFX 1.2.0 Now Available!

In anticipation of OpenTTD 1.9.0 releasing in a few days, I've gone ahead and updated NightGFX to include the new group livery GUI icons to make this set fully up-to-date alongside OpenGFX. (Thanks to Gwyd, planetmaker, and Brumi who made the update; I just copied it!)

Alongside the compatibility update I've also included the new airport runway lighting effects and the navigation lights for planes and ships. All airplanes and ships should have correct nav lights. These lights are only one pixel for now and may be hard to spot, but if you notice any that are wrong or missing please let me know so I can fix them :)

Also in this update I've added a super secret fun easter egg for people to find. 10 points goes to whomever finds it :wink:

As usual the set can be found via the online content. Enjoy! :)

Post Reply

Return to “Graphics Releases”

Who is online

Users browsing this forum: No registered users and 1 guest