OpenGFX Mars

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
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: OpenGFX Mars

Post by planetmaker »

Audiopulse wrote: May I suggest just linking it in the OP?
Good point. Done.
Audiopulse wrote: Edit2:
I noticed some graphical glitches - but nothing else impacting gameplay, really. OpenMars is quite playable and Im having great fun.

Ill post a few Screenshots tomorrow showing offsets and misalignments I found.
please do. Or get involved and help fixing them by determining the correct offsets :)

https://newgrf-specs.tt-wiki.net/wiki/NML:Main is the wiki page for the language the NewGRF is written in (but sprite offsets are reasonably easy to fix once you know which sprite you're looking at (and enabling the NewGRF developer tools ingame to test w/o re-compiling everything)
User avatar
Audiopulse
Engineer
Engineer
Posts: 17
Joined: 31 Mar 2014 02:57

Re: OpenGFX Mars

Post by Audiopulse »

I might just do that, planetmaker. Like I said - there are a few crazy ideas I would like to give a try with this GFX ... I have a wild fascination with space I have been tending to since being a kid :D

Right now I am not at home, so this would have to wait another 2 weeks, maybe - what do you think, would zephyris be okay with me changing or adding new things?

Imgur-gallery with everything i noticed.
https://imgur.com/gallery/j8bwB8X
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: OpenGFX Mars

Post by planetmaker »

Audiopulse wrote:I might just do that, planetmaker. Like I said - there are a few crazy ideas I would like to give a try with this GFX ... I have a wild fascination with space I have been tending to since being a kid :D

Right now I am not at home, so this would have to wait another 2 weeks, maybe - what do you think, would zephyris be okay with me changing or adding new things?

Imgur-gallery with everything i noticed.
As far as I know him, he totally would (and I think I coded a lot of his sprites). All his work is licensed under GPL, he makes his sprites and source deliberately available (thus by the license it's even your right to build on his work, if you play by the same rules).

If you feel like, drop me a line and I will grant you commit access to the repositories or fork it, if that's what you prefer (I'd say: continue in the same repo). I might move the sources from the current location to github at some stage - but that will be communicated clearly.
User avatar
Audiopulse
Engineer
Engineer
Posts: 17
Joined: 31 Mar 2014 02:57

Re: OpenGFX Mars

Post by Audiopulse »

What I know about Repositories, Forks and Hubs I know from hearsay - but Ill get back to you as soon as a need arises. Thank you!

I would have to start by taking the GRF apart and look at things, anyway, so it'll be some time anyways ;-)
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: OpenGFX Mars

Post by planetmaker »

Audiopulse wrote:What I know about Repositories, Forks and Hubs I know from hearsay - but Ill get back to you as soon as a need arises. Thank you!

I would have to start by taking the GRF apart and look at things, anyway, so it'll be some time anyways ;-)
You can take apart the NewGRF (and get uncommented NFO and a single file with all sprites). Or you can take the source (via hg/git or downloaded zip) from which it is built and sprites in more or less logically-named files.Judge for yourself what is easier to understand: The difference is approximately this: https://www.tt-wiki.net/wiki/NMLTutorial#Example
User avatar
Audiopulse
Engineer
Engineer
Posts: 17
Joined: 31 Mar 2014 02:57

Re: OpenGFX Mars

Post by Audiopulse »

01010111 01101000 01100001 01110100 00100000 01101001 01110011 00100000 01100001 01101100 01101100 00100000 01110100 01101000 01101001 01110011 00100000 01110111 01101001 01111010 01100001 01110010 01100100 01110010 01111001

After careful consideration of seppuku by NML I tend to vote for source.


Jokes aside - if you suggest continuing the same repo i would do just that and see where it gets me. Ive never done anything like this - but theres always a first time, no?
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: OpenGFX Mars

Post by Zephyris »

Download a copy, have a hack/play and see where you get... As you may have guessed I don't really have the time to finish this myself but I would love to see it polished!
arikover
Route Supervisor
Route Supervisor
Posts: 466
Joined: 15 Jun 2007 09:27
Skype: madchimiste
Location: Berlin, Deutschland

Re: OpenGFX Mars

Post by arikover »

I tried to clone the repository:

Code: Select all

hg clone https://kallithea.openttdcoop.org/opengfx-mars
but I get this error:

