Multiplayer

From BVEStation Wiki
Jump to: navigation, search

OpenBVE Multiplayer Extension was written by ipaclansite, and adds a multiplayer feature to the game. The program is open source and can be freely downloaded at BVEStation and/or github. The Multiplayer Extension works by taking control of the game's pretrain and AI feature.

History

With the lack of multiplayer train simulators in the market at the time, and the Open Source nature of OpenBVE, there was an interest in a multiplayer feature for OpenBVE. It first started out as an April Fools joke on BVEStation, with OpenBVE's option menu showing a new option for multiplayer. It was also requested on the official OpenBVE Forums (no longer online) as a permanent feature for OpenBVE, but was ultimately rejected by michelle, the former head developer of OpenBVE. ipaclansite would decide to add the multiplayer feature himself.

Versions

Currently there are two versions written for the game, the original version and a current version, both are internally similar, but rely on a different server model.

Original Version

The original version of OpenBVE Multiplayer Classic was written by taking snippet code from a chat program. OpenBVE would capture the distance information of the train ahead of the player from the server and would provide this information for all users. There was also a psuedo-signalling system, that was external, with a separate form. This version would eventually have limited support for actually utilizing the pretrain to display other users.

The original version was very buggy due to the use of code snippet taken from another website, and was built mainly as a proof of concept only. This version allows players to connect to a single route on a single individual server.

Second Version

The current version of OpenBVE Multiplayer Codename Newtown was written using a centralized database system, which acts as the server. OpenBVE would capture the distance information from a specific table in a MySQL database, and would force the pretrain/AI train to move into this specified position. Like the original version, this only allowed the player to view a single instance of the player ahead of them.

This version is more stable, due to the large amount of newly written code. This version also allows for clients to connect to a single central server, with multiple routes, and allows for MMO elements. A mapping system, and a signaling system was also written to supplement this multiplayer version, largely feasible due to the use of a database system.

This version unfortunately suffers from limited uptime of the server, and requires multiple users connected at once in order to get a good experience.

Current

This version was completely, and rewritten, to provide a more stable server/client model. This version is available for download on github along with the source code. [1] The server was written in Python, which simply acts as a TCP Server. The client code is embedded loosely within OpenBVE. It too utilizes the pretrain to display other users, which allows for the in-game signaling system to be used with it. This version also only supports single line routes, as this is a BVE limitation, and not a multiplayer one. Ordering is also important, in that users should connect in order, and on a delay so that their trains do not overlap or jump each other.

Other Versions

Boss of Games wrote a fork of the original OpenBVE Multiplayer, adding a signaling system to that version based on the client/server model. His version was never released to the BVE community.

A European version of a multiplayer OpenBVE was created, it was suggested that it connected teamspeak into the game, as opposed to it being an actual multiplayer game. Not much is known about this version.

Pseudo-Multiplayer

Traditionally multiplayer is done through the use of BVEStation's Chatroom, players would simply broadcast their position after every few stops.

In the past, traditional multiplayer makes use of BVEStation's Teamspeak Server, as players speak to broadcast their positions, this form is the most popular form of pseudo-multiplayer to date, due to its ease of use. Users do not appear to want to use a physical multiplayer system, as it is either too complicated, unstable or incompatible or too limited for their needs, and will resort to this method.

Because BVEStation no longer runs a Teamspeak Server, other communities have sought to replace this service, and run their own multiplayer events.