ID:2390960
 
BYOND Version:512
Operating System:Windows 10 Home
Web Browser:Chrome 68.0.3440.106
Applies to:both seeker and daemon
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary: When you set world.fps to 100 in a project, then compile and run, it runs at 60 FPS. while if you host it in dream daemon, it runs at 100FPS. This has lead to various timing issues with stuff (sleep() is shorter in daemon, while compile and run is longer).

Numbered Steps to Reproduce Problem:
Make a simple project with world.fps set to 100, make a few animations with sleep(). Use compile and run (dream maker), see how it acts in there, then host that project with dream daemon, and test it there.

Expected Results: Same timing on both seeker and daemon

Actual Results: Wrong timing

Code snippet (and reproduce): https://github.com/AlcaroIsAFrick/Dab13AnimationSystem/
enable the file Extra Animations.dm and try any of the verbs in there in Compile and run (with dream maker), they will be slow, but if you try it on dream daemon (host) it runs way faster.

Does the problem occur:
Every time? Or how often? Yes
In other games? Yes
In other user accounts? Yes
On other computers? Yes

When does the problem NOT occur? When you host it. Where the timing is proper.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.) Uhh I think it happens on every version

Workarounds: Host the project

It doesn't make sense that it would run in 60 FPS, since that's an unnatural speed for BYOND (it doesn't divide evenly into 1000) and therefore there's no internal code falling back on it. Is it possible that running both the server and the client in the same process is swamping out one of your cores?
Did you try the project in compile and run, and dream daemon? I tried both of them at the same time, and compile and run seems to be running slower than Dream Daemon
No, I haven't tried it yet. But what you're describing is exactly consistent with swamping one of your cores, just like I said. Hosting in Dream Daemon means the server will run independently of the client. Running in Dream Seeker directly means you're running both the client and the server. At a ridiculously high FPS like that, I could see some projects being too much to keep up timing.
This bug still happens, and what's happening here is that if FPS is > 60, and you run from Compile And Run, it will lock your FPS at 60 and not go any higher. Setting world.fps to 60 fixes it, but it looks like theres some sort of fps limit acting on here. CPU isn't the issue I think.
I've experienced this myself. It seems that any values of 60 or above result in different FPS between hosting through DD or running direct through DS.

If I set it to 60, DD runs at 60 but DS is at 58-59, which results in an obvious stutter.

On very simple projects, I've found that running through DD can actually be much slower, oddly enough.