[OTTD] 2cc TrainsInNML
Moderator: Graphics Moderators
Re: [OTTD] 2cc TrainsInNML
Hello,
First of all, you have done great job!
I quickly tested the latest file and found one bug - Thessaloniki metro 2014 has gap between firs and last wagon (screenhot attached). All other models seem working correct.
First of all, you have done great job!
I quickly tested the latest file and found one bug - Thessaloniki metro 2014 has gap between firs and last wagon (screenhot attached). All other models seem working correct.
- Attachments
-
- 2ccNML_bug.png
- (169.41 KiB) Downloaded 3 times
- Voyager One
- Tycoon
- Posts: 11204
- Joined: 28 Dec 2009 09:47
- Location: Rijeka, Croatia
Re: [OTTD] 2cc TrainsInNML
Hmmm, haven't noticed this one... must have missed it... it seems it's misaligned in all directions except going south.
-
- Tycoon
- Posts: 2781
- Joined: 22 Feb 2011 18:34
Re: [OTTD] 2cc TrainsInNML
Thanks, nice spot. I created a bug report on the tracker, so that I remember to fix it at one point. I do need to find out where it goes wrong. I suspect the graphics file is incorrect, but I do need to confirm that.WLK wrote:Hello,
First of all, you have done great job!
I quickly tested the latest file and found one bug - Thessaloniki metro 2014 has gap between firs and last wagon (screenhot attached). All other models seem working correct.
It is also misaligned when going south, but then the front part is aligned incorrectly.Voyager One wrote:Hmmm, haven't noticed this one... must have missed it... it seems it's misaligned in all directions except going south.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: [OTTD] 2cc TrainsInNML
That sounds like it's not an 8/8 length vehicle but smaller - but using the 8/8 alignment offsetsTransportman wrote:Thanks, nice spot. I created a bug report on the tracker, so that I remember to fix it at one point. I do need to find out where it goes wrong. I suspect the graphics file is incorrect, but I do need to confirm that.WLK wrote:Hello,
First of all, you have done great job!
I quickly tested the latest file and found one bug - Thessaloniki metro 2014 has gap between firs and last wagon (screenhot attached). All other models seem working correct.
It is also misaligned when going south, but then the front part is aligned incorrectly.Voyager One wrote:Hmmm, haven't noticed this one... must have missed it... it seems it's misaligned in all directions except going south.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
- Voyager One
- Tycoon
- Posts: 11204
- Joined: 28 Dec 2009 09:47
- Location: Rijeka, Croatia
Re: [OTTD] 2cc TrainsInNML
It is a 6/8 long vehicle but my file seems aligned correctly... Dunno...
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: [OTTD] 2cc TrainsInNML
I did mean the length and alignment info in the code, not the grapics file:)Voyager One wrote:It is a 6/8 long vehicle but my file seems aligned correctly... Dunno...
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
-
- Tycoon
- Posts: 2781
- Joined: 22 Feb 2011 18:34
Re: [OTTD] 2cc TrainsInNML
It is a 6/8 length vehicle, but the offsets are taking care of in the graphics file themselves. There are also several 7/8 vehicles using the same template, but those appear to be fine.planetmaker wrote:That sounds like it's not an 8/8 length vehicle but smaller - but using the 8/8 alignment offsets
I'm almost sure it is the graphics file. When I compare it with the graphics file for the Oslo MX3000 and T1000, the second row is aligned differently (except for the fifth sprite, where the top row is aligned different). I'll make the modifications to check.
That is going to happen at a later moment, there are more graphics with issues, so I postpone that to a later moment.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
- Voyager One
- Tycoon
- Posts: 11204
- Joined: 28 Dec 2009 09:47
- Location: Rijeka, Croatia
Re: [OTTD] 2cc TrainsInNML
Honestly, I don't remember any more about those alignments, it was almost two years ago... I'll try taking a look what's wrong.
EDIT: Wait, I've just remembered one thing, demonstrated in the pic below. The 1st row is 1px from the top of the file, the top of the 2nd row is 7px from the bottom of the 1st row but ALL other rows (including the P-menu bluebox) are 8px each from other!
Don't ask me why, DJ requested this kind of template... This applies for all multi-row templates!
EDIT2: Regarding the T1000 and the MX3000, I've just noticed that those were my very early works - there isn't my logo in the file. IIRC, DJ in the meantime somehow changed the template into this latter one. If you see my logo in a file, the template should be correct.
EDIT: Wait, I've just remembered one thing, demonstrated in the pic below. The 1st row is 1px from the top of the file, the top of the 2nd row is 7px from the bottom of the 1st row but ALL other rows (including the P-menu bluebox) are 8px each from other!
Don't ask me why, DJ requested this kind of template... This applies for all multi-row templates!
EDIT2: Regarding the T1000 and the MX3000, I've just noticed that those were my very early works - there isn't my logo in the file. IIRC, DJ in the meantime somehow changed the template into this latter one. If you see my logo in a file, the template should be correct.
- andythenorth
- Tycoon
- Posts: 5658
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: [OTTD] 2cc TrainsInNML
Spritesheets using those 7px - 8px row offsets could be fixed programmatically if they're an issue. I have code in IH that slices out spriterows, moves them around, then saves out the spritesheet. Someone PM me if you want help.
Having non-standard row offsets makes templating hard.
Having non-standard row offsets makes templating hard.
FIRS Industry Replacement Set (released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (finished)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
- Voyager One
- Tycoon
- Posts: 11204
- Joined: 28 Dec 2009 09:47
- Location: Rijeka, Croatia
Re: [OTTD] 2cc TrainsInNML
No ****. I had to do them all manually, one by one sprite...andythenorth wrote:Having non-standard row offsets makes templating hard.
Re: [OTTD] 2cc TrainsInNML
The old Thessaloniki is also somewhat funky...
http://dev.openttdcoop.org/projects/2cc ... i_2014.png differs from some other shortened vehicles in the 2ccts:
http://dev.openttdcoop.org/projects/2cc ... _T1000.png (| alignments inverted, all but | alignments inverted for the end part. Sprite order flipped (12345678->56781234))
Also, when examining the other sprites, I noticed some peculiarities I cannot explain. Some examples:
http://dev.openttdcoop.org/projects/2cc ... LR_P86.png (sprites 2 and 5 aligned to left, 3, 4, 7 and 8 aligned to right, inverted alignment in | views, transparent blue changes depending on viewing program)
http://dev.openttdcoop.org/projects/2cc ... s_MP89.png (as above)
http://dev.openttdcoop.org/projects/2cc ... M2_840.png (6 and 8 aligned to left, 2, 3, 4 and 7 aligned to right, | views as above, background as above)
Most shortened MUs have non-standard alignments when compared to the explanation here (http://www.tt-forums.net/viewtopic.php? ... 6#p1108628).
Also, the 2cc template relies on the "top - 3x right - bottom - 3x left" alignment, so it will fail when used on a flipped vehicle (var[0xC8]) shorter than 8/8, because the order of realsprites called is 5-6-7-8-1-2-3-4 instead of the 1-2-3-4-5-6-7-8 required by the template.
Looks like the alignment of http://dev.openttdcoop.org/projects/2cc ... _T1000.png (| alignments inverted, all but | alignments inverted for the end part. Sprite order flipped (12345678->56781234))
Also, when examining the other sprites, I noticed some peculiarities I cannot explain. Some examples:
http://dev.openttdcoop.org/projects/2cc ... LR_P86.png (sprites 2 and 5 aligned to left, 3, 4, 7 and 8 aligned to right, inverted alignment in | views, transparent blue changes depending on viewing program)
http://dev.openttdcoop.org/projects/2cc ... s_MP89.png (as above)
http://dev.openttdcoop.org/projects/2cc ... M2_840.png (6 and 8 aligned to left, 2, 3, 4 and 7 aligned to right, | views as above, background as above)
Most shortened MUs have non-standard alignments when compared to the explanation here (http://www.tt-forums.net/viewtopic.php? ... 6#p1108628).
Also, the 2cc template relies on the "top - 3x right - bottom - 3x left" alignment, so it will fail when used on a flipped vehicle (var[0xC8]) shorter than 8/8, because the order of realsprites called is 5-6-7-8-1-2-3-4 instead of the 1-2-3-4-5-6-7-8 required by the template.
Last edited by juzza1 on 31 Jan 2014 11:08, edited 1 time in total.
Re: [OTTD] 2cc TrainsInNML
flipping of vehicles failing for shortened vehicles is precisely why this was disabled by default. there is extensive work needed to fix it by the NewGRF.
-
- Tycoon
- Posts: 2781
- Joined: 22 Feb 2011 18:34
Re: [OTTD] 2cc TrainsInNML
That explains the funny results with all the shortened multiple unit metro-vehicles, except for the Oslo ones that are fine. The Oslo graphics have been templated with the right offsets to allow using var[0xC8] (but have the graphics in the wrong order compared to the other metros), while the other shortened metros have the wrong offsets in the graphics file. So moving around some sprites should fix all those issues. Lets hope most of the uncoded MUs are just 8/8 vehicles, that is much simpler. Thank you all for pointing me in the right direction.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
- Voyager One
- Tycoon
- Posts: 11204
- Joined: 28 Dec 2009 09:47
- Location: Rijeka, Croatia
Re: [OTTD] 2cc TrainsInNML
Unfortunately, IIRC, I wouldn't bet on that.Transportman wrote:Lets hope most of the uncoded MUs are just 8/8 vehicles
I'll take a look at all my files and try correcting alignments but I expect that it could be a hell of work.
Re: [OTTD] 2cc TrainsInNML
"most" MUs are, but there's still several which aren't, as well as some engines (including dual-headed engines and engines including B-units).Transportman wrote:Lets hope most of the uncoded MUs are just 8/8 vehicles, that is much simpler. Thank you all for pointing me in the right direction.
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
Re: [OTTD] 2cc TrainsInNML
If you are going to fix some sprites, my suggestion would be to re-arrange the sprites like this:
This makes coding the realsprites trivial, and still allows you to use a single, common template. Only thing required code-wise is to call a different template for a flipped vehicle, which is constructed from the same parts as the template for non-flipped vehicles. Example (taken from the 2cc nml source):
Then just call "template_2cc_engines_general_flipped" for the rear-part of a dual-headed vehicle.
Of course this is a lot of boring grunt work graphics-wise.
So the sprites for the rear vehicle are arranged as if it was a flipped front vehicle.
This makes coding the realsprites trivial, and still allows you to use a single, common template. Only thing required code-wise is to call a different template for a flipped vehicle, which is constructed from the same parts as the template for non-flipped vehicles. Example (taken from the 2cc nml source):
Code: Select all
template template_2cc_engines_general_1234(x, y) {
//[left_x, upper_y, width, height, offset_x, offset_y]
[x , y, 8, 24, -3, -12]
[x+9 , y, 22, 20, -14, -12]
[x+32 , y, 32, 16, -16, -12]
[x+65 , y, 22, 20, -6, -12]
}
template template_2cc_engines_general_5678(x, y) {
//[left_x, upper_y, width, height, offset_x, offset_y]
[x+88 , y, 8, 24, -3, -12]
[x+97 , y, 22, 20, -14, -12]
[x+120, y, 32, 16, -16, -12]
[x+153, y, 22, 20, -6, -12]
}
template template_2cc_engines_general(x, y) {
template_2cc_engines_general_1234(x, y)
template_2cc_engines_general_5678(x, y)
}
template template_2cc_engines_general_flipped(x, y) {
template_2cc_engines_general_5678(x, y)
template_2cc_engines_general_1234(x, y)
}
Of course this is a lot of boring grunt work graphics-wise.
-
- Tycoon
- Posts: 2781
- Joined: 22 Feb 2011 18:34
Re: [OTTD] 2cc TrainsInNML
I expect no problems with engines where the second parts directly follows the first part. The problem with MUs happens because I code them as dual-headed (so front and back of the train) and use var[0xC8] to determine the graphics. For 8/8 it goes fine, but for shorter vehicles it gets the wrong alignments.Purno wrote:"most" MUs are, but there's still several which aren't, as well as some engines (including dual-headed engines and engines including B-units).Transportman wrote:Lets hope most of the uncoded MUs are just 8/8 vehicles, that is much simpler. Thank you all for pointing me in the right direction.
I was thinking about arranging them like this: The graphics keep the same order as the other 8/8 MUs and doesn't need additional code. Only the location in the blue boxes are changed. I think that is less work than the re-arrangement you propose.juzza1 wrote:If you are going to fix some sprites, my suggestion would be to re-arrange the sprites like this:
...
Of course this is a lot of boring grunt work graphics-wise.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Re: [OTTD] 2cc TrainsInNML
That would work too. Only thing is it makes the templating system slightly harder to remember for the artists (moot point with this set, as it's already drawn?)Transportman wrote:The graphics keep the same order as the other 8/8 MUs and doesn't need additional code. Only the location in the blue boxes are changed. I think that is less work than the re-arrangement you propose.
Additionally, I didn't notice the sprite order in the original Oslo T1000 was already flipped. Edited my earlier "analysis" to reflect this.
-
- Tycoon
- Posts: 2781
- Joined: 22 Feb 2011 18:34
Re: [OTTD] 2cc TrainsInNML
It is already drawn, and if new vehicles are included at some point, it can always be considered to use a simpler template (from the artist's point of view) for those new vehicles.juzza1 wrote:That would work too. Only thing is it makes the templating system slightly harder to remember for the artists (moot point with this set, as it's already drawn?)Transportman wrote:The graphics keep the same order as the other 8/8 MUs and doesn't need additional code. Only the location in the blue boxes are changed. I think that is less work than the re-arrangement you propose.
The Oslo T1000 and MX3000 had the right alignment but the wrong order, so I fixed that and the sprites now have the same order as the other vehicles.Additionally, I didn't notice the sprite order in the original Oslo T1000 was already flipped. Edited my earlier "analysis" to reflect this.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
- Voyager One
- Tycoon
- Posts: 11204
- Joined: 28 Dec 2009 09:47
- Location: Rijeka, Croatia
Re: [OTTD] 2cc TrainsInNML
From all this, it seems we've (read: mostly me) made quite a mess...
So, what can I do to help? How do you want them realigned? What offset should be for shorter engines?
So, what can I do to help? How do you want them realigned? What offset should be for shorter engines?
Who is online
Users browsing this forum: No registered users and 19 guests