Stunts Forum

Stunts - the Game => Stunts Related Programs => Topic started by: kurtis2221 on September 19, 2022, 08:06:48 PM

Title: Stunts Multiplayer Client and Server for DOSBox
Post by: kurtis2221 on September 19, 2022, 08:06:48 PM
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://kurtis2221.itch.io/stunts-multiplayer
Instructions are in the readme files.

You can find the project source here: https://github.com/kurtis2221/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
Title: Re: Stunts Multiplayer Client and Server for DOSBox
Post by: Daniel3D on September 19, 2022, 09:39:29 PM
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..
Title: Re: Stunts Multiplayer Client and Server for DOSBox
Post by: Cas on September 27, 2022, 12:05:02 AM
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 :)
Title: Re: Stunts Multiplayer Client and Server for DOSBox
Post by: Oneofthe8devilz on January 21, 2024, 06:50:45 PM
Has anyone considered establishing a "multiplayer division" for Stunts where people build tracks and race each other in Duel Multiplayer ?
Title: Re: Stunts Multiplayer Client and Server for DOSBox
Post by: Daniel3D on January 21, 2024, 07:53:59 PM
We have. But this setup is difficult to execute and run from seperate locations. It's also far from perfect because the timer doesn't function as intended because you have to make room and wait for the second player while it's running..

As far as modifications go. There are many ideas that are possible that have greater interest and impact than this. So it will take time for this one to become a thing..