News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

Stunts Multiplayer Client and Server for DOSBox

Started by kurtis2221, September 19, 2022, 08:06:48 PM

Previous topic - Next topic

kurtis2221

This just randomly occurred, but I thought of making a multiplayer for this game. Before this I tried to remake the game in Unity in 2014, but failed to make the car drive normally. Didn't know before that DOSBox has a static pointer for games. When i found out, it was about 3-4 hours of work to make it work with Stunts 1.0 with the old loader.

This first video was a quick sample that I made in the middle of the night:
https://www.youtube.com/watch?v=aWIaWzsFAz8

Some days later I could test it with a friend:
https://www.youtube.com/watch?v=AGI4K1B_OQ8

It's just a simple multiplayer with Sockets, uses TCP. The server needs port 7777 open.
The player data is transferred to the other player's opponent data.
You need to manually set the other player's car and the track.
Also don't start the race simulatesonly or you will spawn into each other.
One player needs to start the race before the other and get out of the way.
If you do get stuck you can always use the truck animation to fix it.
The damaged car status is not synced, but everything else should be working.
128 bytes are transferred every 0.04 second (25 FPS).
Only works with DOSBox 0.74-3, if you know the pointer for other versions, you can change it in the program.

Download: https://www.mediafire.com/file/8w42d6xoscypmgs/stuntsmp11.zip/file
or itch.io: https://kurtis2222.itch.io/stunts-multiplayer
Instructions are in the readme files.

You can find the project source here: https://github.com/kurtis2222/stuntsmp
You can also find the supported versions there.


If someone is interested this is the Unity 3D version:
https://www.youtube.com/watch?v=BKKUHBh2dBc
This is the last state of that project, I gave up on it:
https://youtu.be/-OYyTEnO0BQ?t=254

Daniel3D

You make it sound simple but it's not so trivial. We can edit the source code and maybe this opens up a way to make an multi-player version.

It is very cleverly done, i didn't think it would be possible without heavy rewriting of the code..
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts or 4D Sports Driving.

Cas

If this is just copying the remote data from the player into the local opponent, then with a couple of touches to Stunts code, it should be possible to make it so you're not required to wait for the other one to move :)
Earth is my country. Science is my religion.