Q&A with the developers of rFactor – Pete
By John Bayley – Product Development…
Unlike single player games, games with robust multiplayer capabilities often last and grow well beyond their shelf life. With that in mind I had some questions for Pete Knepley about the multiplayer aspect of rFactor.
I’m told you trashed the way Matchmaking was done in the past and decided to start over. Can you give some reasons why and what the experience was like?
Previously we used a commercial internet matchmaking service. However to get control over the process and be in a position to support it long term, we decided to build one.
rFactor is built to last. People still play SCGT and F1C, they will still be playing rFactor for years, I want them to be able to have internet matchmaking forever. The matchmaker used by rFactor can be easily changed in the configuration files. This allows for the opportunity to move, enhance or possibly duplicate the match matching service. ISI will be running a matchmaker when the game is released just like we did for the MP test.
My solution to matchmaking was to write a lightweight application that could be easily deployed. It runs the server listings and friends listings with minimal processor, memory and bandwidth usage. It also uses minimal platform dependant code so that it can be simply ported to future machines. The development of this was not easy for me. In my previous game programming experiences, I did a little bit of socket programming, but this project was a bit different. This was a hardcore multithreaded server app that is the cornerstone to internet play for possibly thousands of players at once. It took several prototypes and a couple full rewrites to get it production quality.
You have had a chance to see progress of the multiplayer code. What is your assessment of it?
The multiplayer code is very good in my opinion. It is the vanilla client and server model that has been around for years, but I think it is the best way to run racing games and allows for server-side processing protections. rFactor does a lot of verifications to ensure that the racing is fair that would not be as trustable with a different model.
The new throttling code provides good scalability. You receive the most information about the cars that are close to you so door rubbing is possible, while you can still have 40+ cars on the track.
The code also now allows for banning users. The ban list is an xml file that can be shared among server admins to keep the chronic wreckers from bothering their users.
My favorite feature is the join lag elimination. Since rFactor lets you join a game while people are driving, there is a potential for a new car loading to slow down your computer. In rFactor, temporary assets are loaded from a cache when players join and you are out racing, but when you go back to the pits, the full versions are loaded. Your turns will not be disturbed at all and you barely notice anyone joining and leaving.
You added IRC and a buddy list. How does this work?
I added support for using Internet Relay Chat (IRC) into the game lobby. IRC has been around basically since the internet as we know it existed. It has been refined and expanded since then and provides a feature-rich place to meet and discuss in realtime. The IRC client inside rFactor right now defaults to join #rFactor on EFnet, but can be set to join any network and any channel the player wants. The client supports most of the features of the popular mIRC client for windows, although it is constrained to one channel at a time. I think players will find that IRC is a good tool to communicate with other sim racers while having a somewhat controlled environment. IRC allows for instant channel kicks and bans for those who chose to try to ruin others good times.
The buddy list is another cool thing I implemented. When turned on, a player can tell the matchmaker which server they are currently racing on. Then their friends can query the matchmaker with a list of players to check which ones are online and which servers they are racing on. Its completely voluntary, but I think it will greatly reduce the amount of time you waste searching the server browser and get you on a server with your racing friends much faster.
Voice over IP. How important is this?
The voice chat in rFactor should be very useful. It will keep you from having to pull over just to type a quick message to a friend. Since you don’t have to read any text, it will also keep your eyes on the road at all times. Voice chat is a relatively new and complicated feature so it still has a few quirks, but the system should be stable enough for inclusion with the first release.
There is code in place for transferring files around from within the game. How does this work and where is it at right now?
There is code that allows for in-game missing asset downloading. I’ve been able to download missing tracks, car skins, cars and helmets while I’m playing LAN games.
It will probably not be in the first release since all the details have not been worked out with regards to mods and updates. It also enlarges the attack surface for downloading of unwanted files or the transfer of files that you did not wish to transfer.
The file transfer code that will be included in rFactor is HTTP download code. This code allows us to interface with websites and download updates from them. The server browser can now be notified of updates to rFactor by means of rFactor.net. It will also let us make dynamic user interface components with content from the internet.
What was the purpose of the Multiplayer demo that was released earlier this year?
The MP demo was released so that we could stress test our new multiplayer layer and the new matchmaker.
The stress test immediately showed oversights in the design of the matchmaker. I was able to create a quick fix just to the matchmaker dll for rFactor and upload it to retest it. The matchmaker itself also had a bug or two that I was able to remedy. So after a couple small fixes, the matchmaker proved itself a worthy replacement.
We were also able to analyze a lot of traffic from the new network layer. This helped us optimize it and reduce the amount of bandwidth needed to play the game.