Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Join net game question

Author
Message
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 26th Oct 2018 19:21
The command is join net game player number,playername.

The problem with this command is it only supports 255 players and maybe I have a thousand game clients what happens if two players with the same number try to join a game. Because I'd have to go to 255 4 times when distributing a client to reach a thousand.

Is it possible to get the server to assighn player number or get avaialbe player numbers magically from serverbefore the player is actually connected to the game so the client can set their num to one that is available
A child's dream never dies.





Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 26th Oct 2018 23:29
I may be wrong here, but I think most large-scale multiplayer games divide everything into lobbies, limited to the maximum number of players that will appear in a given session. Therefore you may have to run multiple instances of your hosting program if you are the host server, which would actually only require packet sending, unless you yourself are playing in one of the lobbies, which would only require one instance of the game along with all the the other packet distribution duties. Yikes! That was a mouthful.

I may be way off here. I have only programmed for multiplayer before (a sweet little tank game) but I have never launched it as such.
Send your parents to noisy sprite demo hell... enter the D-Zone
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 26th Oct 2018 23:57
I actually came to a similar conclusion just a few minutes ago about having to run multiple servers assigning players a temporary login number and shuffling them to a server. I have one more question since I will have multiple servers they will have to communicate with each other can my server also join the game of another server so it can receive information or do I have to use a client in between the two
A child's dream never dies.





James H
17
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 27th Oct 2018 00:15
I could also be wrong but I seem to recall the multiplayer commands being Direct Play....which I am fairly sure is quite slow which is why I think plugins where written such as Multisync which is free and very fast iirc or DarkNet(paid). FPSC uses the core commands and I could have sworn the number of players was really low, something like 8 players only and would have taken a modded version to go higher. I don't know with regards to the other question BUT because MP core commands are real easy to set up you can try doing it all on 1 PC as a test, it should not be an issue for test purposes as I used to have a few instances running - to simply check how much system resources would be used out of curiosity - all connected through 127.0.0.1 I think it was. It was laggy as might be expected so I ran Multisyncs demo and the same number of instances had far far less draw on resources. At least thats how I remember it lol!
Win 7 Pro 64 bit SP1, AMD A4-5300 APU 3.4GHz, 8GB DDR3, NVidia GeForce GTX 750 1GB GDDR5, ASUS A55BM-E
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 27th Oct 2018 16:56
Multisync uses tcp it should be sufficient for most purposes, but the way to go is really the socket commands in matrix1. These give you access to both tcp and udp, and they will give you good general socket networking experience that can be applied to pretty much any language.
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 28th Oct 2018 00:14

And don't forget to add a little manual lag from the user-side input... it gives the networks more time to sync!
Send your parents to noisy sprite demo hell... enter the D-Zone
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 28th Oct 2018 05:24
thanks guys

A child's dream never dies.





Login to post a reply

Server time is: 2024-04-24 14:24:08
Your offset time is: 2024-04-24 14:24:08