GithubHelp home page GithubHelp logo

opengfx2's Introduction

OpenGFX2

opengfx2_titletext

"OpenGFX2" graphics base set for OpenTTD. It is drawn in a classic 8-bit pixel art style and trys to capture the feel of the original Transport Tycoon graphics by using similar colour schemes, building and object designs, etc. There are two variants:

  • OpenGFX2 Classic: An original graphics-style base set, 8-bit at 1x zoom (64 px wide tiles).
  • OpenGFX2 High Def: An enhanced base set, using 32-bit images for smoother shading at 4x zoom (256 px wide tiles) for more detail when zooming in.

OpenGFX2 is a spiritual successor to OpenGFX. Think of it as "OpenGFX version 2", or maybe that should be "OpenGFX director's edition", "refactored OpenGFX", or perhaps "OpenGFX extra zoom" or "OpenGFX 32-bit". Or some combination of all of them. OpenGFX2 is derived from OpenGFX, but extensively redrawn or revised from my original 32-bit sources. Almost all sprites have been updated or revised. It features far better organisation of sprites, extensive use of automated composite sprite generation (using Python of dubious quality) and is drawn and coded with extra zoom levels and 32-bit in mind.

Quick start

In-game content downloader / BaNaNaS

It is easiest to use the in-game content downloader (Check Online Content in the OpenTTD main menu).

To install, search for OpenGFX2, tick the checkbox next to "OpenGFX2 Classic" Base graphics, and hit Download.

To set as the base graphics set, go to Game Options > (Graphics) > Base Graphics from the OpenTTD main menu. Select OpenGFX2 Classic, then close the Game Options window.

Manual download

Download a release from the prebuilt GRF releases and install using the instructions below.

These are early release previews not available in the in-game content downloader. This includes base set versions (the "High Def" 32-bit 4x zoom version) and NewGRFs not yet available through the in-game downloader.

Installation

Install the baseset by copying opengfx2_8.tar and/or opengfx2_32ez.tar into the baseset directory for your OpenTTD installation.

Install the newgrfs by copying each .grf file into the newgrf directory for your OpenTTD installation.

To set as the base graphics set, go to Game Options>(Graphics)>Base Graphics Set and select OpenGFX2 Classic (8-bit 1x zoom version) or OpenGFX2 High Def (32-bit 4x zoom version).

OpenGFX2 has graphical user preferences. These can be configured in Game Options>(Graphics)>Base graphics set>Set parameters. These settings are local graphical changes only. You can freely change them and use them with any save-game, use any server, etc.

If you instead want for force a game or server to use OpenGFX2 graphics you can use the OpenGFX2 NewGRFs.

Prior to OpenTTD 14.0 (specifically nightlies prior to 30/10/2023 or before Github commit e81313e) OpenTTD did not have a way to configure base set parameters. The OpenGFX2 Settings NewGRF provides a workaround: Go to NewGRF Settings, find OpenGFX2 Settings and add to Active NewGRF files. Then, select OpenGFX2 Settings in the Active NewGRF files list and select Set parameters then adjust the settings.

Install other NewGRFs as normal using NewGRF settings.

Building

These notes are for if you want to build OpenGFX2 from the source files. If you just want to download OpenGFX2 then you don't need to worry about these.

Requires git lfs for large file handling. Once git lfs is installed then clone using git as normal.

Requires a system which can run bash shell scripts, python3 with PIL, blend-modes, numpy, skimage, nmlc, concurrent, multiprocessing, tqdm. This has been developed using Windows Subsystem for Linux (WSL) and might have peculiarities (eg. incorrect file permissions) on a real Linux install.

To build

Clone the repository, navigate to the repository root directory and run make_all.sh. It will take a long time...

The built baseset will be in baseset/, making different versions called opengfx2_<version>.tar.

The built newgrf(s) will be in newgrf/, making various .grf files.

Build process notes

Image processing makes a bunch of intermediate files, particularly *_8bpp.png and things in pygen directories. Others are _bt32bpp.png, _rm32bpp.png. These files are assumed to be temporary intermediates, and any user-modified versions will be blindly overwritten. Make sure you look at .gitignore see which files this applies to.

Files processed by python and encoded by nml are .png files, but those may be derived from other sources. Raw sprites were variously drawn\generated in Paint.NET, Aseprite, Blender and more. Conversion from those raw sources to .png files is not part of the build process - it must be done manually.

