Jump to content
Sign in to follow this  
tonic-_-

MP Fast time FSM - JIP Compatible

Recommended Posts

Hello Community,

Something like this seems to be a rarity now a days people are usually coming up with custom solutions and what not but never seem to share when they come up with a solid solution so I figured I would release a Fast time FSM that supports JIP and also syncs clients with the server so that they stay in sync and don't off-sync. This is something that I have built for a mission I am developing called Wasteland and would like to share with the community to help new mission makers looking for such a feature to easily implement into their missions.

Current Version: V2.1

Features:

- Fast time

- JIP Compatibility

- Faster/Slower Night Cycle

- Client -> Server sync every 10 minutes

Usage:

Interval: Minutes to Skip

Bool: False to use skipTime true to use setDate

Night Cycle: false to disable fast night true to enable fast night

[interval,Bool, Night Cycle] execFSM "core_time.fsm";

Notes on Night Cycle:

If you set the night cycle to True by default the night cycle will double up on the current interval, if you want a custom night cycle interval then you would do:

[5,false,true,7] execFSM "core_time.fsm";

If you make the night cycle value lower then the primary interval then your night cycle will be slower thus making the night last longer.

Notes on skipTime/setDate:

In this update of the FSM I added the ability to use either the skipTime command, or the setDate command to make time go by faster. Below are notes on Skiptime from the wiki.

skipTime does not actually estimate weather changes beyond moving the clouds across the sky. Weather counters continue as if no time has passed. The setDate command can be used instead of skiptime to change the time without

the visual give-away of the lower clouds jumping.

Examples:

Skip 5 minutes, use skipTime, no custom night cycle.

[5,false,false] execFSM "core_time.fsm";

Skip 5 minutes, use setDate, enable faster night cycle (no params) making time at night go by 10 instead of 5.

[5,true,true] execFSM "core_time.fsm";

Skip 5 minutes, uses setDate, enable Night Cycle (with params) making time at night go by 7 instead of 5.

[5,true,true,7] execFSM "core_time.fsm";

Notes:

If players are still receiving the stuttering issue have them send me their RPT log! The safety check system is experimental and I have no idea if it will actually make a difference, it checks to see if the player is getting less then 35 FPS. I myself can't test it because my system is high end.

This should also be ran by both the server & the clients. Should call it at the end of your init.sqf

Changelog:

Added: Safety check put in for clients that get 'stuttering' issues.

Added: Ability to use skipTime or setDate.

Added: Night Cycle making it faster or slower depending on configuration.

Download:

http://armafiles.info/pub/core_time_v21.zip

http://www.armaholic.com/page.php?id=17497

If you have questions or problems you can reach me via email:

Tonic@taw.net

Enjoy :)

- Tonic aka TAW_Tonic

Edited by Tonic-_-

Share this post


Link to post
Share on other sites

So, following on from another post looking at fast time, but only at night. This FSM could be used?

Share this post


Link to post
Share on other sites

awesome! very needed for all kinds of missions. i'll use that in my horror stuff. thanks alot!

Share this post


Link to post
Share on other sites

UPDATE: V2

Features:

- Fast time

- JIP Compatibility

- Faster/Slower Night Cycle

- Client -> Server sync every 10 minutes

Usage:

Interval: Minutes to Skip

Bool: False to use skipTime true to use setDate

Night Cycle: false to disable fast night true to enable fast night

[interval,Bool, Night Cycle] execFSM "core_time.fsm";

Notes on Night Cycle:

If you set the night cycle to True by default the night cycle will double up on the current interval, if you want a custom night cycle interval then you would do:

[5,false,true,7] execFSM "core_time.fsm";

If you make the night cycle value lower then the primary interval then your night cycle will be slower thus making the night last longer.

Notes on skipTime/setDate:

In this update of the FSM I added the ability to use either the skipTime command, or the setDate command to make time go by faster. Below are notes on Skiptime from the wiki.

skipTime does not actually estimate weather changes beyond moving the clouds across the sky. Weather counters continue as if no time has passed. The setDate command can be used instead of skiptime to change the time without

the visual give-away of the lower clouds jumping.

Examples:

Skip 5 minutes, use skipTime, no custom night cycle.

[5,false,false] execFSM "core_time.fsm";

Skip 5 minutes, use setDate, enable faster night cycle (no params) making time at night go by 10 instead of 5.

[5,true,true] execFSM "core_time.fsm";

Skip 5 minutes, uses setDate, enable Night Cycle (with params) making time at night go by 7 instead of 5.

[5,true,true,7] execFSM "core_time.fsm";

Notes:

If players are still receiving the stuttering issue have them send me their RPT log! The safety check system is experimental and I have no idea if it will actually make a difference, it checks to see if the player is getting less then 35 FPS. I myself can't test it because my system is high end.

Download:

http://armafiles.info/pub/core_time_v21.zip

Changelog:

Added: Safety check put in for clients that get 'stuttering' issues.

Added: Ability to use skipTime or setDate.

Added: Night Cycle making it faster or slower depending on configuration.

Edited by Tonic-_-

Share this post


Link to post
Share on other sites

Glad you updated this. I had no idea it was out there. Got a few ideas for this, going to try it out.

Thanks

Share this post


Link to post
Share on other sites

Awesome, good to see things being released and not getting hidden away. Going to test it out now.

