[OTTD] 2cc TrainSet - The Trains of the world in 2cc

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

What kind of flag should futuristic trains have

UN Flag
114
46%
Olympic flag
17
7%
Have a suggested country
38
15%
No Flag
78
31%
Other, i've made a post about this
2
1%
 
Total votes: 249

User avatar
MasterMeNL
Engineer
Engineer
Posts: 86
Joined: 12 Oct 2012 17:16
Location: Netherlands

Re: [OTTD] 2cc TrainSet - The Trains of the world in 2cc

Post by MasterMeNL »

planetmaker wrote:The code used in 2ccTS is like (might be different for other engines, but I don't believe it is):

Code: Select all

//Low cost when standing still, for use in the '10' at the RUN cost spot HEAD
-1 * 0  02 00 EC 82 B4 00 FF 01			// 1 case
                          MU_nnn_RCOST_IDLE 80 00 00	        // Standing still cost
                          MU_nnn_RCOST 80	// RUN cost

//Low cost when standing still, for use in the '10' at the RUN cost spot WAGON
-1 * 0  02 00 ED 82 B4 00 FF 01			// 1 case
                          MU_nnn_RCOST_IDLE 80 00 00	        // Standing still cost
                          MU_nnn_RCOST_WAG 80	// RUN cost
Thus it checks variable B4 (current speed) when determining running costs. It's set to MU_nnn_RCOST_IDLE when speed is 0. And MU_nn_RCOST otherwise.

I'm not too familiar with the exact movement code...
might actually be true. It smells a bit like something one might want to investigate in detail in both the code of this set (which vehicle exactly? Every one?) and OpenTTD's movement code... but not before sleep for me :-)
Maybe check for speed < 1km/h (or <= 1km/h) instead of 0.
Sure this will make the train €10 cheaper each year, but if the speed is 0,0001 (or something) because it's waiting at a signal it'll probably work.
Or is this not possible at all?

Regards,

Melvin.
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: [OTTD] 2cc TrainSet - The Trains of the world in 2cc

Post by Eddi »

what i suspect happens is: in front of a red block signal, the train is set back to ~10 of 256 "progress" steps (i knew the exact number once, but i forgot) and speed set to 0, from there, it tries to accelerate again until it hits the end of the tile, at which it encounters the red signal again, and the cycle repeats. during this cycle, the speed might rise a bit, depending on train power.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [OTTD] 2cc TrainSet - The Trains of the world in 2cc

Post by planetmaker »

MasterMeNL wrote: Maybe check for speed < 1km/h (or <= 1km/h) instead of 0.
Sure this will make the train €10 cheaper each year, but if the speed is 0,0001 (or something) because it's waiting at a signal it'll probably work.
Or is this not possible at all?
Yes, something like that is feasible - and probably is the solution which is recommended.
User avatar
MasterMeNL
Engineer
Engineer
Posts: 86
Joined: 12 Oct 2012 17:16
Location: Netherlands

Re: [OTTD] 2cc TrainSet - The Trains of the world in 2cc

Post by MasterMeNL »

planetmaker wrote:
MasterMeNL wrote: Maybe check for speed < 1km/h (or <= 1km/h) instead of 0.
Sure this will make the train €10 cheaper each year, but if the speed is 0,0001 (or something) because it's waiting at a signal it'll probably work.
Or is this not possible at all?
Yes, something like that is feasible - and probably is the solution which is recommended.
Can't wait for 2cc 2.0.0 Beta 6 and/or 2cctrainset-nightly-r758! Or is this something so easy that I could fix it myself?
Because the parts you posted containing 2cc code don't look like anything I'm used to and I don't know what it means really.
Akip Nax Dhagadoe
Engineer
Engineer
Posts: 23
Joined: 18 Feb 2013 11:41
Location: Jakarta, Indonesia

Re: [OTTD] 2cc TrainSet - The Trains of the world in 2cc

Post by Akip Nax Dhagadoe »

What about Indonesian trains?

Like this:

Image

Name: CC203 (Diesel Electric)
Model: GE U20C
Designed: 1995
Max Speed: 120 km/h
Weight: 78 tons
Max Tractive Effort: 156 kN
Power: 2150 HP
ARR Wheel Arrangement: C-C

Image

Name: CC200 (Diesel Electric)
Model: UM 106T
Designed: 1952
Max Speed: 100 km/h
Weight: 96 tons
Max Tractive Effort: 192 kN
Power: 1750 HP
ARR Wheel Arrangement: C-2-C

Maybe just that. Actually there is still many more...

Regards, Akip
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: [OTTD] 2cc TrainSet - The Trains of the world in 2cc

Post by NekoMaster »

I like the looks of the CC203, though if you want either engine in the game you'll probably have to draw them your self, as there seems to be no-one working on 2cc-Set right now. Kinda sucks since there hasn't been any updates or bug fixes in ages now.
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
User avatar
Voyager One
Tycoon
Tycoon
Posts: 11204
Joined: 28 Dec 2009 09:47
Location: Rijeka, Croatia

Re: [OTTD] 2cc TrainSet - The Trains of the world in 2cc

Post by Voyager One »

I am still the "artist of the set", I haven't gone anywhere but Jake seems to have too much work IRL to do a significant update... Just remember that there are hundreds of wagons still waiting to be coded... :?
Leon

Image Image Image Image
"... all I ask is a tall ship and a star to steer her by..." - John Masefield
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Re: [OTTD] 2cc TrainSet - The Trains of the world in 2cc

Post by Purno »

Well, all is released under GPL license so anyone could pick it up and continue drawing or coding :)
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
Image Image
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."
Akip Nax Dhagadoe
Engineer
Engineer
Posts: 23
Joined: 18 Feb 2013 11:41
Location: Jakarta, Indonesia

