-
Notifications
You must be signed in to change notification settings - Fork 1
Development
scscgit edited this page Sep 7, 2020
·
5 revisions
TODO:
- Guideline for the project structure
- Guideline for creating Prefabs and how to document their usage
- Guideline for providing public inspector-editable interfaces
- Guideline for code style
- We want to create a competitive game environment (reward players without lags and not the opposite, avoid the ability to cheat).
- Players who have a large latency (spike) should be able to play with a zero local latency as long as there's no conflict, interpolating the changes in a physically possible manner, so that their actions don't look impossible from the view of other players.
-
https://youtu.be/Z9X4lysFr64?t=3289
- Q: In situations where you have two objects owned by different players, such as cars interacting with each other, they both collide with each other's version in the past.
- A: There's no solution to that problem. (You need to minimize the latency as much as possible.)
- Valve's Source game engine solution
- Our priority is the option to customize and edit server-sided logic (using open-source framework) while being able to scale (using any cloud provider) without any limit or additional costs.
- Our current choice is the Mirror framework, which is a continuation of UNet.
- Here are some Reddit comments regarding hosting authoritative server.
- Hosting Mirror on multiple servers may require running separate instances and manually handling forwarding to their IPs at the level of matchmaking, which has no official support and is just a workaround developers need to do.
- Epic Online Services (docs) can also be considered as an alternative, and we need to research the feasibility of upgrade by comparing the differences, as it also supports Unity and provides unlimited free hosting with no catch (saving us the troubles we'll have with Mirror hosting).
- Current alternatives that support DOTS are Unity's experimental NetCode and vis2k's DOTSNET, which isn't compatible with open-source projects and costs $100/user without any multi-entity license.
Research and compare backend persistence and account management solutions, along with options of their scalable deployment
- SQLite was being researched, but there were some ORM limitations and library stability issues, plus this may not easily scale in the future.
- Google SSO options were being researched, but there could be issues with libraries to support cross-platform usage, e.g. both Windows and Android.
- Spring Boot or ASP.NET Core will be probably chosen, hosted as a separate server, Dockerized, etc.
- Need to consider SQL vs NoSQL; options like PostgreSQL are probably possible to scale (cluster), but some Active Directory may be more suitable for accounts.
Extend Mirror's low-level Transport middleware to enable simulating a fake latency for testing purposes
- We need to be able to control latency both programmatically and via inspector, and I assume that Transports are the place to do it.
- Mirror Transport docs are at https://github.com/vis2k/Mirror/blob/master/doc/Transports/index.md and sources are at https://github.com/vis2k/Mirror/tree/master/Assets/Mirror/Runtime/Transport
- This should be preferably submitted as a contribution (pull request) towards Mirror once implemented.
- There is also a popular open-source C app clumsy https://jagt.github.io/clumsy/ doing this on OS level (a compiled binary has an implicit security risk)