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.

Dark GDK / 3d flight simulator anything I should know about to make multiplayer?

Author
Message
Shadow Wolf
16
Years of Service
User Offline
Joined: 6th Jul 2008
Location:
Posted: 5th Aug 2008 03:52
Hi all. Is their anything I should know about before I attempt to make online multiplayer for my 3d flight simulator. This is my first dark gdk game and my first attempt at online multiplayer. Any advice on the steps I need would be great.

Right now my game is just a simple flight sim where you choose one of four planes and go right to an area. The plane can shoot and has a boost and health bar.

So basically what do I need to do next to set up online multiplayer?

-thanks
Dark Gamers
16
Years of Service
User Offline
Joined: 17th Mar 2008
Location:
Posted: 6th Aug 2008 13:27 Edited at: 6th Aug 2008 17:56
To code a multiplayer game, multisync v1.4 is a good choice for beginners You should be able to download it from benjamin's thread and there is a Dark GDK version!!

[href]http://forum.thegamecreators.com/?m=forum_view&t=120129&b=22
[/href]

And I am doing my multiplayer game using different synchronisations too...

cheers~!

Attachments

Login to view attachments
Shadow Wolf
16
Years of Service
User Offline
Joined: 6th Jul 2008
Location:
Posted: 6th Aug 2008 17:39
Thanks but what kind of commands are in the multisync v1.4 library that are not in the dark gdk library?
Dark Gamers
16
Years of Service
User Offline
Joined: 17th Mar 2008
Location:
Posted: 6th Aug 2008 17:49 Edited at: 6th Aug 2008 17:59
I don't want to use the Dark GDK multiplayer commands because I don't think it's good for us (I already tried)! So I choose the Multisync.

I copied some code from the "multisync.h" header file. You can use these commands to make your network functions.



For more details please refere to Multisync v1.4 Manual which can be found at that downloadable RAR package.

It is a plugin utilizing the TCP protocol and the client/server networking model~!
Dark Gamers
16
Years of Service
User Offline
Joined: 17th Mar 2008
Location:
Posted: 6th Aug 2008 17:55
BTW, if you want to choose another networking package, you can use the RakNet!

check it out~

http://www.jenkinssoftware.com/
Shadow Wolf
16
Years of Service
User Offline
Joined: 6th Jul 2008
Location:
Posted: 6th Aug 2008 19:04
Thanks a lot. I will look into this multisync v1.4 and try to use it for my game.

BTW, since I've never made a multiplayer game before what are the general steps to setting one up?

Also, when connected to the internet, are variables from one application on one computer affected by the same variables on another application running on another computer?

For example, will I need to make a new set of variables for each plane such as the planes coordinates?

-thanks
Dark Gamers
16
Years of Service
User Offline
Joined: 17th Mar 2008
Location:
Posted: 6th Aug 2008 19:37
At first you should understand the Client/Server architecture, so that you will get an basic idea for how to set up the network connection.
e.g. declear a host (at Server) and then connect that host address (at Client)...

You don't need to make new set of variable names, there are no interference
Shadow Wolf
16
Years of Service
User Offline
Joined: 6th Jul 2008
Location:
Posted: 6th Aug 2008 20:15
Thanks again.

I am aware of the two methods of connecting: client/server and peer to peer

Is the client/server method the best method for the type of game I'm making?
Dark Gamers
16
Years of Service
User Offline
Joined: 17th Mar 2008
Location:
Posted: 6th Aug 2008 21:33
Actually the C/S model is the most choice for industry games. Because it is easy to maintain the centralised Server and can greatly decrease cheating.

I suppose for flight fighting game C/S is a good choice for you
Shadow Wolf
16
Years of Service
User Offline
Joined: 6th Jul 2008
Location:
Posted: 7th Aug 2008 01:58
Thanks a lot. I'll try it out.
Shadow Wolf
16
Years of Service
User Offline
Joined: 6th Jul 2008
Location:
Posted: 7th Aug 2008 02:40
Ok, I tried copying the folder that my game .exe is in on to my flash drive and over to my old computer which runs windows xp (my new laptop that I am making the game on has vista) so I could test the multiplayer code I just wrote. But when I tried to run the game .exe it game me this error that I am missing: d3dx9_35.dll

I then searched my entire laptop for this .dll but it apparently doesn't exist.

Am I moving my game to another computer correctly and if so what's wrong?
SunDawg
19
Years of Service
User Offline
Joined: 21st Dec 2004
Location: Massachusetts
Posted: 7th Aug 2008 03:12
The other computer doesn't have the latest version of DirectX; updating it should solve this problem.


My site, for various stuff that I make.
Shadow Wolf
16
Years of Service
User Offline
Joined: 6th Jul 2008
Location:
Posted: 7th Aug 2008 04:35
Thanks a lot. That was the problem and it now runs on my other computer. I just have to get the multiplayer code right.
Shadow Wolf
16
Years of Service
User Offline
Joined: 6th Jul 2008
Location:
Posted: 7th Aug 2008 05:52 Edited at: 7th Aug 2008 06:01
Ok I tried running the flight sim on both computers to see if the multiplayer code I wrote worked but I couldn't see both planes on screen. I could only see one plane on one computer and one on the other computer. Can anybody tell me what's wrong with the code?
-thanks
p.s. sorry if it's a little messy

Dark Gamers
16
Years of Service
User Offline
Joined: 17th Mar 2008
Location:
Posted: 7th Aug 2008 17:22 Edited at: 7th Aug 2008 17:25
aha, of course you can't see each other...because you only make a connection between the Client and the Server.

There lies a key idea, let's take an example (you can draw a picture for understanding):

At Server side, at position (1,1,1) there is an airplane Player1.

Now a Client is connected to the server, and there is an airplane Player2 at (0,0,0).

So we have two airplanes, player1 at Server and player2 at Client.

In order to see Player1 and Player2 both on the Server and Client side, you need to create a new object (airplane) at (0,0,0) at Server; and create a airplane object at (1,1,1) at Client, while the Client is jsut connected to the Server.

These two new created objects refer to replicated references at Client and Server respectively.

Once you make an action to move the player2 at Client side, you also need to send a message to the Server to drive the new created aireplane to move at Server!

clear?
Shadow Wolf
16
Years of Service
User Offline
Joined: 6th Jul 2008
Location:
Posted: 7th Aug 2008 20:07
Thanks. I understand now what I have to do but I'm still working on coding it.

BTW, do you know of any dark gdk multiplayer examples I could download to see the source code as that would help a lot?
Dark Gamers
16
Years of Service
User Offline
Joined: 17th Mar 2008
Location:
Posted: 8th Aug 2008 04:08
You should search this board with keyword "multisync"~!

Login to post a reply

Server time is: 2024-09-30 03:21:12
Your offset time is: 2024-09-30 03:21:12