Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Tue Dec 11, 2018 1:29 am

All times are UTC




Post new topic  Reply to topic  [ 205 posts ]  Go to page Previous 1 2 3 4 5 611 Next
Author Message
PostPosted: Thu Oct 01, 2009 10:00 pm 
Offline
Chief Executive
Chief Executive

Joined: Sun Nov 11, 2007 12:06 pm
Posts: 658
cant we just sort the number of warongs in a depo and show a fake image off them in game

so its coal wagons to be sorted here the gets how many

_________________
For Community Integrated Version http://code.google.com/p/civopenttd/


Top
   
PostPosted: Sun Feb 07, 2010 4:46 pm 
Offline
Engineer
Engineer

Joined: Tue Sep 09, 2008 7:48 pm
Posts: 120
Bump...

I would love to do dynamic train composition...


Top
   
PostPosted: Sun Feb 07, 2010 6:18 pm 
Offline
Tycoon
Tycoon

Joined: Fri Oct 23, 2009 7:35 pm
Posts: 1277
Location: Here and there, sometime or another
Well, if you´d like to, do it!

_________________
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---


Top
   
PostPosted: Tue Feb 14, 2012 3:38 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Mon Mar 24, 2008 1:04 pm
Posts: 265
Location: Finland
crakinshot wrote:
(small bump).

Hi,

In reply to last post: I think it could work with cargodest, but you'd have to assign a destination to each wagon. i.e a wagon is going from A-B-C. During B, however, it is decoupled, waits, coupled, and then continues to C.

General comment: I like the idea of shunting and coupling, and by implication bigger depo's. Personally, I've been following OpenTTD for a while, and I've been wanting a reason (task) to join in, and this seems to be it. Here are my views. There are two problems here: Shunting and Train Composition; they are different in practice, but can be combined. Personally, once you have Shunting you can do the rest far more easily.

The basics of shunting is that a train needs to transfer from one track to another, like so.
Image

This requires
  • Remove train 'flipping' - current mechanism to change direction
  • Train Reversing - a train at least appears to be reversing
  • Correct Path Finding - given that Yafp might not find a path if it requires stopping and reversing, some work might be needed.

Once you have that mechanism you can go onto the more complex stuff. Specifically, like in reality, if shunting train wants to pass a Danger signal (red) it needs permission from the signal box. Similarly, in OTTD, you'd need an update of the signaling system or at least the train mechanics so that a train could enter into a block already occupied, without the trains crashing. Anther feature which would be nice would be track labelling. So, in the order you'd have "Goto STATION, on PLATFORM 3" OR "Goto STATION, on any pratform" OR "Goto STATION, use platforms 3-to-5". You'd then derive that so you'd have "Goto TARGET, use TRACK CONDITION"... so then you can apply it to stations or depo yards. The general idea here being, rather than break the track mechanics you'd simply use the already (high customisable) station mechanic for the 'shunting Yards'.

Dynamic train composition is very different. You could essentially add the feature in pretty quick if everything happens in the existing depos. The main difficulty is the wagon labelling and making it easy to use. Also, I can imagine how it could go very wrong if designed incorrectly. For instance, do you explicitly reference the wagons, or do you go with a more implicit method. For instance, you can have a train leave 4 coal wagons at a Station/depo and then have another train pickup ANY/AMOUNT coal wagons from said station and take them to a destination. This way you're not breaking the CargoDest mechanic, just expanding upon it. Rather than the cargo being left at a station/depo you've left the wagons. Almost exactly the same thing, especially if its all done in a depo. Of course, it would get complicated if you actually had a huge shunting yard, where the wagons are real. BUT, given what I've already mentioned about the shunting yards being stations, once the wagons have stopped and have been decoupled, they are 'in the station' as cargo ready to be taken to a destination.

Not a good solution, but one that probably would make it easier (for the user) to have several trains transfer wagons to a destination.

Well just some thoughts. I'll definiatly have a go at getting the OpenTTD code compiling and play around to see how it all works. Anyone else seriously thinking or working on shunting/decoupling?



Hmm, good points there. My conceptual appoach to shunting would be like this:

-Shunting unit. Defined same way as train, but without wagons or coaches. Only motive power. Has a programmable order list, which it runs with loop in auto-mode, like normal train. It could be also manually overridden to do single, user defined runs. Would serve as line-running train's motive power, in certain services, where, for example, tractive power is changed from electric to diesel or backwards. Programming is done via gui.

-Consist. Defined same way as train, but without motive power, and hasn't got any programming in it. Just a bunch of wagons/coaches, which form a consist. Has a unique name, which it can be called on programming.

-Consist group. Consists which form a certain service, for example, coal loading/unloading circulation, are defined to group, and they are more easy to address, so adressing single consists is not always necessary, for example on long routes where there is 4 consists running on trains, and so addressing a single consist is impossible on a case like that, because single consist's location wouldn't be there where it would be wanted.

