Jun 7 2015, 12:59 pm
|
|
I don't see any reason that server fps needs to go above 20 or so if we can get client-side interpolation to run at 40 or 60fps.
|
I could see some reasons to go above 20FPS server-side, but those cases would be rare, very rare, and would only be effective in specific setups/situations, like at a LAN party. Especially once physical latency starts rearing its ugly head past 50ms, you'll start encountering pretty heavy jitter and possibly out-of-sync/lost commands.
|
BYOND runs on TCP. You don't lose commands or go out of sync. TCP by default orders and refires commands.
40fps is my preferred way to work right now, but if I could drop the server down to 20fps and the client framerate to 40 or 60, I'd be amazingly happy. EDIT: It should be noted, however, that I agree that 25ms is too small a granularity for players to reliably control. Macro repetition should probably be avoided in DM if you go above 20fps or so, because average latencies can get up to 50ms and 90ms across the net. I tend to use onPress/onRelease approaches with input state management, which means movement will be a maximum of 2-4 frames late, and movement stopping will be 2-4 frames late. I'd rather a slight "loose" feeling than a jumpy feeling. |
+1 For this. It seems like it would take a lot of work off the server while still maintaining quality for the clients.
|
In response to Ter13
|
|
"BYOND runs on TCP. You don't lose commands or go out of sync. TCP by default orders and refires commands."
Very true, but there's still packet loss to handle via error correction. That adds up to resource usage on the server. "40fps is my preferred way to work right now, but if I could drop the server down to 20fps and the client framerate to 40 or 60, I'd be amazingly happy." My timing method might seem strange, but give it a shot. I've found it to be very useful and balanced for user vs. world code. world Plus: atom/movable I'm using someone else's code, but it's modified to where it provides near-equal performance from any machine from a hyper-threaded 3.2 GHz P4 to an Intel Atom 1.6 GHz to 733 MHz PIII Tualatin. As long as you've got ~512MB RAM, you should be fine to run this. There are still sync issues for mobs, but nowhere near as bad as say SS13 and derivatives thereof. |
In response to Ter13
|
|
Also, if someone could remind me where this original code came from so I can put it into my credits file, I'd be most gracious and gratified.
|
Also, if someone could remind me where this original code came from so I can put it into my credits file, I'd be most gracious and gratified. You are talking to him. http://www.byond.com/forum/?post=1573076 Also, your TICK_LAG value is wrong. it should be 0.333, not 0.3. |
0.3 provides better animation and tile glide vs 0.333.
You'll have to pardon me, I'm an ASM/demoscene programmer by trade. The way I've got your engine modified now, you could roll CandyTron if you just added a 3D renderer. Sadly, you'll have to deal with the bass-ackwards hell that is FORTH if you worked with my code that's further down. |
In response to Khyberkitsune
|
|
Khyberkitsune wrote:
0.3 provides better animation and tile glide vs 0.333. Yeah, but you wind up with inaccuracy over a significant number of frames. The way I've got your engine modified now, you could roll CandyTron if you just added a 3D renderer. Wat? |
Thankfully the inaccuracy does nothing to my 'game,' given this being a graphical update of a text social game with no combat, etc.! Having a mob being able to maybe be a tile ahead now and then whilst walking really isn't much of a big deal.
Now, on Candytron. https://www.youtube.com/watch?v=P1lL-NBpels Just watch. I don't have it done in 64k of code like these guys. It's more like 3MB. >.> Your engine is far more extensible than I imagined. It took a LOT but just for fun I tried to see if it could be done. I can get 'bout 3FPS with a single untextured model. :D |
In response to Khyberkitsune
|
|
That is a KILLER reference!
But seriously! I had no idea this engine could be so easily extensible! |
In response to Ter13
|
|
Ter13 wrote:
That about sums it up. |
Just to clarify, Pomf, I wasn't planning on implementing this right away. I was floating the idea as a trial balloon. I suspect it'll be feasible, so I want to start working in that direction, although I think 509 is an unlikely target. (However, I might try to get the backend var and message support in for 509, so that it'd be easy to activate in a later beta of the same major build if I got the concept working. I'll have to see.)
|
Yes, We would love to see this kind of thing at ss13, we have to make systems to live raise and lower fps based on server load, because we want it to be as high as possible for client reasons.
|
In response to MagicMountain
|
|
MagicMountain wrote:
I'm late to this thread but this sounds incredibly useful. |
Lummox JR wrote:
However, a prerequisite is finishing DSification of the webclient, which would have to come first for this to work. So this isn't an immediate plan, but something I'm looking at for down the road (hopefully not very far). Maybe this could be a feature goal for 511, along with gamepad support, since the main obstacle is out of the way (DSFication of the webclient). Edit: Oops, didn't realize this was mentioned in a recent status update. Good stuff. |