Re: [OTTD] 2cc TrainSet - The Trains of the world in 2cc

Post by Akip Nax Dhagadoe »

NekoMaster wrote:I like the looks of the CC203, though if you want either engine in the game you'll probably have to draw them your self, as there seems to be no-one working on 2cc-Set right now. Kinda sucks since there hasn't been any updates or bug fixes in ages now.
Yeah. But, I don't have any experience in drawing sprites.

Regards, Akip
User avatar
Voyager One
Tycoon
Tycoon
Posts: 11204
Joined: 28 Dec 2009 09:47
Location: Rijeka, Croatia

Re: [OTTD] 2cc TrainSet - The Trains of the world in 2cc

Post by Voyager One »

So... we need a coder with more time than Jake (no offense Jake, we all know that college must come first)...
Leon

Image Image Image Image
"... all I ask is a tall ship and a star to steer her by..." - John Masefield
TinyMusic
Tycoon
Tycoon
Posts: 1422
Joined: 02 Feb 2013 02:03

Re: [OTTD] 2cc TrainSet - The Trains of the world in 2cc

Post by TinyMusic »

Voyager One wrote:So... we need a coder with more time than Jake (no offense Jake, we all know that college must come first)...
Has there been a rewrite of this NewGRF in NML?
Formerly known as UseYourIllusion.
Java Scenario Found Here - Version 2 out
[tweɪ̂ pû tɕʰì wɔ̀ mǐlɤ lû tɕʰìŋ nì pɑ́ŋmɑ̌ŋ]
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: [OTTD] 2cc TrainSet - The Trains of the world in 2cc

Post by Transportman »

UseYourIllusion wrote:
Voyager One wrote:So... we need a coder with more time than Jake (no offense Jake, we all know that college must come first)...
Has there been a rewrite of this NewGRF in NML?
The repository indicates it still is NFO.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
User avatar
Voyager One
Tycoon
Tycoon
Posts: 11204
Joined: 28 Dec 2009 09:47
Location: Rijeka, Croatia

