Where do you draw the line?

Discuss anything related to Train Simulator from DoveTail that does not fit in one of the more specific categories.

Re: Where do you draw the line?

Postby Rockdoc2174 » Tue May 27, 2014 10:28 am

The introduction of chained scenarios makes it much easier to develop what would have been long scenarios as easily-digestible lumps and I really must give them a whirl but I found that TS didn't like long scenarios anyway. I tried to develop an early-morning fitted freight train for S&Cv7, starting at Hellifield. There was a short stop at Settle then a long grind up the Drag before waiting at Blea Moor for an express to pass. All that was fine but I started to see odd things after that. AI trains would start to appear showing red lamps to the front and then AI trains would set off in a very odd fashion - apparently staying put after their launch time but then vanishing and reappearing some way down the line where they should have been had all gone according to plan. Things became even more erratic after that and the scenario had to be abandoned because, as has already been said, it lasted three hours in total and as the 'errors' didn't appear until after the hour mark the testing just got out of hand.

Keith
Rockdoc2174
Driver
 
Posts: 466
Joined: Mon Apr 14, 2014 10:52 am
Has thanked: 137 times
Been thanked: 213 times

Re: Where do you draw the line?

Postby Tankski » Sun Jun 01, 2014 11:30 am

AndiS wrote:Small idea for carrying over engine state between arbitrary scenarios: You guys abuse the vehicle numbers for so much like head codes and such, you could add another digit which is totally invisible but selects a certain set of changed states. So if zero is default, a 1 in the end will cause state file 1 to be loaded, 2 will load file 2, etc.. Of course, you need to save to the corresponding file, too.

Then you could run your scenario series that uses engine ...1 and alternate running this with another series using ...2. It will not stop people from playing the scenarios in the wrong order, but then again, they may not mind if the boiler state is simply the same as when they complete the previous scenario, even if they go backwards in time. You could, of course, give them an alert when you find time of day being earlier than at the previous save, but who wants that?


Saving game state to a series of serialised text files could be quite difficult, especially if the same scenario is resumed and then stopped requiring a re-write (in the instance of a file for each unique scenario - not sure how feasible this would be in reality). What might be a better idea would be to use something like SQLite to store the information. I'm unsure on the Lua support for such things, though, but I'd imagine there'd be libraries for it somewhere (GitHub, maybe?). It'd handle all reads and writes fairly easily, and you could just store a slqite database with each locomotive. It also means you're not handling all of the files being stored somewhere, but more of a single file with a single table and multiple records.
Tankski
Fit for Firing Duties
 
Posts: 39
Joined: Mon Mar 31, 2014 11:14 am
Has thanked: 3 times
Been thanked: 50 times

Previous

Return to Train Simulator Mess Room

Who is online

Users browsing this forum: No registered users and 5 guests