Comments (3)
Hi @tomknappramos !
Lance founding and core member here. Happy to answer you questions :)
I gave a talk about this once in a conference, their audio is not great but it does cover a lot of the points here:
https://www.youtube.com/watch?v=V2cvGD7Yeak
I'll try to address your questions.
1 & 2 -
"local" objects are those with properties that are under the player's control, while "remote" are those that aren't. It tackles the problem of "who has the newest information". Think of a spaceship game - when you pilot YOUR ship on your own computer, you are the one who has the newest information about its intentions and movement. The server will get those movement requests eventually a, but as the ship controller you expect it to move and react smoothly to your input. IE when you press a key, you expect to see the ship moving immediately. Contrast this with another player's spaceship - you don't control it, so you wouldn't have a way to notice if there's a slight discrepancy between the time they pressed a key to move it and when it actually moved on your screen.
The client is ALWAYS adjusting itself to the server's authority. That's what authoritative server means. A lot of this stuff is visual trickery to make it appear as if everything is running in "realtime".
3 & 4. Interpolate indeed performs bending. Take a look at the interpolate strategy
- These are different solutions to different problems. See
https://lance-gg.github.io/docs_out/tutorial-guide_syncinterpolation.html
and
https://lance-gg.github.io/docs_out/tutorial-guide_syncextrapolation.html
I also cover which should be used when in the video linked above around the 19:00 mark
- Honestly I'm not really familiar with Colyseus. Lance was built from the ground up to serve the needs of 100% native JS web-based games. Having said that, Lance is being maintained but no longer actively developed. I have plans for further development in the future, but I don't know how far along in the future.
from lance.
@OpherV thanks for getting back! I appreciate it!
I got the vibe that Lance was "no longer actively being developed", but it works and the development experience is great. So, for me, it's worth a try! Plus, look at C. It's the leading language used in the game dev industry, and I don't think anyone is actively maintaining very many C libraries these days (I could be wrong on that haha).
1&2,
I'm glad that I confirmed that the bending mechanisms don't affect the server (ie, the server does in fact have "full authority")! I mainly wanted to confirm that! And, just get a more solid grasp on what's going on, would you say this right?
Clients store 2 types of states,
- remote state - state that came from the server
- local state - state that comes from running the game locally
To appear "live", clients go ahead and simulate user actions on the local game engine right away. But! Clients don't do the actions completely. Instead of fully commiting to the simulated next state and rendering that next state, the client can approach the simulated new state, and bending is the percent at which clients approach that next state. That is localObjBending.
Then, when a remote state comes in from the server, to avoid choppiness, clients can gradually approach that "actual remote state". Where, again, bending is the percent at which clients approach that most recently known "actual remote state". That is remoteObjBending.
So, clients are bending towards 2 things - bending towards the "simulated next state" as well as bending towards the "most recently known remote state".
Personally, my instinct tells me to set both to 1. That just seems logical to me.
3&4,
Noted! I would have assumed that interpolation mode would have no localObjBending seeing that it's simply connecting the dots between remote states?? Sorry, I'm still learning... Also, the timing graphs on the Lance website go over my head... For some reason my brain doesn't comprehend them well at all. I understand the ideas of interpolation/extrapolation, but those graphs probably would have to be like a video or something for me to understand them haha.
5,
For real-time games (the best kind of games... IMO haha), like Sprocket/Rocket League or first-person shooters, it seems like extrapolation is 100% the way to go because you want things to feel as snappy as possible. Extrapolation is obviously more challenging because clients have to actually run the entire game engine - not just run a rendering engine.
6,
I could see that the primary appealing aspect of Colyseus is that it's cross-platform, ie it looks like it has a lot of client libraries for different platforms. That's probably nice, but, I gotta say, it's hard to beat isomorphic js running Cannon/P2 on server & client haha it's just so buttery.
PS
The video audio is rough indeed. Good talk though!
PPS
Any of you guys play Rocket League btw? I'm diamond 1 in 3s & gold 3 in 1s haha
from lance.
Also, is bendingIncrements a multiplier on the bending properties?
Ie, would
localObjBending=0.2, bendingIncrements = 1
be the same as
localObjBending=1, bendingIncrements = 5
Thanks again!
from lance.
Related Issues (20)
- Add additional exports HOT 1
- Idk what's wrong with starting HOT 6
- add more games to gallery on home page
- Hardcoded Host in NetworkMonitor HOT 4
- playerId vs id: update docs HOT 1
- applySync missing in frameSync strategy
- Player ID is always autogenerated HOT 1
- The ClientEngine.start() promise is not resolved HOT 2
- Script minification causes name mismatch in Serializer.registerClass HOT 2
- My First Game: Pong tutorial is missing imports
- Serializer causes a crash if netScheme has a string HOT 2
- entity component system HOT 1
- Spaaace demo no longer works HOT 1
- Is lance being actively developed? HOT 2
- Add missing debug JSDoc annotations to ServerEngine constructor
- What is the purpose of the Serializer? HOT 1
- Is this project still active? HOT 1
- Make "from scratch" tutorials
- Teleporting
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lance.