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 / Little tutorial about multiplayer? (with static server)

Author
Message
Cescano
10
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 24th Feb 2015 19:52
Some of the expert guys here can post a quick tutorial on how to handle a multiplayer game with dbpro using a static server?

First of all, do you know a good company who can give out servers for a few money? I do not need a huge server where to run complex things, the static server just needs to give out a list of the active servers opened (hosted by a player on his own pc).
So basicly the hosting part of the game would still be a player running the game, the static server is only needed to update the list of the hosted game so that people can join a game hosted by another player. (very similar to car simulator games such as GTR2, Race07, rfactor2, assetto corsa etc)

A big problem is that most servers can't run a dbpro exe and even if there could be some able to do that probably would be inefficient i think, so the other question is, which is a fast to learn programming Language for the server side?
Other than dbpro I only know the basics of C++ (very basic) and I can use very well LSL (second life script Language), which is very similar to C++, but usefull only within second life.

Also what do you suggest for the player to player (host to client) communication? The built in commands are not efficient?


Thank you in advance for your replies
FDC002
10
Years of Service
User Offline
Joined: 24th Feb 2015
Location:
Posted: 24th Feb 2015 22:45
Look for multisync dll for host to client.
http://forum.thegamecreators.com/?m=forum_view&t=99188&b=5
I have been able to do everything i wanted so far with it since it allows you to exchange all the basic data you want(int,float,string). I think there are a few examples with the dlls.
cu
Cescano
10
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 26th Feb 2015 03:04
ok for multisync, what about the server issue and stuff instead?
FDC002
10
Years of Service
User Offline
Joined: 24th Feb 2015
Location:
Posted: 26th Feb 2015 05:58
I don't know about "server list" server. I can't guarantee multisync can do it the way you want. I would give it a try though. I have never made a server list program am not sure i can help you with that. Remember dbpro allows you to use ftp and http functions.I never got an http post to work but the ftp and url download in file works fine if i recall correctly. Don't know much about other languages.
good luck
Cescano
10
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 26th Feb 2015 14:38
Anyone that can advice me about the server list part? I suppose it's not a complex thing since you just need to store on the server the IP list of the hosting players, I need an advice about which Language to chose, an example on how to do it with that Language, which server providers to chose for this kind of purpose or which kind of system to rent (Windows nt, Linux, etc)
Cescano
10
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 6th Mar 2015 21:36
Still nobody knows how to help me on the server side? What I am supposed to use to handle a static server where to point all the host and clients players? mysql? php? suggestions? Come on experts I know you are behind the corner
Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 7th Mar 2015 08:14
This forum isn't as busy as it once was. You're also asking an incredibly vague question. You can use whatever technology you want to hold your server list, though I don't think you really need a full MySQL database unless you start holding more detailed information.

And what you're asking for us to tell you is how exactly to do it. I know I don't have the time, and I doubt many others do either, so I say just throw stuff at the wall and see what sticks. You seem to be on the right track.

Cescano
10
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 7th Mar 2015 13:24
To me doesn't seem to be that vague, I need a static server so that host and client players can find themselves, I want to know if someone dealt with this so that can help me giving me some advices, such as good cheap server providers, type of the server I need to handle this, and Language to use, I am not asking to write me the Whole code, even if it will be short I think, I mean, I could be able to do that with the darkbasic Language but most providers have servers where you can't run exe, or exe that need directx like any dbrpo application.
Perhaps at least someone can give me a link with a small guide that explain this? I am also worried on how to let communicate dbpro with a different Language server side
Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 12th Mar 2015 00:19
The way applications communicate over the internet is not dependent upon the language. They communicate via packets, bits of information that are passed over the internet via a connected tunnel. A good introduction to network programming is Beej's Guide to Network Programming. Those examples are in C, but should be fairly easy to follow.

As for server hosting, I can't really help you. I have a VPS with OVH but they don't allow Windows servers, only Linux or VMWare. For programming language you can use almost any language that allows you make network sockets, so C/C++/Java/Python/etc are all valid choices.

Sorry for the not-so-explicit instructions, this is a question with many answers.

Section 812
17
Years of Service
User Offline
Joined: 24th Feb 2008
Location:
Posted: 18th Mar 2015 04:41 Edited at: 18th Mar 2015 04:42
one way is :
game starts host , sends name and ip to file on webhost
other game starts join , connects to webhost , reads file and creates an array to use ,user chooses one
I think FPSC uses this way. a good example is in the source code.

another way:
buy another computer, make a server, have your games connect to it at your ip, your server gets their ip's writes to array and sends all back to gamers, run server on new computer all the time.
cheaper than a serverhosting.

I never liked the idea of running a server on a host site, seems un reliable.

if this wasn't helpful then pretend I was never here.



Cescano
10
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 18th Mar 2015 04:54
Yes i know how the basic thing works, I just lack on the server side program, which Language and commands to use there, an example with that would be very usefull (probably the code is very short as there is very little to do), also some advices about which type of server to rent (OS i mean) and maybe where if someone knows a reliable company.

For the 2nd thing, is way easier rent a server on a hosting site instead of having to worry about having everything working 24/7, what about if you go on vacation? you can't keep servers down for weeks for that, also home internets are different from the one that the hosting sites uses, they have a simmetric internet connection (same speed in download and upload) and usually both higher than the home internet, for example, I have 10 Mbit download and 0.87 Mbit in upload with my home internet, for few users could be ok but I am ambitious and I hope that my game will be played by thousands of players

Login to post a reply

Server time is: 2025-05-12 15:28:51
Your offset time is: 2025-05-12 15:28:51