-Shunting safe point. Point, located such way on railyard it does not interfere with mainline traffic, or if located on mainline, mainline traffic should be low. Shunting unit can reverse it's moving direction (but not the normal turn-the-graphics and whole train way!) here. Only direction of moving is changed. Shunting safe points could be stacked, and every shunting safe point should have a nearby shunting area (along with paraller run-around track), which is used to run around specific consist, for example when there is a terminus waiting ahead to which consist must be reversed so that it can be run out from it, without any futher reversing, or for another example, when there is a change of train direction, or traction from diesel to electric in a train.

-Shunting area. Resembles current stations, but platform isn't usually used by trains, it is used by shunting units. Shunting area is a temporary wainting area for "consist run-around", when driving direction or
having the consist pushed from back is needed.

-Waiting area. Resembles current stations, but platform is used for arriving consists on arriving trains, and for waiting consists to depart, and when "line-running" locomotive has orders to pick up consists, they go with them.

-Loading area. Same thing as stations, but platforms are for consist waiting for full/half/etc load or unload..

Here's demonstration map for shunting unit coding.
Image

Code example..:
(defined shunting unit SU1 and 5-wagon petrol consist)
Code:
couple consist "petrol" #coupling to the consist itself, consist just created at depot
go to SA1 #move consist to shunting area, shunting unit on head
decouple consist "petrol" #decoupling
go to SSP2 via SSP1 #shunting unit goes to Shunting safe point 2 via Shunting safe point 1, via paraller track
go SA1+couple to consist "petrol" #shunting unit goes from previous position to Shunting area 1, and couples to consist from opposite direction
go to SSP2 #shunting unit moves consist to Shunting safe point 2
Push-go (load) to "petrol1" #shunting unit pushes consist to petrol1-loading point from Shunting safe point 2
decouple consist "petrol" #decoupling
go to Depot #go back to depot to wait

And so. This method would be fairly easy to program with gui.
Next piece of code would be waiting loop for bringing back the loaded consist from petrol loading station, and having it transferred to waiting area WA1..
Code:
(Waiting loop)
1 if consist "petrol" state is full, then go to get_petrol else go to 2
2 go to 1

Real waiting loop could have had many more if-beginning stuff... But then get_petrol:
Code:
go to SSP2 #goes near petrol
go to "petrol1"+couple to consist "petrol" #explains itself
go to WA1 #goes to waiting area 1
decouple consist "petrol" #explains itself
go to Depot #explains itself

And then, consist "petrol" could be addressed by some other shunting unit, or it can be coupled to some train, which heads somewhere else.

Any comments, is this anything even near possible to implement? Gui for programming list is a must thing to have, in my concept.

Unfortunately, i am not into coding, but on conceptual level, i have ideas.


Attachments:
File comment: Shunting example
SHUNT.png [21.74 KiB]
Not downloaded yet

_________________
Projects in progress: Finnish Trainset (DevZone)| Finnish Rail Infrastructure and Stations Set (DevZone)
Top
   
PostPosted: Tue Feb 14, 2012 4:45 pm 
Offline
Engineer
Engineer

Joined: Fri Feb 03, 2012 4:42 pm
Posts: 20
Hi,

this is not exactly what you guys want, but I wrote a little patch that allows you to couple your trains.

http://www.youtube.com/watch?v=_ApnuGMzEeM

It's still buggy and I kinda lost interest in developing it, but it seems to be working nicely so far. (never actually played a real game with it on)


Top
   
PostPosted: Tue Feb 14, 2012 5:41 pm 
Offline
Engineer
Engineer
User avatar

Joined: Wed Jun 23, 2010 8:53 pm
Posts: 73
Location: Moscow, Russia
It's very interesting! :bow:

_________________
Image
Image
Image


Top
   
PostPosted: Tue Feb 14, 2012 9:10 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jun 25, 2009 4:42 pm
Posts: 2364
Location: Location, Location
SirOzlington wrote:
Hi,

this is not exactly what you guys want, but I wrote a little patch that allows you to couple your trains.

http://www.youtube.com/watch?v=_ApnuGMzEeM

It's still buggy and I kinda lost interest in developing it, but it seems to be working nicely so far. (never actually played a real game with it on)


Please, post the patch :)

_________________
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra


Top
   
PostPosted: Thu Feb 16, 2012 1:57 am 
Offline
Engineer
Engineer

Joined: Fri Feb 03, 2012 4:42 pm
Posts: 20
I coded it a bit further
http://youtu.be/d9d7wfgMTMg

There's still some cases to handle and some issues to solve, for example: which platform should the train take? Atm I'm handling that with waypoints, as you can see in the clip.


Top
   
PostPosted: Thu Feb 16, 2012 6:05 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Sep 28, 2009 5:15 pm
Posts: 6292
Location: Eastern KY
:shock: WOW!! :bow: Please don't lose motivation on this patch! This would be a HUGE improvement to the game play!

_________________
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: Thu Feb 16, 2012 5:36 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Feb 21, 2010 12:15 am
Posts: 1031
Location: Fitzroy North - 96
Amazed that this isn't getting more attention - looks really fun! Does it would with multi-headed trains?