Code: Select all

abort: HTTP Error 404: Not Found
Am I missing something?
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: OpenGFX Mars

Post by planetmaker »

Both URLs are actually the same thing just with a different web interface.

The individual URLs seem to work fine (and can be cloned separately and they all work separately), yet the parent repo which exists for convenience and contains all repos shows the error you mentioned. I wonder why... and shall investigate. Thanks for letting me know.

The URLs to the individual repos are like https://kallithea.openttdcoop.org/opengfx-mars-aircraft
Find them all at https://kallithea.openttdcoop.org/ and filter the repository list for 'mars'.
ToxicFrog
Engineer
Engineer
Posts: 11
Joined: 06 Feb 2020 00:31

Re: OpenGFX Mars

Post by ToxicFrog »

planetmaker wrote: 05 Feb 2020 16:37 Both URLs are actually the same thing just with a different web interface.

The individual URLs seem to work fine (and can be cloned separately and they all work separately), yet the parent repo which exists for convenience and contains all repos shows the error you mentioned. I wonder why... and shall investigate. Thanks for letting me know.
Thank you! Hopefully it's not too difficult to fix; I don't know much about hg, just the very basics.

I'm not sure what's going on with these forums; the post I made this morning with instructions on how to clone the repos (which planetmaker is responding to) has evaporated and my account got deleted as well. I had to re-register. ?( I can re-post them if anyone needs, but hopefully it'll be an easy fix for planetmaker and people will be able to just clone the top-level repo again.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: OpenGFX Mars

Post by planetmaker »

ToxicFrog wrote: 06 Feb 2020 00:37 Thank you! Hopefully it's not too difficult to fix; I don't know much about hg, just the very basics.

I'm not sure what's going on with these forums; the post I made this morning with instructions on how to clone the repos (which planetmaker is responding to) has evaporated and my account got deleted as well. I had to re-register. ?( I can re-post them if anyone needs, but hopefully it'll be an easy fix for planetmaker and people will be able to just clone the top-level repo again.
Thank you for being that persistent and re-registering. I don't have enough insight into forum logs to know what happened exactly... the only explanation I see is human error in spammer removal. However that happend, sorry :|

On-topic: I think I found the root of the issue: too many URL aliases, and only the original repo URL is taken care of.

The URL which works (for me) as advertized where you can clone the main repo along with its sub-repos just fine:

Code: Select all

hg clone https://hg.openttdcoop.org/opengfx-mars
The reason the other URLs don't work as advertized is in how sub-repositories are organized and referenced. In the main repository's .hgsub, there are re-write rules for the sub-repos which assume the above mentioned path - but which don't work for another URL. Further re-write rules for the "new" path with kallithea.o.o could be added - and probably should. Currently it says:

Code: Select all

$ cat .hgsub
(...)
ssh://hg@hg.openttdcoop.org/opengfx-mars/graphics   = ssh://hg@hg.openttdcoop.org/opengfx-mars-graphics
(...)
http://hg.openttdcoop.org/opengfx-mars/graphics   = http://hg.openttdcoop.org/opengfx-mars-graphics
Similar rewrite rules would need to be added to the same file with respect to https://kallithea.openttdcoop.org/opengfx-mars-graphics and the other sub-repos

EDIT: I pushed an appropriate commit, cloning now works for me for http://kallithea.openttdcoop.org/opengfx-mars as well
ToxicFrog
Engineer
Engineer
Posts: 11
Joined: 06 Feb 2020 00:31

Re: OpenGFX Mars

Post by ToxicFrog »

planetmaker wrote: 06 Feb 2020 11:21 Thank you for being that persistent and re-registering. I don't have enough insight into forum logs to know what happened exactly... the only explanation I see is human error in spammer removal. However that happend, sorry :|
Yeah, it looks like they had a huge wave of spammers yesterday morning and I got caught up in the purge by mistake. Oh well, no harm done.
On-topic: I think I found the root of the issue: too many URL aliases, and only the original repo URL is taken care of.

[...]

EDIT: I pushed an appropriate commit, cloning now works for me for http://kallithea.openttdcoop.org/opengfx-mars as well
Awesome, thank you!

On testing, it looks like you need to rewrite http and https separately, though -- cloning http://hg.openttdcoop.org/opengfx-mars works ok, but cloning https://hg.openttdcoop.org/opengfx-mars doesn't. Same deal with kallithea. Looking at .hgsub there are only rules for http. Since the web interface gives https links, it would probably be good to have both.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: OpenGFX Mars

Post by planetmaker »

ToxicFrog wrote: 06 Feb 2020 12:53 On testing, it looks like you need to rewrite http and https separately, though -- cloning http://hg.openttdcoop.org/opengfx-mars works ok, but cloning https://hg.openttdcoop.org/opengfx-mars doesn't. Same deal with kallithea. Looking at .hgsub there are only rules for http. Since the web interface gives https links, it would probably be good to have both.
Agreed. And done. Thanks for that pointer, too.

I noticed that some of the sub-repos will need some changes to actually build - at least with the toolchain I currently have on this machine. Probably not a big deal, but will need doing before making changes, I guess. Feel free to make pull-requests... or request repository access.

Cheers,
planetmaker
ToxicFrog
Engineer
Engineer
Posts: 11
Joined: 06 Feb 2020 00:31

Re: OpenGFX Mars

Post by ToxicFrog »

planetmaker wrote: 06 Feb 2020 13:08 I noticed that some of the sub-repos will need some changes to actually build - at least with the toolchain I currently have on this machine. Probably not a big deal, but will need doing before making changes, I guess. Feel free to make pull-requests... or request repository access.
No PRs or patches yet (I'm still figuring out hg), but some issues I've noticed, with solutions:
  • SHELL=/bin/bash doesn't work on NixOS. This is probably not an issue on other linuxes, though, and can be fixed on the command line by invoking with `make SHELL=$(whence bash)`, so it's likely not worth fixing.
  • findversion.sh uses "python", but uses a py2-only API, so it fails on modern systems where "python" is py3; replacing it with an explicit call to python2 fixes it, thus:

    Code: Select all

    sed -E -i 's,python -c,python2 -c,' findversion.sh */findversion.sh
  • Some of the Makefiles have NML ?= "$(shell which nmlc 2>/dev/null)"; this is bad because if nmlc is in PATH it's just a more roundabout way of doing NML ?= nmlc (which some of the other Makefiles do already), and if it's not the enclosing quotes break some error checking later in the file! At minimum the quotes need to be removed. Quick sed hack:

    Code: Select all

    sed -E -i 's,"\$\(shell which nmlc 2>/dev/null\)",nmlc,g' Makefile */Makefile
That's as far as I can get without having nmlc installed, which is probably not happening tonight. Ok, that was a lie, I've got nmlc working now. If you are building it from source you may need to edit nml/version_info.py and replace all references to Image.VERSION with Image.PILLOW_VERSION; if you have it prepackaged it is presumably either using an older version of PIL/Pillow where .VERSION still works or has been patched accordingly by the packager.

Now that I have nmlc installed, it's able to compile the landscapes, albeit with some warnings about tile animation. The build of the houses fails because it misuses unix2dos in trying to build the docs; it assumes that unix2dos -q --version 2>/dev/null will be silent, but it's not, --version outputs the version info on stdout, and it barfs. Quick and dirty fix:

Code: Select all

sed -E -i 's,^UNIX2DOS_FLAGS,UNIX2DOS_FLAGS ?= -q,' Makefile */Makefile
This will fail on any system where unix2dos does not accept "-q" but at least works on systems where it does. A better fix might be to replace the 2>/dev/null with >/dev/null 2>&1.

With that change made `make` runs to completion and spits out a bunch of GRFs; hopefully that'll be enough to get it working for you, too, although there seems to be a lot of fragile and not very portable stuff in these Makefiles. :/
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: OpenGFX Mars

Post by planetmaker »

ToxicFrog wrote: 07 Feb 2020 01:07 SHELL=/bin/bash doesn't work on NixOS. This is probably not an issue on other linuxes, though, and can be fixed on the command line by invoking with `make SHELL=$(whence bash)`, so it's likely not worth fixing.
One could try whether /bin/sh works. But I'm reasonably confident that I implemented some bashisms into the shell commands. Though... making it a bit more portable definitely wouldn't hurt. It worked for me back then, it works for the build machine - that's what I tested it against, including the systems of other people using it.
ToxicFrog wrote: 07 Feb 2020 01:07 [*] findversion.sh uses "python", but uses a py2-only API, so it fails on modern systems where "python" is py3; replacing it with an explicit call to python2 fixes it, thus:

Code: Select all

sed -E -i 's,python -c,python2 -c,' findversion.sh */findversion.sh
I'd suggest a port to python3 instead.
ToxicFrog wrote: 07 Feb 2020 01:07 [*] Some of the Makefiles have NML ?= "$(shell which nmlc 2>/dev/null)"; this is bad because if nmlc is in PATH it's just a more roundabout way of doing NML ?= nmlc (which some of the other Makefiles do already), and if it's not the enclosing quotes break some error checking later in the file! At minimum the quotes need to be removed. Quick sed hack:

Code: Select all

sed -E -i 's,"\$\(shell which nmlc 2>/dev/null\)",nmlc,g' Makefile */Makefile
Agreed. NML = ?= nmlc should do the trick. The problem with nml's PILLOW version sounds familiar and might already be fixed in the development versions. Which nmlc do you use?
ToxicFrog wrote: 07 Feb 2020 01:07

Code: Select all

sed -E -i 's,^UNIX2DOS_FLAGS,UNIX2DOS_FLAGS ?= -q,' Makefile */Makefile
This will fail on any system where unix2dos does not accept "-q" but at least works on systems where it does. A better fix might be to replace the 2>/dev/null with >/dev/null 2>&1.
I had the same problem yesterday and pushed a fix. But the main repo references still an older revision of the aircraft set. So update to the latest version of the aircraft set and you should see it fixed. (The main repo explicitly stores the revision for reach sub-repository to use - and I didn't update it yesterday).
ToxicFrog wrote: 07 Feb 2020 01:07 With that change made `make` runs to completion and spits out a bunch of GRFs; hopefully that'll be enough to get it working for you, too, although there seems to be a lot of fragile and not very portable stuff in these Makefiles. :/
I actually stopped yesterday when my nmlc complained about some properties in the industry set not being available... that needs some looking into how nml syntax changed... alas!

Recently I thought about whether 'stealing' the apollo industries set (released for last year's 50th anniversary) found somewhere here in the forums could be integrated somehow here... it would fit the theme. And on Mars you definitely want to have some space industry :)
ToxicFrog
Engineer
Engineer
Posts: 11
Joined: 06 Feb 2020 00:31

Re: OpenGFX Mars

Post by ToxicFrog »

planetmaker wrote: 07 Feb 2020 09:24 One could try whether /bin/sh works. But I'm reasonably confident that I implemented some bashisms into the shell commands. Though... making it a bit more portable definitely wouldn't hurt. It worked for me back then, it works for the build machine - that's what I tested it against, including the systems of other people using it.
I suspect it does not; setting it to "/usr/bin/env bash" might. But /bin/bash is pretty reliably available, and anyone using NixOS in the first place is probably aware of this particular pitfall.
I'd suggest a port to python3 instead.
Yeah, I'm just not familiar enough with datetime to know off the top of my head what it should be replaced with, and my goal was to identify as many build errors as quickly as possible. I note that even if it is ported to Py3 it should be explicitly set to invoke `python3` rather than `python`, since some older systems still have `python -> python2`.
Agreed. NML = ?= nmlc should do the trick. The problem with nml's PILLOW version sounds familiar and might already be fixed in the development versions. Which nmlc do you use?
0.4.5 from https://hg.openttdcoop.org/nml, which appears to be the latest version. Some of the Makefiles already have `NML ?= nmlc` so possibly it's just that some of them are a bit out of date?
I had the same problem yesterday and pushed a fix. But the main repo references still an older revision of the aircraft set. So update to the latest version of the aircraft set and you should see it fixed. (The main repo explicitly stores the revision for reach sub-repository to use - and I didn't update it yesterday).
Good to know -- it looks like this problem is present in all the Makefiles, but not all of the GRFs try to build docs, so it doesn't always manifest.
I actually stopped yesterday when my nmlc complained about some properties in the industry set not being available... that needs some looking into how nml syntax changed... alas!
Huh. 0.4.5 builds all the GRFs for me, albeit with a bunch of warnings and I have not tried loading the generated GRFs to see if they work.
Recently I thought about whether 'stealing' the apollo industries set (released for last year's 50th anniversary) found somewhere here in the forums could be integrated somehow here... it would fit the theme. And on Mars you definitely want to have some space industry :)
This? viewtopic.php?f=67&t=85580

That looks extremely cool, although it's not really aesthetically harmonious with the Mars graphics -- maybe Mars should have a landing pad for those rockets instead :)
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: OpenGFX Mars

Post by planetmaker »

ToxicFrog wrote: 07 Feb 2020 13:20 Huh. 0.4.5 builds all the GRFs for me, albeit with a bunch of warnings and I have not tried loading the generated GRFs to see if they work.
Recently I thought about whether 'stealing' the apollo industries set (released for last year's 50th anniversary) found somewhere here in the forums could be integrated somehow here... it would fit the theme. And on Mars you definitely want to have some space industry :)
This? viewtopic.php?f=67&t=85580

That looks extremely cool, although it's not really aesthetically harmonious with the Mars graphics -- maybe Mars should have a landing pad for those rockets instead :)
I have a build of nml's current master. The way industry production is handled changed between 0.4.x and current master / 0.5.0 pre-releases to accomodate the possibility to have 16 input and 16 output cargoes with the upcoming OpenTTD 1.10.0.

Yes, I meant exactly that NewGRF. I agree that the graphics don't fit too well, so some work on that, too, but it's a start to build on. Yet I very much like the concept :) Maybe landing pad additionally :)
ToxicFrog
Engineer
Engineer
Posts: 11
Joined: 06 Feb 2020 00:31

Re: OpenGFX Mars

Post by ToxicFrog »

planetmaker wrote: 07 Feb 2020 13:52 I have a build of nml's current master. The way industry production is handled changed between 0.4.x and current master / 0.5.0 pre-releases to accomodate the possibility to have 16 input and 16 output cargoes with the upcoming OpenTTD 1.10.0.
Aha -- that doesn't seem to be on hg.openttdcoop, or if it is I can't figure out where to find it. I also know nothing at all about openttd modding, so I'd have no idea how to start bringing things up to date. I just saw that people who do know things about it were having trouble with hg and figured, hey, this is something I do know how to help with.
Yes, I meant exactly that NewGRF. I agree that the graphics don't fit too well, so some work on that, too, but it's a start to build on. Yet I very much like the concept :) Maybe landing pad additionally :)
Honestly, all I really hope to see out of renewed OGFX-Mars development is some alignment fixes and maybe, someday, high-res support. New industries and stuff getting added would just be a bonus, especially since I don't feel like I have a good handle on all the existing ones yet!
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: OpenGFX Mars

Post by planetmaker »

We moved the nml repository to github along where the other OpenTTD tools reside (now): https://github.com/OpenTTD/nml

Moving these repos to github probably would not be a bad idea, either... more people know git nowadays than do know hg (even though the entry barrier for hg still seems smaller to me).
ToxicFrog
Engineer
Engineer
Posts: 11
Joined: 06 Feb 2020 00:31

Re: OpenGFX Mars

Post by ToxicFrog »

planetmaker wrote: 07 Feb 2020 15:18 We moved the nml repository to github along where the other OpenTTD tools reside (now): https://github.com/OpenTTD/nml

Moving these repos to github probably would not be a bad idea, either... more people know git nowadays than do know hg (even though the entry barrier for hg still seems smaller to me).
Hg has fewer pitfalls in its UI, and the ones it does have are less likely to make you sad, but Git is more widely used, probably due to early association with some of the biggest open source projects in the world. So it goes.

If they're going to be under active development again, moving the OGFX-Mars repos to Github might be a good idea, yeah; they're probably more discoverable there and lots of people already have GH accounts. The PR and code review tools are decent, too. On the other hand I'm looking at this as a relative outsider to the OTTD community, so there may be drawbacks that are invisible to me.

Meanwhile, now that I've started fiddling around with it in-game again, I've decided what I really want to see is martian ships. Maybe the water is still very salty and acidic, rough on hull material, so you want to keep as much of the ship out of the water as possible...lots of hydrofoils and hovercraft, maybe a few ground-effect vehicles. Hmm.
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: GarryG and 63 guests