Re: [OTTD] 2cc TrainSet - The Trains of the world in 2cc

Post by Voyager One »

Don't ask me, I know nothing of coding... :lol:
Leon

Image Image Image Image
"... all I ask is a tall ship and a star to steer her by..." - John Masefield
User avatar
kamnet
Moderator
Moderator
Posts: 8580
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: [OTTD] 2cc TrainSet - The Trains of the world in 2cc

Post by kamnet »

Nobody has messed with the coding because DJ left it a complicated mess that nobody else understands. I'd say somebody trying their hand at re-coding it in NML is going to have a rough time duplicating the success, but it's probably the best option for moving this set forward.
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5658
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: [OTTD] 2cc TrainSet - The Trains of the world in 2cc

Post by andythenorth »

Doesn't this set just get compiled by feeding it a spreadsheet? As I understood it, that was done by DJ so _anybody_ could update the set, without having to be an nfo coder. What's the problem or problems?
User avatar
kamnet
Moderator
Moderator
Posts: 8580
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: [OTTD] 2cc TrainSet - The Trains of the world in 2cc

Post by kamnet »

I'm assuming it was too much to handle, based on Emperor Jake's post a little over a year ago.
Emperor Jake wrote:Last year, Voyager One and I (mainly Voyager One) drew a lot of wagons intended for the 2CC trainset. However, before they were finished, the 2CC trainset's coder, DJ Nekkid, disappeared without a trace. I attempted to take over the 2CC trainset's code, but I couldn't wrap my head around the convoluted mess of NFO and compile scripts. So instead, I decided to undertake a new project which will be separate from the 2CC set. This is a set which will contain only wagons, mainly in 2CC, and intended for combination with the 2CC trainset or any other trainset with which it happens to match.
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: [OTTD] 2cc TrainSet - The Trains of the world in 2cc

Post by Transportman »

kamnet wrote:Nobody has messed with the coding because DJ left it a complicated mess that nobody else understands. I'd say somebody trying their hand at re-coding it in NML is going to have a rough time duplicating the success, but it's probably the best option for moving this set forward.
I indeed think recoding would be very rough, but is the best way forward. Based on the code I have seen so far:

The properties of vehicles look easy to recode, most properties can (easily) be copied from the spreadsheet, but I have the feeling that not all trains are in there, so some properties should be grabbed from the source (which is slightly less easy). Most other properties are either trivial to fill in (like track types), and for other properties there is some more liberty to set them differently (like running and purchase costs). This will take quite some time (and some balancing afterwards), but will be relatively easy.

The graphics (and callbacks) are a completely different story however. Graphics are all templated (at least, for what I have seen), so that helps a bit, but recoding them properly will be the largest and most difficult task.

Short version: Recoding will be the best way forward, but very time consuming and hard work.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: [OTTD] 2cc TrainSet - The Trains of the world in 2cc

Post by Transportman »

But does that really apply to this case? Now we have a code that works but nobody knows why. And because nobody knows why, improving it becomes very difficult. In the article you mention it seems to be that there is a good basis that can be understood and improved on.

Also, on the recoding matter: The Dutch Trainset was recoded to NML by Yexo using a script, and from there improved. I don't know if Yexo still has that script (or that it can be downloaded somewhere), so that might also be an option instead of a complete manual rewrite.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
User avatar
Voyager One
Tycoon
Tycoon
Posts: 11204
Joined: 28 Dec 2009 09:47
Location: Rijeka, Croatia

Re: [OTTD] 2cc TrainSet - The Trains of the world in 2cc

Post by Voyager One »

So... anyone willing to take over the coding process? Pretty please, I miss this set immensely... :(
Leon

Image Image Image Image
"... all I ask is a tall ship and a star to steer her by..." - John Masefield
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Ahrefs [Bot], Google Adsense [Bot] and 40 guests