ID:1675744
 
BYOND Version:507
Operating System:Windows 7 Home Premium 64-bit
Web Browser:Chrome 37.0.2062.103
Applies to:Dream Daemon
Status: Open

Issue hasn't been assigned a status value.
Problem Summary:
When I host a game that has a non default step size the movement is jittery but only when I'm hosting the game.

When I compile and run it, works perfectly. When I host it on my own computer using Dream Daemon then join that, jittery movement.

Numbered Steps to Reproduce Problem:
1. Create a project with a map and a couple of types of tiles.

2. Set mob.step_size = 8 when the normal step_size is 32.

3. Compile & run for smooth movement

4. Host in the dream daemon, join that. Now the same project is jittery.


Code Snippet
mob
step_size = 8


Expected Results:
(When run from the dmb)
Moving at a uniform speed.

(When hosted and joined on the same computer)
Moving at a uniform speed.

Actual Results:
Moving sometimes faster, sometimes slower. Happens

When does this occur?:
Happens every time and with other games. I don't have another computer to test it on.

When does the problem NOT occur?
If I'm hosting and I've joined that game, always.

Did the problem NOT occur in any earlier versions?
I've tried as far back as build .498 and it still happens with that.

Workarounds:
So far, I can find none.
I'll need an example, because I've tested this kind of thing a hundred times in different scenarios.

I'm not sure I wouldn't rule out network latency, if you're joining from the remote IP address. If you're just using the Join icon in DD, then any latency should be minimal to none.
I'm using the join icon in Dream Daemon.

It's hard to find something to capture it that does the difference justice.

It's like if I'm using 40 fps, I host it and get 30ish. That and it will jitter every couple of seconds when I'm moving.

A good example is when I host it and take my finger off an arrow key there's a noticable delay between when I take it off and when my mob stops moving. When I compile and run it, that doesn't happen. It's all around less responsive and kinda jerky.
Also, I need to note. I checked on my task manager. Dream Seeker uses 1 to 2% CPU when run directly from the .dmb and uses 0% CPU when hosted and joined.

Dream Daemon also uses 0% CPU.

Seems like something is affecting dream seeker's performance when it's run by Dream Daemon.
The difference you're seeing in CPU is likely just rounding error. DD is doing all the same work as is DS, but it's just been split up across the two programs.

It sounds almost as if your system timer is failing to keep DD and DS in sync by firing at a good enough pace. The judder you're describing is consistent with ticks getting missed.
I would definitely agree that's likely. Do you have any suggestions on what I could do to fix it?

I run other games and programs on this computer and I don't see this happening.

Like, when I just run single player it works fine.
No, it's just that at the moment I don't have anything testable that will help me work this out. This appears to happen on your computer, if not exclusively than at least more frequently than it happens elsewhere.

The only suggestions I could make would be to make sure nothing else is eating all your CPU cycles and possibly disrupting the timer. On a busy system I would expect timing to be shot completely, so if you had an app racing in the background that would explain everything.

One thing you didn't mention was tick_lag. If you changed world.fps or world.tick_lag, I would expect high-framerate games to experience this much more than low-framerate ones. If this is happening even at the default world.fps of 10, something is seriously messed up and I'd have to say your network drivers are the likeliest culprit.

One thing to take a look at also would be if your antivirus is monitoring the connection and maybe delaying things, or if malware might be active. Most antivirus software comes with network protection, so maybe your connection is not direct and the antivirus is having a hard time keeping up (or doesn't care about delivering it in a timely manner). The results you've seen are also consistent with Nagle's algorithm being active, which we disable for better performance, and that could mean that whatever is monitoring the network is spitting out data in chunks instead of on time.
Okay so I've updated my network drivers, disabled Nagle's algorithm manually and tried with my anti virus disabled. None of this helped unfortunately.

As for the FPS, I'm using 40 FPS which is the recommended FPS for pixel movement written in the help file for pixel movement. Oh and I've made sure nothing else was running that the computer didn't needed to function. Frankly, if my computer can play Crysis I think it has the ability to run Dream Daemon.
Here's someone else with the same problem:

http://www.byond.com/forum/?post=1693904
https://www.dropbox.com/s/94srmji04f7odmt/Boundless.zip?dl=0

You can download the hostfiles for it to test out. When run from the dmb directly movement is smooth. When run from Dream Daemon movement becomes laggy.