Server & game dev

Source code and configurations

Discussion about the game and its default mods.
Post Reply
cmwDev
Posts: 2
Joined: Mon Mar 16, 2020 3:17 pm

Server & game dev

Post by cmwDev »

I have to start off with "I have never played any of these games", so pardon my ignorance. :)

I've been tasked with helping an online gaming site, in order to add OpenRA as a part of their game options. I have grabbed the latest source code, and have successfully compiled everything under Visual Studio 2017. I also installed the "normal" game installation, hoping there would also be a pre-buit server but there was none. So I am going to presume that I will have to grab the Linux source to compile for their machine. I am doing all of my development on a Windows 7 Pro system, using a VMWare workstation also running the same OS, in order to keep things isolated for development and testing.

According to what I have read in the FAQ side, the program is said to store things (logs and configs?) in the My Documents folders but I have found none of that. There is however, things being created and stored in the Users AppData Roaming folder.

The source compile created both the game and server EXE's in the root of the development folder, and of course just running those fails because I gather both the game and the server need parms passed into them. Our lobby client program will be modified so the table host can specify the game wanted, and a hidden password for that game instance will also be sent, to prevent any unwanted users from joining in. I am guessing that when the table host launches the game, it will then signal to our server to create a new instance of the OpenRA server with the required game and password. Also guessing that will take a few seconds to get turned on, so will the game server send back something like "ok, I am ready", or do we just wait 5-10 seconds before launching the other players into that game? Does the game server send some form of unique ID back so the users know what RA server to connect into? I am also going to presume that each instance of the RA server running, that there aren't any issues from the aspect of say... having 5 different game tables being able to play 5 different instances.

Does the RA game server have the ability for users to "join in progress", or do all of the users have to be in the game table when the game is launched?

Other than the FAQ, are there any specific doc files that I need to read to better understand what the required parms are? What are the minimum things that need to be passed in order to create a RA game server, and what will the game client need to be told, or possible additional parms they can use?

Sorry if this is out of line, like I said I have zero experience with this game system. I do have a ton of experience in both client and server coding for running the older style Microsoft Gaming Zone direct play games that people used to love to play.

Thanks kindly in advance for any assistance you can provide so that we can offer our game players a unique experience.

Gary :)

User avatar
Sleipnir
Posts: 878
Joined: Wed Apr 10, 2002 11:52 pm
Contact:

Re: Server & game dev

Post by Sleipnir »

cmwDev wrote:
Mon Mar 16, 2020 3:58 pm
According to what I have read in the FAQ side, the program is said to store things (logs and configs?) in the My Documents folders but I have found none of that. There is however, things being created and stored in the Users AppData Roaming folder.
Correct. The new default support directory location on Windows is under AppData, although Documents is still used for players with existing installs.
cmwDev wrote:
Mon Mar 16, 2020 3:58 pm
Does the RA game server have the ability for users to "join in progress", or do all of the users have to be in the game table when the game is launched?
No. All players must be in the lobby when the match starts.
cmwDev wrote:
Mon Mar 16, 2020 3:58 pm
Other than the FAQ, are there any specific doc files that I need to read to better understand what the required parms are? What are the minimum things that need to be passed in order to create a RA game server, and what will the game client need to be told, or possible additional parms they can use?
The server was not designed for being launched under the control of an external process, so the external configuration options are quite narrow. See https://github.com/OpenRA/OpenRA/blob/b ... dicated.sh for an example of how the settings that it does support can be initialized, and https://github.com/OpenRA/OpenRA/wiki/Settings#server for a list of all the options that the server supports.

We would be happy to accept pull requests that expand the server with whatever new features you need to make this work, but someone will need to first define exactly what is needed, and then someone will need to go about actually implementing the changes.

cmwDev
Posts: 2
Joined: Mon Mar 16, 2020 3:17 pm

Re: Server & game dev

Post by cmwDev »

Thanks kindly for the response. These are "nice to know" things, for sure. And makes it easier to code the client options. I was able to grab the source and configure my windows system with the required files to get the source to compile. A little tricky but I got it to work. I found out that the way I was trying to start the game and server from the source, was wrong. I have not yet tried to do it the "right" way since windows was just the test.

The game site runs Debian so I installed the latest linux OS into a VM running under vmware. I followed the wiki docs for compiling the code under linux, grabbed the required files, ran package manager to make sure everything was installed, and then went to run 'make dependencies' .. it started to go fine and then.. I got an error..

root@debian:~/Desktop/OpenRA-bleed# make dependencies
Fetching ICSharpCode.SharpZipLib from NuGet
Fetching MaxMind.Db from NuGet
Fetching NUnit from NuGet
Fetching NUnit.Console from NuGet
Fetching Open.Nat from NuGet
Fetching FuzzyLogicLibrary from NuGet.
Fetching SDL2-CS from GitHub.
make: *** [Makefile:171: cli-dependencies] Error 4
root@debian:~/Desktop/OpenRA-bleed#

Anyway, with that said.. I am used to launching the old MS Zone direct play games which would generally make an instance for direct play on the game hosts machine and let others join that instance. My biggest problem is understanding how the OpenRA server works. Running one instance of that isn't a problem of course, it is understanding how different groups of players connect in and are 'isolated' to their game. Also confusing is the password side. It seems that the RA server starts with a single password, which I am fine with. Being used to the Zone, game players could set a password on their own 'table' to keep others in the game lobby from joining in (which of course we can still do). Launching from the lobby table would have to send in the server password, regardless of whatever the players table is set for.

So much is different, and I am trying to wrap my head around it all. Clearly being able to get the code to compile and run is a first step to understanding how it all works.

Appreciate the assistance...

Gary

Post Reply