BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

BVE Multiplayer Addon

3 posters

Go down

BVE Multiplayer Addon  Empty BVE Multiplayer Addon

Post by Trainkidkris Fri Aug 04, 2023 10:59 pm

Hello everyone on BVE Worldwide. I wanted to show some progress that was made on a project that was built by our group OBND. The project is called BVE Multiplayer. It was long requested item by NYC community and other BVE players. Over across the seas BVE players in the USA in the state of NY (New York) primarily do a lot of roleplay runs where we simulate operations of the New York City subway by voice communications such as Discords or Teamspeak 3. However over the years the request for a multiplayer increase and things get boring after not seeing anyone in front or anytype of in game control where you can see players. We needed another way to bring fun back into openBVE. So our team came up with the idea back in 2014 for a multiplayer and it has become a very big reality. 

Just a little backstory: 

Our BVE Multiplayer Mod was a project that we envisioned for BVE players to finally enjoy with friends. Creating new memories in the form of actually seeing players, controlling signals and train movement all from the comfort of your home. From 2015 to today we originally started this project off a little rocky but we stuck with it and made it work! Here' some progress we made with the project. Any questions feel free to ask. 


Trainkidkris

Posts : 9
Join date : 2016-11-17
Age : 25
Location : USA

http://www.openbvenews.com

Back to top Go down

BVE Multiplayer Addon  Empty Re: BVE Multiplayer Addon

Post by Lord_Z01 Tue Aug 08, 2023 3:14 am

Amazing progress!!! hope to see this modification released so I can play with my friends. Amazing job guys!!!

Lord_Z01

Posts : 12
Join date : 2023-07-24

Back to top Go down

BVE Multiplayer Addon  Empty Re: BVE Multiplayer Addon

Post by Trainkidkris Fri Aug 11, 2023 8:04 am

https://drive.google.com/drive/u/0/folders/1nsimiZyDdGSHCd2B1Ream8TQp374rw6E

Hey thanks here the test files if your interested.

Trainkidkris

Posts : 9
Join date : 2016-11-17
Age : 25
Location : USA

http://www.openbvenews.com

Back to top Go down

BVE Multiplayer Addon  Empty Re: BVE Multiplayer Addon

Post by Lord_Z01 Fri Aug 11, 2023 7:49 pm

Thanks bro!!! I will try to test it out with a friend later

Lord_Z01

Posts : 12
Join date : 2023-07-24

Back to top Go down

BVE Multiplayer Addon  Empty Re: BVE Multiplayer Addon

Post by leezer3 Sat Aug 19, 2023 11:11 am

I think you're the second group to actually produce a working 'multiplayer' mod.
From a very brief skim, you're actually doing things quite sensibly- Congratulations Smile


The other tried using a train plugin, but that was unstable as anything and they had absolutely no concept of threading or why launching an embedded web-browser from a train plugin was a bad idea.

