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 Discussion / Multiplayer Tutorial

Author
Message
Manticore Night
21
Years of Service
User Offline
Joined: 23rd Oct 2003
Location: Ouinnipeg
Posted: 8th May 2005 12:19
Hi, I'm new to multiplayer, and I am trying to make one of my games multiplayer. And..well....I suck at it. Could anyone point me to a tutorial, or give me advice on how to connect two computers(or multiple if possible), then exchange data and such. Please only put help, not "blah, blah, blah , u suck". Because if you do, I will find you and ripout your eyes . Thanks in advance for your help .

It's amazing how much TV has raised us. (Bart Simpson)
waffle
22
Years of Service
User Offline
Joined: 9th Sep 2002
Location: Western USA
Posted: 8th May 2005 17:26
http://home.comcast.net/~norman.perry/TutWaffle.zip

If you look closely, this is the monster hunt tutorial.
The main code was left intact, so my mods to support 2 player
using DBC is readily visible. A DBPro version supporting 9 players
is also available from my website.

A "step by step" would be hard to describe in "game" terms, unless
a common game could be used for refrence. In this TUT,
I break things down into small steps ...

1 - ask player for type of game
Offline/Host/Join

2 - if Hosting, settup the game

3 - If joining, Connect to the host

4 - If playing online,
send player position every 0.1 seconds,

5 - if playing online,
Check for other player position, and update data,
otherwise, update data as per monsterhunt ....

6 - missiles
When firing, and online, send data.
Other computer handles all missile impacts

7 - death
If empact results in player death, a message is sent
to other computers that a player was killed, and re-spawned
in a new location.

The monster hunt tutorial serves as a great test app for experiments.
Manticore Night
21
Years of Service
User Offline
Joined: 23rd Oct 2003
Location: Ouinnipeg
Posted: 9th May 2005 03:02
Well, I read your tutorial, and I understand it. But I need one more thing. Has anyone ever tried to set up a net session(and sucseded(sp?)) and then the other computer can't "see" the other computers net session(even when they are connected)). Thanks in advance.

It's amazing how much TV has raised us. (Bart Simpson)
waffle
22
Years of Service
User Offline
Joined: 9th Sep 2002
Location: Western USA
Posted: 9th May 2005 12:35
i tested DB113 over LAN system ...
PC1 running Win98 and PC2 WinXP fully patched.

Was also tested on the web by others. The only issues had
to do with firewalls and routers blocking connections.

DBPro version has only been tested over my home LAN system.
But that was with DBPro5.2 I think, which used DX9.b instead of
DX9.c (i still haven't upgraded to latest version yet).

Login to post a reply

Server time is: 2025-05-22 23:46:05
Your offset time is: 2025-05-22 23:46:05