Development

These notes are to help development. If you are just downloading or building OpenGFX2 then you don't need to worry about these.

Release preparation

Remember to bump the versions:

  • Base set version in baseset/baseset_generate_obg.py
  • Base set version string in baseset/lang/english.lng
  • NewGRF versions in newgrf/nml/<newgrf_name>/<newgrf_name>-header.pmnl
  • extra.grf version in baseset/nml/extra-header.pnml
  • extra.grf/opengfx2_settings.grf co-compatibility check in baseset/nml/extra-header.pnml

For better or worse, base set currently uses fractional (0.1, 0.2, ...) versioning and NewGRFs use integer (1, 2, ...) versioning.

opengfx2's People

Contributors

zephyris avatar j-pie-314 avatar wensimehrp avatar masteroktagon avatar

Stargazers

Jianfeng Wu avatar Doniil avatar  avatar  avatar Markus avatar Pavel Koltsov avatar Mohamed Hammad avatar  avatar asasnat avatar Ian Earle avatar Su avatar  avatar  avatar Boris Callens avatar Matej Simek avatar  avatar Thomas Winwood avatar  avatar Tony Narlock avatar  avatar frosch avatar  avatar Nikolas Palm avatar Jordi Verdugo avatar  avatar Itamar Schen avatar Paul Roesink avatar ZTJ avatar Rex Zhang avatar Lukas avatar Peter Nelson avatar  avatar Botond avatar Jeames avatar Heiko August avatar  avatar Teoh Han Hui avatar Villanelle O'Reilly avatar  avatar Yi Yang avatar  avatar  avatar  avatar Ingo von Borstel avatar  avatar Gabriel  avatar  avatar  avatar

Watchers

 avatar  avatar Jordi Verdugo avatar  avatar  avatar  avatar  avatar  avatar

opengfx2's Issues

Sprite font missing = character?

I am not an expert at how the sprite font works. But when I type ?, it shows up as a blank character, and when I type = it shows up as ?. Either it's getting the wrong character, or the font isn't complete yet and I should be patient. 🙂

OpenTTD identifies ogfx2 v0.1 as newer

If the game sees the old and new versions of ogfx2, it identifies v0.1 as the newer one and uses it, which makes all previous bugs visible. The baseset is marked as downloaded in the online content.

изображение

If you delete/rename the old archive, the game will use v0.2.

изображение

Not sure if this can be fixed on your end, but it's at least worth mentioning it in the information in the online content.

Foundation glitch while building

Foundation walls look different in various compositions: There are 3 different walls on the middle tile here, depending on adjacent tiles:
image
The sprite changes while building the neighbouring tiles, which glitches and looks weird.

PBS signals use OpenGFX graphics assets in v0.1-beta

v0.1-alpha
image
v0.1-beta
image
Tried modifying game settings to no avail. Issue affects both standard OpenTTD and JGR's patch. Not sure if this is intentional or not because I personally dislike how OpenGFX electric path signal graphics look when placed on orthogonal track.

Bug in Metropolitan Airport graphics

Sadwood Transport, 12023-01-01

Steps to reproduce:

  1. Start a new game in JGRPP 0.54.2 with OpenGFX2 selected as the baseset graphics.
  2. Build a Metropolitan airport.
  3. There is a white horizontal bar from (most likely) a sprite misalignment.

3/4 flat rough ground tiles are missing the terrain gridlines at 1x zoom

1/4 tiles seem correct, and 2x and 4x zoom appear correct. Appears to occur in all climates. Presumably an issue with image size when generating the gridline overlay for the extended set of 4 flat tiles found in the rough ground tile spriteset, which only applies to the 1x sprite sheet. A white border width problem?

Palette animations not working in infrastructure sprites.

Specifically, runway landing lights (yellow cycle) and river banks on sea level (ie. estuary, bright water cycle) are not animated.

Likely originates from a shared issue overlaying infrastructure sprites onto terrain sprites, likely missing or ignored palmask images.

No OPENGFX2 settings

I followed the directions, and put the newgrf files into my newgrf folder, but there is no OPENGFX2 settings that shows up. also, all of the other newgrfs that I have downloaded have a uuID-name folder and then the nml/lang folders. should i create a similar structure?