Edited by Melbo

Share this post


Link to post
Share on other sites

A design over sight was spotted and a hotfix is now available. A variable would go nil and I wasn't paying attention to the design aspect and problems didn't occur during testing so it wasn't spotted before push.

The updated version can be downloaded at:

http://armafiles.info/pub/core_time_v21.zip

Share this post


Link to post
Share on other sites

I've not tested the new hot fix version but the older one worked a treat last night. No one was reporting any stuttering what so ever. Very impressed. Looking forward to seeing what you have done with Wasteland, shame no one was really on your Wasteland ACE server over the weekend :(

Share this post


Link to post
Share on other sites

is this to be run client or server or both maybe a simple example mission would be cool for the next version as it where to run the code from

Share this post


Link to post
Share on other sites

I'm sorry I should of noted that in the notes. This is to be ran by both the client and the server.

The new fix was mainly for clients, the server side should of worked fine but the new fix is what should be used otherwise clients will receive error messages and will not 'skip' forward in time.

Share this post


Link to post
Share on other sites

Still get the stutter when the time synchs mate!

"Client time: Safety was true"
"Client time: Safety was true"
"Client time: Safety was true"
"Client time: Safety was true"
"Client time: Safety was true"
"Client time: Safety was true"
"Client Time: Time synced from server to [2020,7,1,16,0]"
"Client time: Safety was true"
"Client time: Safety was true"
"Client time: Safety was true"
"Client time: Safety was true"
"Client time: Safety was true"
"Client time: Safety was true"
"Client time: Safety was true"
"Client time: Safety was true"
"Client time: Safety was true"
"Client time: Safety was true"

Had a few sporadic Safety was true messages, that was the only time synched message in my rpt file!

Any ideas?

Server fps was 27, my fps was roughly 45..

Cheers

Share this post


Link to post
Share on other sites

As Marker said. Stuttering starts when it is called client side.

Share this post


Link to post
Share on other sites

I can confirm this stuttering issue also. Occurs when running the script on the client. I thought it was only necessary to run server side? :(

Also can you confirm the setting for running in real time mode as I am unsure what is correct?

nul = [1,false,false] execFSM "core_time.fsm";

or

nul = [0,false,false] execFSM "core_time.fsm";

Logs:

Server.RPT

2:40:30 "Server Time: Jip Var set and synced"

Cleint.RPT

"Client Time: Time synced from server to [2013,2,13,8,20]"
"Client time: Safety was true"
"Client time: Safety was true"
"Client time: Safety was true"

Share this post


Link to post
Share on other sites

Well it seems that people receiving the stuttering issues are when safety is true, so as I thought it was an issue due to clients with low-mid range systems.

In the next version I will change it up, and when the safety is true, it will not 'fast' forward time for the clients like other clients with high end systems, it will only sync the time from the server every 10-15 minutes. This solution will off-sync clients from other clients but keep the time close every 10-15 minutes, will reduce the stuttering from every minute and may only occur every 10-15 minutes, sounds reasonable I suppose in theory.

And for real time it's the first one you put up ssechaud:

[1,false,false] execFSM "core_time.fsm";

And the report of Client time: Safety was true is just a debug message I have in place for when people report stuttering so I can see if the safety check was enabled or not.

I will have a beta-version up for testing later today so if you are willing to help shoot me a private message on the forums.

Edited by Tonic-_-

Share this post


Link to post
Share on other sites

Well, for people that want to test this change.

http://armafiles.info/pub/core_time_beta.zip

Examples:

//Skip 5 minuntes, use skipTime, sync every 10 minutes, skip time every minute,do not use night cycle

[5,false,10,1,false] execFSM "core_time.fsm";

//Skip 5 minuntes, use setDate, sync every 10 minutes, skip time every minute,Night Cycle, night skips by 7

[5,true,10,1,true,7] execFSM "core_time.fsm";

Basically in this beta test before the next release I have changed up the safety feature, if a client is flagged as safety it will not 'skip' the time every minute or w/e you have defined. Will only skip the time through the sync cycles of what you have defined. Should reduce the stuttering and make game play decent while keeping the time for everyone in sync.

Edited by Tonic-_-

Share this post


Link to post
Share on other sites

I will test this and post back any findings. Just to be clear about this "stuttering", it just looks like the clouds jump, the game itself still runs fine, for me at least.

Share this post


Link to post
Share on other sites
I will test this and post back any findings. Just to be clear about this "stuttering", it just looks like the clouds jump, the game itself still runs fine, for me at least.

What I mean by stuttering is frames drop and game locks up. Clouds jumping is because of using the method skipTime, if you don't want the clouds to jump, set the second param to true to use setDate and that won't happen.

Share this post


Link to post
Share on other sites

How does this script determine night? Is it based solely on the presence of sun/moon being up?

Share this post


Link to post
Share on other sites
How does this script determine night? Is it based solely on the presence of sun/moon being up?

Yes, it decides based on SunOrMoon command implemented in ARMA CO Patch 1.62

Share this post


Link to post
Share on other sites

Should this work with ArmA3 Alpha too? I dont seem to get it work. :S

Share this post


Link to post
Share on other sites
Should this work with ArmA3 Alpha too? I dont seem to get it work. :S

Umm.. It should work. I did a bit of testing on A3 but not enough to notice it fully working. Will do some more testing and report back if it is.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×