Realtime 3.1-maybe-beta (12.2 base)
Moderator: OpenTTD Developers
Re: "Real" time patch
i can think of two obvious ways this could happen:SciFurz wrote:I'm currently trying to figure out why cargo only gets a destination with a day length factor of 1038 or lower
- a counter overflows, and never reaches a trigger threshold
- a division by a large value results in always rounding to 0
Re: "Real" time patch
Looks like it did have something to do with an overflow of ticks, I reverted the simple linkgraph code changes and added code that uses _date and _date_fract seperately without multiplying the lot together with day ticks and the day length factor (in the end it was too much for int32 while I thought at first I calculated enough overhead). Suddenly a bunch of people want to go places. :-pEddi wrote:i can think of two obvious ways this could happen:
- a counter overflows, and never reaches a trigger threshold
- a division by a large value results in always rounding to 0
Now to do the same trick for other functions where doing things in less that one day is useful..
Tinkering in the code in between writing mostly naughty stuff.
See http://scifurz.wordpress.com/
See http://scifurz.wordpress.com/
Update on TTD 1.9.1 patch
See top post for the patch.
Modified linkgraph code which seems to work now. A few changes still have to be made though.
Introduced several macros for code clarity and abbreviation, eleminating some long code lines dealing with ticks and their multiplications.
Thought about creating a single date stamp variable with functions for calculations but that would be overkill and a lot of extra code stuffed in between. Where necessary I'll add bits to calculate total days and day fractions seperately.
And now back to digging through the code.
Modified linkgraph code which seems to work now. A few changes still have to be made though.
Introduced several macros for code clarity and abbreviation, eleminating some long code lines dealing with ticks and their multiplications.
Thought about creating a single date stamp variable with functions for calculations but that would be overkill and a lot of extra code stuffed in between. Where necessary I'll add bits to calculate total days and day fractions seperately.
And now back to digging through the code.
Tinkering in the code in between writing mostly naughty stuff.
See http://scifurz.wordpress.com/
See http://scifurz.wordpress.com/
Vanilla patch update 0.9, nearly done for plain OpenTTD.
Getting closer to done now.
Made the time factor a selection list with reasonable options up to running at near real time.
At least for busses it all seems to work, so I'll just be busy creating a network to check out other cargo, trains, etcetera.
If that seems fine I can continue work on the JGR patch and on adding the time factor variable to the savegame code.
Made the time factor a selection list with reasonable options up to running at near real time.
At least for busses it all seems to work, so I'll just be busy creating a network to check out other cargo, trains, etcetera.
If that seems fine I can continue work on the JGR patch and on adding the time factor variable to the savegame code.
Tinkering in the code in between writing mostly naughty stuff.
See http://scifurz.wordpress.com/
See http://scifurz.wordpress.com/
Tile size test
Checked for tile size at a time factor of 1440 yesterday while tweaking code. Ran a train and a fast bus between two stations with a travel time of 3600 ticks and calculated speed versus number of tiles, and came up with a tile size of roughly 1.73 kilometre.
Taking that into account the tile size at the current highest time factor would go down to around 50 metres, and I could add even one step higher to get around 25 metres but then the game would run at half the real time.
On the other hand that might not matter to anyone wanting to run it as a model train track. It's a lot more room to scale than the tile size of around 18 kilometres with day length patch set at 125.
Taking that into account the tile size at the current highest time factor would go down to around 50 metres, and I could add even one step higher to get around 25 metres but then the game would run at half the real time.
On the other hand that might not matter to anyone wanting to run it as a model train track. It's a lot more room to scale than the tile size of around 18 kilometres with day length patch set at 125.
Tinkering in the code in between writing mostly naughty stuff.
See http://scifurz.wordpress.com/
See http://scifurz.wordpress.com/
JGR patch updated, realtime-JGR-0.7.diff
After trouble with savegame settings, started from scratch again with the JGR source for a clean patch.
As with the vanilla TTD patch, this one introduces the time factor selection for setting the game speed among some minor tweaks.
Have to start a new game to test changes to linkgraph, and timetables and dispatch still have to be converted to the extra real time variables I added, but the patch is playable as far as I see.
As sson as this timing replacement is done I'll have to try out the shunting patch here, which would look awesome on a huge distribution yard with some real timetabling.
Creating day and night cycles seems like a real option too now.
As with the vanilla TTD patch, this one introduces the time factor selection for setting the game speed among some minor tweaks.
Have to start a new game to test changes to linkgraph, and timetables and dispatch still have to be converted to the extra real time variables I added, but the patch is playable as far as I see.
As sson as this timing replacement is done I'll have to try out the shunting patch here, which would look awesome on a huge distribution yard with some real timetabling.
Creating day and night cycles seems like a real option too now.
Tinkering in the code in between writing mostly naughty stuff.
See http://scifurz.wordpress.com/
See http://scifurz.wordpress.com/
Small update JGR patch
Linkgraph is working now, made a small update of the JGR patch.
Getting dispatch working is next.
Getting dispatch working is next.
Tinkering in the code in between writing mostly naughty stuff.
See http://scifurz.wordpress.com/
See http://scifurz.wordpress.com/
Updated JGR patch
Hopefully fixed the dispatch time issue.
Everything seems to be functional now, which doesn't seem bad for something others said couldn't be done. :-p
Everything seems to be functional now, which doesn't seem bad for something others said couldn't be done. :-p
Tinkering in the code in between writing mostly naughty stuff.
See http://scifurz.wordpress.com/
See http://scifurz.wordpress.com/
Update vanilla patch
Modified savegame code for changed and new variables, no problems saving and loading new games but original 1.9.1 savegames fail with invalid chunk size error.
I thought that would work after this last change but maybe I overlooked one variable.
I thought that would work after this last change but maybe I overlooked one variable.
Tinkering in the code in between writing mostly naughty stuff.
See http://scifurz.wordpress.com/
See http://scifurz.wordpress.com/
JGR patch updated for version 0.31.0
Updated the JGR patch for version 0.31.0 and implemented the saveload changes.
Noticed town labels turned red despite authority on a good level, so building is not a problem.
Noticed town labels turned red despite authority on a good level, so building is not a problem.
Tinkering in the code in between writing mostly naughty stuff.
See http://scifurz.wordpress.com/
See http://scifurz.wordpress.com/
Re: Updated JGR patch
Not bad indeed! With computers, there are always people who say something can't be done; always have been, but there's always a way.SciFurz wrote:Everything seems to be functional now, which doesn't seem bad for something others said couldn't be done. :-p
Extreme network builder. screenshot thread
Re: Updated JGR patch
Thanks! Whenever someone said something couldn't be done I got the urge to take on that challenge. My pride of being a systems administrator was at stake then.eekee wrote:Not bad indeed! With computers, there are always people who say something can't be done; always have been, but there's always a way.SciFurz wrote:Everything seems to be functional now, which doesn't seem bad for something others said couldn't be done. :-p
Tinkering in the code in between writing mostly naughty stuff.
See http://scifurz.wordpress.com/
See http://scifurz.wordpress.com/
Re: "Real" time patch (TTD 1.9.1 + JGR 0.31.0)
i'm failing to see any post saying "it can't be done"...
Re: "Real" time patch (TTD 1.9.1 + JGR 0.31.0)
If not outright stated, it was surely implied by posts I've come across before while I read through the board (don't ask where, too long ago).Eddi wrote:i'm failing to see any post saying "it can't be done"...
Why else would several people make patches that squeezed in ticks between the default ticks instead of taking on the root of the "problem"? Unless the reason was as a friend of mine suggested, simply fear of taking on the task.
Tinkering in the code in between writing mostly naughty stuff.
See http://scifurz.wordpress.com/
See http://scifurz.wordpress.com/
-
- Chief Executive
- Posts: 675
- Joined: 03 Apr 2016 20:19
Re: "Real" time patch (TTD 1.9.1 + JGR 0.31.0)
Can someone compile a version of JGR 0.31.0 that includes this patch? Or at least give me a tutorial so I can do it myself?
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
Re: "Real" time patch (TTD 1.9.1 + JGR 0.31.0)
I took a quick look at the cross compiling instructions on the OpenTTD wiki, https://wiki.openttd.org/Cross-compiling_for_Windows, and might give it a shot one of these days (need to do manual compile). If that works I'll post Windows executables as well.SimYouLater wrote:Can someone compile a version of JGR 0.31.0 that includes this patch? Or at least give me a tutorial so I can do it myself?
I remember someone asking for a version of the shunt patch with day length patch in it so I could also post the test version I compiled in the shunt thread.
Tinkering in the code in between writing mostly naughty stuff.
See http://scifurz.wordpress.com/
See http://scifurz.wordpress.com/
-
- Chief Executive
- Posts: 675
- Joined: 03 Apr 2016 20:19
Re: "Real" time patch (TTD 1.9.1 + JGR 0.31.0)
A version with both shunt and real time would be nice, if possible.SciFurz wrote:I took a quick look at the cross compiling instructions on the OpenTTD wiki, https://wiki.openttd.org/Cross-compiling_for_Windows, and might give it a shot one of these days (need to do manual compile). If that works I'll post Windows executables as well.SimYouLater wrote:Can someone compile a version of JGR 0.31.0 that includes this patch? Or at least give me a tutorial so I can do it myself?
I remember someone asking for a version of the shunt patch with day length patch in it so I could also post the test version I compiled in the shunt thread.
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
Re: "Real" time patch (TTD 1.9.1 + JGR 0.31.0)
I had a look at the latest version and again had a train stuck on "waiting for free path", so I'll have to integrate specific parts of the patch and see if that's functional enough to warrant a compiled executable.SimYouLater wrote:
A version with both shunt and real time would be nice, if possible.
Maybe I'll have to build upon the original work and create an alternative version.
Tinkering in the code in between writing mostly naughty stuff.
See http://scifurz.wordpress.com/
See http://scifurz.wordpress.com/
-
- Chief Executive
- Posts: 675
- Joined: 03 Apr 2016 20:19
Re: "Real" time patch (TTD 1.9.1 + JGR 0.31.0)
Fair enough. I guess a real time patch version of JGRPP is enough to sate my appetite for realism. Thanks in advance!SciFurz wrote:I had a look at the latest version and again had a train stuck on "waiting for free path", so I'll have to integrate specific parts of the patch and see if that's functional enough to warrant a compiled executable.SimYouLater wrote:
A version with both shunt and real time would be nice, if possible.
Maybe I'll have to build upon the original work and create an alternative version.
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
Who is online
Users browsing this forum: No registered users and 7 guests