Failure to Compile - Missing Module/Corrupted Files?

Am attempting to compile this, but running into some issues.

Do you have additional modules/dependencies you may have forgotten to mention? Found that you were also doing an import on 'blend_modes' that needed to be deployed to clear some errors, this was not mentioned in your description.

Current hurdle is that PIL seems to not be able to identify the image files with the following error targeted at the .PNG files: "PIL.UnidentifiedImageError: cannot identify image file"

Tried opening them up on using Paint.Net and Gimp and none of them will open. Best answer I've been able to find is something malformed in the images themselves, perhaps corrupted on upload to the Git?

On the side, any chance of a compile from your side with an upload into releases for those that aren't able to get this compiled?

Replace bash with make to improve build times, and improve reliability.

Your build system makes it very hard to run multiple jobs on multiple cores.

or skip parts of the build process that have already run.

Make allows you to trivially define a dependency graph, and it will run tasks in parallel using the '--jobs=' parameter, checking to see if the output files exist to skip jobs.

https://linuxhint.com/compiling-code-using-make/

Using a recursive make pattern should be similar to what you're doing here and maintain parallelism

https://stackoverflow.com/questions/1681006/parallelization-of-recursive-jobs-in-gnu-make

Your build system has some other weird things like calling bash instead of using shebangs, and the python scripts don't have the correct file system permissions so you can't actually run them on Linux them despite having shebangs, appending $PWD to $PATH instead of using ./script.py, I assume this isn't actually being built Linux/Unix, and instead on something like WSL due to this.

Would you accept a PR replacing bash with make?

Climate checks for tree replacement breaks JGRPP tree below snowline behaviour

Climate-specific tree replacements should not use climate checks, only parameter checks. There's jo overlay of sprite ranges between climates, so climate check is redundant. Current behaviour breaks in JGRPP, which can use temperate trees below the snow line in arctic, but these will not be replaced based on OpenGFX2 settings as temperate trees will not be changed outside of temperate climate.

https://discord.com/channels/142724111502802944/337701432230805505/1156511981545734184

Sprites with incorrect coordinates (visible white lines)

изображение
Oil refinery construction
2078
2079
2081
2082
2084
2085
2087
2088
2090
2091
2093
2094

изображение
Paper mill construction
2200 (shifted off bare ground)
2201
2204
2207
2211

idk, right after the "D opengfx2" sprite
4911
4917
4923
4929

Rail Depot sprite is incorrectly chopped

In OpenGFX2, the Rail Depot sprite is incorrectly cut up, which causes the rear wall of the depot to be drawn on top of any vehicle entering the depot:

image

This is the sprite from the original baseset. The rear wall is a separate sprite. I have not tested with road depots or other orientations.

image

Should canals be company-coloured?

company-colour

Canals appear to have a sign on the banks, which to me looks like the CC1 index colour, but it doesn't get recoloured accordingly (I am yellow, as seen on the track fences and airport).

If they're not supposed to be CC1, just close this. 😄

Suggestion: make crossings for maglevs more realistic

Crossing for ordinary rails is very easy to do in real life, it does not require special technological tricks. This is also well rendered in the game. Just road, just rails.
изображение

However, the maglev in the game uses the Japanese version - a "channel" at ground level, inside which there is a part of the train. This is not so noticeable in the game - technically, any rails in the game are completely flat.
изображение

The current closed railway crossing creates a problem for the train - a wall inside the “channel”. The open crossing can be left in its current form.

изображение
If you enable “show reserved paths”, the illusion of an open crossing will appear, but this is just a small flaw.
изображение

Well, the suggestion is to change the open maglev crossing sprite so that the train can pass through.
изображение

I hope the problem and explanation will be clearer in pictures (=

Depot button in Train/RV window uses animated colour

Version: OpenGFX2 Classic

animated

The depot button in train and road vehicle windows (circled) uses the "cola wells" animated colour range, and pulses through this colour range.

Less intense than when I accidentally drew a locomotive in these colours, but still distracting. 😉

Flickering sprites on Toyland

At rest, nothing happens, but if any sprite changes occur around, the sprite flickers or disappears.
изображение

2023-08-29.04-41-56.mp4

Toffee Quarry sprite 4766
Bubble Generator sprite 4746

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.