If you wish to contribute this back to the main program or have anything sensible we can do to help, I'd be happy to take a closer look at the source code, although I don't want to guarantee taking it as-is.
There are some things I think you should be considering, such as checksumming your packets (they're just base64 encoded at the minute), but overall it'd be really good to have someone else contributing a meaningful feature.

leezer3

Posts : 1961
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

BVE Multiplayer Addon  Empty Re: BVE Multiplayer Addon

Post by Trainkidkris Mon Aug 21, 2023 3:26 am

Heres a picture of the dispatchers board and some more videos of what we did. Im going to explain some more in another reply. 

https://www.youtube.com/watch?v=pfvCSwUDeY4&ab_channel=OpenBVENewsandDevelopment - Biggest update we had before in 2022

Trainkidkris

Posts : 9
Join date : 2016-11-17
Age : 25
Location : USA

http://www.openbvenews.com

Back to top Go down

BVE Multiplayer Addon  Empty Re: BVE Multiplayer Addon

Post by Trainkidkris Mon Aug 21, 2023 4:12 am

So I want to say "Thank You" for the kind words Leezer! Apricated it greatly. So when creating the multiplayer my idea was to start completely from scratch because of the lack of support for the previous BVE multiplayer which was a complete flop. Im not going to blame them they didnt understand how multiplayer games work and support was really limited for them in the development world.

When I announced we were starting multiplayer development for BVE in 2014. I mentioned to my team and others that I did not want to build off the previous anything that had the word "BVE multiplayer" because it was just useless code. So we start fresh and created a system that utilized our backends so it became easier to work with and manage clients in the future. This payed of more in the long run as we now have an integrated login system using the our websites cpanel for MySQL database for the players user names and credentials, we still have more work on the site to do for multiplayer control and access for players in the future. We had to rewrite the code for multiplayer server more than 3 times due to developer errors which had severely large issues causing the game not to work properly and extensive delays.

One of the issues encountered was, the game written by another developer contracted had been poorly written that the entire game world was being transmitted over the network causing instability for other players. This was a major headache for us in 2017 and we didnt had much to show for it.

2018-19 development on the program was very slow and inconstant. This was the most headaches given as the server re writes were needed and the developer on our team wasn't motivated to get it done. No major game work was done in the 2 years which affected us with a big delay.

In 2020 the program went into hiatus because of COVID and our previous team member contracted to work with us gave us the complete run around. At the end of 2020 our team had a big meeting as he was highly underperforming we terminated him in Q1 2021 once we had found another team working with us. 

2021: We contracted back out the program to a different team and had them also correct the server issues which had multiple problems and hidden bugs from the previous rewrites and they managed to get the game partially up and running. This was the big accomplishment in 2021 as we began beta testing with different people on the weekends. This was the celebration video for 2021: https://www.youtube.com/watch?v=Boi-4PGlrIo&t=112s&ab_channel=OpenBVENewsandDevelopment . Unfortunately, we cut ties with this team due to quality of work not meeting our standards and them not being able to fix the asynchronous issue where trains would freeze when entering the game and crash. Other issues were re-occurring with frequent time being spent fixing previous issues that were supposed to be fixed. We terminated the contract from the previous team and move into another team in 2022.  

In Sept 2022 we had gotten BVE multiplayer 85% stabilized by the current team we are working with. The problem at the time was the more trains we added the more the performance dropped in BVE (We knew this was coming Razz) The current team were working with knows openGL which greatly improved the projects movement. They corrected most of the servers issues and most of the bugs hidden within the server we are now able to run with 10 people but again this was when we were running 1.4.3 (which is what the program was written on at the time we started the multiplayer project) 

As for August 2023: We have successfully moved the multiplayer program into openBVE 1.7+ Smile . Our current goal for the multiplayer migration was to ensure that the game was able to handle more than 15-20+ players while being in the same server at the same time. When testing the MP program we encountered significant improvements to FPS but we have only been able to reach 10 players because people are not easy to work with as they dont cooperate. Performance was good within that time but we have some issues on our end that needs to be corrected before we can move onto the public release which we are desperately trying to do. Our development team is in current process of enabling a feature called multi-threading. We are going to push to the GitHub at some point when its working. This feature will be requested to be pushed into the main branch at a later date unfortunately we have somethings to corrections on our end before we send it out. As discussed earlier in 2021 for the multiplayer side of the source code we will not be publicly releasing this as it can cause issues where someone can affect the game and the backend of our systems. There's a lot of resources that's being running to keep the program working we rather not give access so people can destroy it and cause us major headaches. The modifications and upgrades we plan on doing will be publicly released to make it easier to run BVE in single player mode for players etc. 


For contributing this program to the main program we would like that at a later time once we finalize the project and everything is smoothen out. As for helping I wanted to point out that the re-write of the BVE program helped my current team save time needed to reimplement the features we had from 1.4.3 into 1.7. There's alot of good comments in the code which is easy to identify most parts! 

I think we do have check summing but the game definitely does parse the packets to the server and the server then send to everyone. I would have to look at how the structure is now as we did migrate and not everything is where is needs to be but I will be glad to give more information within the week.

Trainkidkris

Posts : 9
Join date : 2016-11-17
Age : 25
Location : USA

http://www.openbvenews.com

Back to top Go down

BVE Multiplayer Addon  Empty Re: BVE Multiplayer Addon

Post by leezer3 Mon Aug 21, 2023 9:19 pm

I think you're making a mistake in not releasing the source publically, but that's your call.
You'll get a much wider set of people taking an interest if they can host and modify their own servers.

Checksums:
This is actually part and parcel of getting to grips with your problem of someone affecting the game.
If someone has a malicious client (or server), currently they can send what they like to the server, and you're not checksumming or validating this at all, other than giving specific versions of trains to use.

Some basic security thoughts:
1. Timestamp all packets with the in-game time from the player / server, depending on transmission direction. You should from that be able to work out an appropriate delta for the train speed at either end. Kick any clients with an implausible speed as a result of this.
2. Hash the train.dat file, and transmit this as part of the client packet. This means you'll have to maintain a playable train list on the server, but stops most trivial modifications on the player end.
3. Hash the routefile, and again transmit this as part of the client packet. This may be a little complex with $Include files.
3. The client and server should exchange a secret (good random number basically) on login. Use these to encrypt packets between the client / server, *not* plain data.

Other bits:
Disabling the transparency fix and hacks as per your instructions is pointless.

I think you've forgotten that objects / train exteriors are totally irrelevant for multiplayer in a game of this type.
It'd be much easier in some ways pushing the train.dat for any trains from the server (to get the correct performance curves) and loading whatever objects the player has in the trainfolder or a default if not found.
(The default train not found exterior really needs improving....)

At the end of the day, it's only the routefile and train performance that make any difference at all, you can't really physically interact / interfere with other players in a game like this.

leezer3

Posts : 1961
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

BVE Multiplayer Addon  Empty Re: BVE Multiplayer Addon

Post by Trainkidkris Tue Aug 22, 2023 1:32 pm

I dont want to dwell too much on this part of the topic for releasing the source but its something we said before but haven't brought it up to much. But I'm going speak on it: This may cause some negative feedback from many but nothing is set in stone YET do not start arguing with us please Laughing . Respectful discussions are welcomed and opinions

When we started announcing the development of BVE Multiplayer the project in 2014-2018ish there's major backlash from many people who didnt understand why BVE was getting a multiplayer addon Mad  and why it was needed. From the time BVE had a so called multiplayer to now we had nothing still. I'm pretty sure you weren't really interested in creating a multiplayer at the time either because BVE had alot of issues. 
As most of us know in the openBVE Community nobody is ever satisfied, nor happy with some or most of the changes made (it is what it is you will never make everyone in the world happy drunken ). As also noted in the post we are from the NYC region of the US. And in our community we did a lot of roleplay operations on the weekend and holidays etc where we would simulate train operations as per the subway system with many people on a voice server, using a subway map, google sheets, etc to simulate a player infront of us. Doing these Roleplay runs were cool at the time but then things would go wrong etc etc. The repetitive issues occurring over and over again where players not following signals, loading the wrong route became a headache for us all. The simulation itself needed a change because it was boring at times playing by yourself. Nobody wanted to created a multiplayer, not alot of people could create a multiplayer and nobody wanted to take on the cost or burden of maintain the multiplayer.

The choices were limited and most people were giving up on BVE, or move to another simulation, and quitting altogether. We had some people funding us in the beginning with a couple of dollars to help the project take off which make some progress. But the cost of development significantly increased over the years, beyond what little donations we received in the beginning, due to the unknown issues we encountered in development. Nobody wanted to donate because they didnt believe it was possible to add a multiplayer in a "broken game" or a "game that nobody cares about any more". Now this may not be cool for everyone but it was noted that this branch of the project was made for those interested in playing multiplayer with friends or with other community groups. If anyone was not "interested" in this part of openBVE they dont have to pay and continue playing single player as necessary. You can join any group or any open server available to play in the program. The original intension of the multiplayer was to be a player funded program because it protects the hard work done, keep our systems safe from user modification and malicious intent and keeps players coming back for more as they receive updates to the program. [Not set in stone yet] Our team has a physical dell server on site that we will be spinning up that allows players to purchase a server from us and play with their friends, we do know that a lot of players in our community and others as well will have issues creating their own servers due many of the problems that can occur/living situation and so forth. So we decided that to make it easier for everyone and just be the provider itself hosting the servers because it will eliminate most of the headaches. This is the major reason why we intended not to push the source to be open at this time. This is also part of why didnt want to bring it up because it may not be something your a fan of or interested in because of the paid service part to keep it running and maintained. We may incorporate a system to allow players to input their own server at a later date [TBA]. 


As for the main part of the conversation yes I think we do have something of a packet checking system in the game where it detect packets that are not apart of it and flags it for being "illegally sent". However I do want to remind you that we started rewriting most of the multiplayer features into 1.9 from 1.4.3 as this was our original platform where multiplayer was built upon. During the public testing we did notice a lot of players modifying the files and assets which caused issues to other players.

For #1 we will not be kicking players out of the server because we are planning to implement the CDN network which will check before any client is loaded into the game world they have the correct assets needed. This will this to prevent modification to the train.dat files as it will override the assets and provide what the client is missing as they are in the lobby waiting to be loaded in. The game will not allow the dispatchers to load a player if they are not finished with the automatic installation of the files.

As for #2 we will consider this as well because it ties in with #1. Our plans was to prevent modification when playing BVE to the assets files when the program is opened and check the train files to ensure that they are the correct sizes and overwrite them if necessary. But we will definitely bring this up to our team in a meeting! 

#3: I was thinking of this at some point to increase the security have a handshake to ensure the communication is absolute. 

As per your other parts of disabling "Transparency" we are having some issues where the game crashes for other players so as a temp fix we asked them to disable this feature and it seems to work. Our team may have done something to it during the multi-threading addon they have implemented so this is something we are looking into. 

Another Note: 
Train objects may not matter to you but it was something alot of players was mentioning to me that matters to a lot the. Players want to have a better feel for the simulation as they never did before. The ability to see another players rather than the AI open and close doors, change their signs, operate at a high rate of speed while in the F3/F4 camera view while blowing the horn is a new experience that players will feel like its a simulation with real people vs the same thing they see every time they play with TFO's and AI's. We may not be able to interact with the other players train directly but its a small step in a new direction. Currently the multiplayer does offer 2 modes. Operators and Dispatchers. On the dispatchers board the dispatcher can affect the signals (blocks) in the game or turn them off and allow another train into the block. The signals automatically enforces players to come to a halt if they violate ,.section 0 at anytime as well.

Trainkidkris

Posts : 9
Join date : 2016-11-17
Age : 25
Location : USA

http://www.openbvenews.com

Back to top Go down

BVE Multiplayer Addon  Empty Re: BVE Multiplayer Addon

Post by Trainkidkris Wed Aug 23, 2023 8:53 am

So here's the part of the updates we did to the multiplayer and what we have instore for the future. 

We have added 2 clients for players to chose from when entering a server which was mentioned earlier in the previous comments. Players able to chose from being a "Dispatcher" or "Operator". The Dispatchers portion of the multiplayer is basically known as the game admins. As a dispatcher you are able to control all of the signals in the game [unless a development error occurred in the route file], get real time player speeds in kph and mph, real-time location of the trains, ability to load players and remove them from a session, jump players upon request or if wanted to, ability to reset players if they violate signals by entering the block when another train is in it (Forced Emergency Stop System) players cant move the train unless a reset was allowed by the dispatcher, Signal Positions in the game world, and in game speed shown.  

As for right now the dispatchers board wasn't implemented yet on 1.7+ of BVE. Our goals for the dispatchers system would be the following 

Dispatchers Board:

[1]Upgrade the UI of the board to make it look more appealing 
[2]Add more features for dispatchers including a server terminal box which will time stamp and alert dispatchers of players activity such as: Underrun/OverShoot/Bypass stations or locations in the game indicate they are supposed to stop at. Report players opening doors while the train is in motion and other features.  
[3]Communication system: Chat system for dispatchers and operators for those who can't speak or use voice communication platforms, saftey features such as auto spam and individual dispatcher muting to prevent harassment's and annoyance 
[4] Speed Control Enforcement: Allows the dispatcher to setup speed restrictions on the board by entering the start and end points of the speed limit zone. We will be looking into affecting ATC at some point as some of our routes have CBTC so we do mimic the operations of it with ATC. [This item is a later option not on the list as a priority] 

Operators:


[1] Correct issues found on our end where the game has issues for players or crashes for select reasons: Player reported of Flickering on the screen at random times when playing the multiplayer, modifying game files (routes/trains) needs to be checked and flagged if modified, files needs to be automatically searched for in sub folders wherever located in the root folders of BVE instead of keeping it in the default location, ATS issues-plugins are giving us some issues we need to investigate why plugins are causing the game to error out, error log reports an issue with camerarestoresettings which is giving players an error when they are using the F3 camera while the game is in motion, etc. We have some bugs found on our end that needs to be corrected so this is the priority first before anything else 

[2] Correct Train Sounds: Allow the trains to play sounds as they move, with an option to disable the horn inside of the settings menu. 
[3] Upgrade Route Information Box: The F9 track viewer box can be used by players to see where trains are located within the world. They will be able to see who is infront or behind them and the speed the other players are traveling in real time. 
[4] Implement chat system for operator to dispatcher 
[5] Implement the CDN network system 



[Photos]
https://imgur.com/a/oi1E7fs

Trainkidkris

Posts : 9
Join date : 2016-11-17
Age : 25
Location : USA

http://www.openbvenews.com

Back to top Go down

BVE Multiplayer Addon  Empty Re: BVE Multiplayer Addon

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum