Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Sat Dec 15, 2018 5:53 am

All times are UTC




Post new topic  Reply to topic  [ 26 posts ]  Go to page Previous 1 2
Author Message
PostPosted: Tue Dec 04, 2018 6:07 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Mon May 25, 2015 9:09 am
Posts: 339
Location: The Netherlands
Quast65 wrote:
Thnx, works now, interesting to see how you did all those curved lines, well done! :bow:
I know you mentioned you were not going to work much more on this, so I wont mention that buildings was misspelled buidlings ;-)
What are you talking about? I don't see it in the version I just uploaded :P

Quast65 wrote:
One little tip though for the future, the watersequence is the wrong way around I think, the waves are moving inwards rather than outwards to the "beach".
Doing the animated water color sequence the other way around would be better for future things if you are going to use them. ;-)
Yeah I noticed. I'll take it into account for the next project where I'll be working with water.

_________________
No pics no clicks. Seriously.
ImageImageImageImageImageImage


Top
   
PostPosted: Tue Dec 04, 2018 7:35 pm 
Online
Moderator
Moderator
User avatar

Joined: Mon Sep 28, 2009 5:15 pm
Posts: 6304
Location: Eastern KY
Snail wrote:
Erato wrote:
Because m4nfo is trash this set will not be expanded upon.

Funny. I used m4nfo to develop my entire set :lol:


Now I'm curious, what makes m4nfo not work well for developing a station set?

_________________
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!
Image

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | RoadTypes?


Top
   
PostPosted: Tue Dec 04, 2018 8:22 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Mon May 25, 2015 9:09 am
Posts: 339
Location: The Netherlands
kamnet wrote:
Snail wrote:
Erato wrote:
Because m4nfo is trash this set will not be expanded upon.

Funny. I used m4nfo to develop my entire set :lol:


Now I'm curious, what makes m4nfo not work well for developing a station set?

I mean, when compared to NFO, I would still prefer m4nfo because I have to keep track of like half of what I would otherwise have to keep track of, but it makes coding such a pain because it doesn't do consistency. Let me explain.
For starters we have the IDs, a newgrf can only have 256 stations, so it stands to reason that 255 is the last allowed ID, and it is. Thing is, it's in octal, so the maximum ID being 255 corresponds to a maximum of 174 stations. Which makes no sense at all.
Then the reason I chose to make the DPRK Stations Addon, as opposed to continuing DPRK Stations, which wasn't anywhere near 174 stations. At a certain point m4nfo just decided that the code to describe the first layout, which describes which sprite goes where, just kept changing what it ended in, instead of just ending in "02". This thing should never be anything other than 02. I said F it, I'm not dealing with this and just finished the project as far as I could be bothered to constantly keep track of what it changed into.

The specific problem I've had with m4nfo when making the newgrf for the screenshot competition was as follows: it failed to properly number the amount of sprites I had. After about 20 sprites, which is ridiculously few, it failed to update a certain value in nfo. I've had to install a thing that autoreplaces this value with what it should be right before compiling. Originally it gave "02 0a" instead of "01 24" The reason Quast saw that error was because I removed the "1.0" from the title, to prevent people from thinking that I'm going to deal with this problem and expand this set further. For no apparent reason - and such things happen all the time when programming in m4nfo - it changed this "02 0a" into "01 14", which was still wrong, but I didn't update my compile.bat, so it didn't work, and I didn't check it because I thought it wouldn't be a problem.

And don't get me started on how I had to do all this with the extremely low-quality tutorial and lacklustre documentation and had to basically figure everything out by myself because the maker of m4nfo is absent and no station project in m4nfo - except for mine - has been open-source.

I'm glad Snail likes it. But to me it's garbage, but when it doesn't do stupid stuff like this, it's alright.

_________________
No pics no clicks. Seriously.
ImageImageImageImageImageImage


Top
   
PostPosted: Tue Dec 04, 2018 8:25 pm 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Apr 17, 2017 4:52 pm
Posts: 645
Location: Western Ile-de-France Region
kamnet wrote:
Snail wrote:
Erato wrote:
Because m4nfo is trash this set will not be expanded upon.

Funny. I used m4nfo to develop my entire set :lol:


Now I'm curious, what makes m4nfo not work well for developing a station set?


An excellent question. And the answer comes in several strands.

The idea of m4nfo as a NewGRF coding language is excellent; I must commend it on it's compact style and the speed at which it compiles. Sometimes. See, what m4nfo does it translate in to nfo which it doesn't do all that well, for stations at least.