_________________
Image
Trolleybi! Trucks and Buses -- Docklands -- Unspooled -- MLSS


Top
   
PostPosted: Thu Feb 16, 2012 7:18 pm 
Offline
Engineer
Engineer

Joined: Fri Feb 03, 2012 4:42 pm
Posts: 20
multi head creates a lot of crashes still

the engines drive with the distance they had bevore uncoupling etc.


Top
   
PostPosted: Sat Feb 18, 2012 3:38 pm 
Offline
Tycoon
Tycoon

Joined: Tue Mar 14, 2006 12:46 pm
Posts: 1534
Location: Netherlands
this would be best if you can also decouple parts of the wagons and merge them up into a bigger chain like in real life

aka coal from A, wood from B, iron from C, all to shunting grounds (D) , there merge them up into a ABC train that goes from D to destination E, where it can be splitted in individual components again

(or wood/iron (75%/25%) from A oil/iron from B via D to E, allowing to splint into the wood/iron and oil/iron original components again

aka you have "wagon-subset" id and a "locomotive" id

i think the dutch NS implemented this as "treinwagon-stam" (a fixed set of wagons, that can be pulled/pushed/coupled as long as they stay in that order)

_________________
Screenshots topic
Scenarios&Heightmaps


Top
   
PostPosted: Sat Feb 18, 2012 4:04 pm 
Offline
Engineer
Engineer

Joined: Fri Feb 03, 2012 4:42 pm
Posts: 20
That would be more interesting, but is a lot harder to code and needs a different approach than mine. It's possible tho.


Top
   
PostPosted: Thu Feb 23, 2012 3:57 pm 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jul 09, 2010 6:07 pm
Posts: 28
Location: Minsk, Belarus
SirOzlington wrote:
I coded it a bit further
http://youtu.be/d9d7wfgMTMg

SirOzlington, that's shocking cool! :shock: This would be the greatest patch in OTTD since cargo destinations/distributions appeared! Please, don't give up improving your patch!

_________________
Belarusian translation for OpenTTD
Epochal xUSSR Set


Top
   
PostPosted: Mon Mar 05, 2012 11:48 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Feb 27, 2004 8:03 pm
Posts: 3903
Location: Ontario, Canada
Interesting DEvelopments, I look forward to your next update.

_________________
Regards,

Dan MacKellar
================
Projects in Progress
North American Renewal Train Set Topic,Canadian Train Set Website, Canadian Train Set Development Topic, Finnish Train Set Website,Visit my Train Gifs Site
Image
CN Boxcar drawn by Dave Hersrud


Top
   
PostPosted: Tue Mar 06, 2012 6:12 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 31, 2007 2:23 pm
Posts: 4713
Location: Lost in Music
Nice videos.
It would be interesting to see how this patch works with newgrfs where vehicles modify their behaviour according to position in consist, lead vehicle ID, etc. :D

_________________
FIRS Industry Replacement Set (Released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (Finished)
Squid Ate FISH (ships) (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, released)


Top
   
PostPosted: Fri Mar 09, 2012 11:44 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Dec 09, 2008 4:20 pm
Posts: 2141
Skype: yes
Location: Slovakia
SirOzlington wrote:
I coded it a bit further
http://youtu.be/d9d7wfgMTMg

There's still some cases to handle and some issues to solve, for example: which platform should the train take? Atm I'm handling that with waypoints, as you can see in the clip.


Now here's a brave and kind of rude suggestion: A completely new patch that would give each platform it's own "waypoint" ID

I don't even know if it's doable, but it would help way more than just this problem.

_________________
Image

Only dumb people quote themselves, and only the truest retards put such quotes in their forum signatures
-Drury


Top
   
PostPosted: Sat Mar 10, 2012 10:56 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Aug 09, 2004 12:14 am
Posts: 1518
Location: Not over here
On top of that, to make this work better, it would be nice if a vehicle can check whether there are wagons on a platform and where the cargo contained in those wagons want to go. This would required a lot of code, though.


Top
   
PostPosted: Tue Mar 13, 2012 2:49 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Mon Mar 24, 2008 1:04 pm
Posts: 265
Location: Finland
The use of waypoints in this patch are same as shunting safe points on my conceptual approach. Some waypoint graphics with just mock-up of shunting signals could be nice.

Hmm, if you have one non-symmetric bunch of wagons, and leave them on station, and then run to the other side of wagons and then couple on them, do the wagons turn around (last one becomes first one) or are they in original order?

_________________
Projects in progress: Finnish Trainset (DevZone)| Finnish Rail Infrastructure and Stations Set (DevZone)


Top
   
PostPosted: Wed Mar 14, 2012 4:58 pm 
Offline
Engineer
Engineer

Joined: Fri Feb 03, 2012 4:42 pm
Posts: 20
in my patch, the wagons turn around if necessary keeping the order

to clarify: the whole group of wagons turns, as if they had a locomotive in the front and were turning. so the a-b-c-d becomes d-c-b-a if the locomotive is approaching from the other side


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 205 posts ]  Go to page Previous 1 2 3 4 5 611 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


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.