Would anyone be open to give me a "boost" on how the Server works for OpenRA? Perhaps we could schedule a live chat or something... I've been reading the code but it hasn't "clicked" yet...
Its just like a client. It connects the people. It doesn't calculate or have any extra powers than a player. It syncs. It doesn't dictate or calculate.
There's an OpenRA Discord as well as an IRC channel (irc://chat.freenode.net/openra) were you can talk with the devs. They are responding faster via these ways as well, afaik. :)
Does anyone believe that we should carve out a OpenRA.Common to encapsule pieces of code that are shared by both the server and the client?
OpenRA.Game is already that.
I don't think you quite got what I meant... I meant that the Server does not need "sound", the server doesn't need "OpenGL", graphics, rendering or other stuff that are relevant only to the client... but they are being loaded anyway...
Another point of view: if someone (I for one) wishes to act/code only on the "server-side" it's actually really hard to determine what is "server-side" code and what is client side code!
Sound and OpenGL aren't in OpenRA.Game either! Those implementations live in the platform dll. The server code relies on many core parts of the game code in order to understand the game rules, and the client code relies on all of the server code in order to create local servers to play campaign and skirmish games.
The server code relies on many core parts of the game code in order to understand the game rules
Is that a actual fact or you took a "poetic license"? I thought that the server was supposed to be a bridge, reconciling and relaying "facts" (tank 123 move from position A to B) between clients...
client code relies on all of the server code in order to create local servers to play campaign and skirmish games
Wouldn't I be logical to spawn a new "server" process on the client and make the client connect to it instead?
but again, take all of these with a grain of salt, cause I have ZERO experience with game design/implementation...
After a match has started it acts as an order relay, yes. Before the match starts it needs to know about the game rules so it can validate faction choices, bots, the crate/fog/starting cash etc options, and more.
Wouldn't I be logical to spawn a new "server" process on the client and make the client connect to it instead?
I'm growing quite fond of this idea, I think this is very clean approach! this way we can get a very clean cut between the server and the client! they would basically share POCOs!
The local network server would be more resilient because it would be independent from the client (would have its own memory set and GC for example). Also, a crash from the client wouldn't mean "Game Over" because the server process would still be running, allowing for the "host" to rejoin (in the future I know)...
A skirmish game would not be harmed because the loopback address is actually reliable...
The client is actually already always connecting to a server: https://github.com/OpenRA/OpenRA/blob/daa8c74c375d88999fa4671cecb45fe4222d2548/OpenRA.Game/Game.cs#L914-L931
but it's a "in process" server. What I am proposing is a dedicated server that would survive a client crash for example... one that would not be bound in the same memory set or share the same GC
https://medium.com/@treeform/dont-use-lockstep-in-rts-games-b40f3dd6fddb
Any thoughts?
A couple:
If someone produced a functional enough prototype to demonstrate that a client-server model could actually work well for OpenRA then that discussion would be worth having. I am extremely skeptical of articles that claim that established game programming techniques are obsolete... when they are building toys in javascript.
If you were to rewrite OpenRA from scratch today, would you consider this approach? (out of sheer curiosity)
Sure, to the extent of building a prototype to try and prove whether it could reasonably scale to the performance needed on the types of hardware/connections we would reasonably want to support 馃槈
it could reasonably scale to the performance needed on the types of hardware/connections we would reasonably want to support
you mean the server or the clients?
I mean the system as a whole: server, clients, the dodgy wifi between them, the mafia-like windows antivirus programs that inject themselves where not welcome, and all other things.
they are building toys in javascript.
You're building a toy in WindowsLang, but yeah, your's is defenitely cooler than theirs... :D
Most helpful comment
A couple:
If someone produced a functional enough prototype to demonstrate that a client-server model could actually work well for OpenRA then that discussion would be worth having. I am extremely skeptical of articles that claim that established game programming techniques are obsolete... when they are building toys in javascript.