When I use a coding language/compiler I expect it to give reliable results and to give errors that are down to my coding, rather than its inability to cobble together the relevant bytes and such. This is not the case with m4nfo. I've had experience of a couple of examples where it just writes the wrong byte, not set of bytes or anything, just a single byte incorrectly, causing none of the NewGRF to function correctly. An example for the curious:

(Skip this bit if you're not interested in the code)
I started coding with the program. I had some working results, so I started coding lots of stations. Then apparently randomly, the compile started giving two errors in the grfcodec stage.
Code:
...
Linter failure on sprite 235.
Error on sprite 287.
...

I had read some nfo documentation before using m4nfo, so took a look at the .nfo file. The first error seems to originate on line 503 to 514 on the .nfx, even though the syntax etc is identical to line 516 to line 527 (which doesn't give an error). The 7th byte on sprite 235 (line 634 in the .nfo) is "03". On every other action 0 in that area, the 7th byte is "02". What has caused this?
Similarly, the error with sprite 287 is with the 6th byte, it seems, which is "0a", as apposed to the "01" seen in every other similar example (line 1109 in the .nfx, line 1197 in the .nfo)
I changed these bytes manually, then ran grfcodec and the grf compiled without errors.
(You can start reading again)
This isn't me miss-typing the code. The compiler thinks everything is fine, but leaves it to the NFO compiler to tell me it's wrong.

Additionally, the documentation is rather poor at explaining the compiler process, the correct process eventually being explained to me by Erato and was completely different from the documentation. Other things missing from the documentation are the fact that station IDs have to be valid octal numbers, while the limit still being the hex standard of "FF" (256) station IDs. What is the logic behind this? I don't know.

I have also been completely unable to get 32bpp sprites to be recognised by the m4 compiler, despite following the documentation. Something that has also been unhelpful in this process is the lack of contact I've been able to have with the original author of m4nfo (michael blunck) and his unwillingness to share large sections of code. This seems to be a trait of m4nfo coders.

I chose m4nfo as a simpler, quicker and more accessible alternative to NFO. I now almost know enough NFO to code a station set from going through the NFO output from the m4 compiler and it's poor error handling to try to work out what's wrong, commonly resulting in me needing to make a manual change. I know Snail has been able to get a fully functional (and a seemingly excellent) trainset out of it but I really can't realistically see myself using it for a large scale station set. If you're interesting in seeing my code/want to say I've been coding it wrong feel free to take a look at this repo

I know a lot of this repeats Erato's post, but I've been experiencing basically the same issues and want to express the same frustrations.


Top
   
PostPosted: Fri Dec 14, 2018 3:54 pm 
Offline
Tycoon
Tycoon

Joined: Wed Apr 27, 2005 7:09 am
Posts: 5238
kamnet wrote:
Snail wrote:
Erato wrote:
Because m4nfo is trash this set will not be expanded upon.

Funny. I used m4nfo to develop my entire set :lol:


Now I'm curious, what makes m4nfo not work well for developing a station set?

I don't know since it works perfect for compiling a very large station set like NewStations.

I can only guess it's because of that weird talking about "octal numbers" since m4nfo has no concept of octal numbers but exclusively uses hex and/or decimal numbers for integers.

And hence there's nowhere mentioning of "octal numbers", neither in the docs nor in the tutorials.

You might safely forget about those talkings.

regards
Michael

_________________
Image


Top
   
PostPosted: Fri Dec 14, 2018 4:12 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Mon May 25, 2015 9:09 am
Posts: 339
Location: The Netherlands
michael blunck wrote:
I can only guess it's because of that weird talking about "octal numbers" since m4nfo has no concept of octal numbers but exclusively uses hex and/or decimal numbers for integers.

And hence there's nowhere mentioning of "octal numbers", neither in the docs nor in the tutorials.

You might safely forget about those talkings.

regards
Michael

Well that's the thing. The only place where it's mentioned is in nforenum every single time, without fail, I try to use the digits 8 or 9 in an ID, and it isn't used anywhere else.
Image But to be honest, that bug, glitch or figment of my imagination, whichever you prefer really doesn't matter. Because if you actually read what is written in the previous two posts you might understand that you really never reach 150 IDs, before encountering a bug so big you're kinda forced to start a new project.

_________________
No pics no clicks. Seriously.
ImageImageImageImageImageImage


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 26 posts ]  Go to page Previous 1 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.