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.

Work in Progress / Multiplayer DLL + Server

Author
Message
Elleomea
21
Years of Service
User Offline
Joined: 2nd Aug 2003
Location: England
Posted: 26th Dec 2003 03:01 Edited at: 26th Dec 2003 03:04
Okay, straight to the point, I'm creating a nice little multiplayer DLL and server to make the creation of persistant worlds much easier (it can be used for non-persistant worlds as well, but persistant worlds are the main focus).
It doesn't make use of DirectPlay like the current DarkBasic multiplayer commands, it sends it's commands over fairly straight TCP sockets and keeps almost everything important server side so the client is secure from people doing dodgy things to it.
It creates MD5 hashes for passwords to keep them fairly secure when transfering and storing them.
The server runs on Windows and Linux, the DLL is currently just for Windows but I'm planning on creating a shared object file for Linux out of it, since I'm not making it exclusively for the DarkBasic community, although that is my prime target at the moment.
Once it's more finished I'm planning on releasing the server under the GPL and the DLL/SO under the LGPL.
By now you're probably thinking, "Yep, more great plans by a little person that'll turn into nothing but vapourware". So... here's my current progress



In the above program the user can register a player, log in, walk around (all server based) and view other players. That's all done with only 16 lines of multiplayer code in the client.
Current commands are:
Connect (ip/host,port) -- Connect to the server
Register (username,password,profession,email) -- Register a new user, password's automatically MD5 hashed.
Login (username,password) -- Login to an existing account, password's automatically MD5 hashed.
GetMyX -- Return the player's X position
GetMyY -- Return the player's Y position
GetMyZ -- Return the player's Z position
WalkMe -- Move the player by amount specified in server configuration for walking, in the current direction.
RunMe -- Move the player by amount specified in server configuration for running, in the current direction.
WalkMeBack -- Move the player by amount specified in server configuration for walking, opposite to the current direction.
TurnMeLeft -- Turn the player left by amount specified in server configuration
TurnMeRight -- Turn the player left by amount specified in server configuration
GetNearbyPlayers -- Get player IDs for all players within a certain area of you (distance specified in the server configuration)
NextNearPlayer -- Feed the client the next near player in the list
PlayerX (playerid) -- Get the X co-ordinate of the player with the specified ID
PlayerY (playerid) -- Get the Y co-ordinate of the player with the specified ID
PlayerZ (playerid) -- Get the Z co-ordinate of the player with the specified ID
PlayerRot (playerid) -- Get the rotation of the player with the specified ID


Not bad for 3 days work, eh? Feel free to make any comments you might have about things you'd like to see included and I'll stick them in if they suit my plans for the project .
Also going to add that I'm easily distracted, so development might not always be lightning quick, if at any point I do get absolutely tired of it and decide never to work on it again (unlikely, but possible ) I'll be sure to release all the source for others to tinker with .

How much ham could a hamster stir, if a hamster could stir ham?
waffle
22
Years of Service
User Offline
Joined: 9th Sep 2002
Location: Western USA
Posted: 26th Dec 2003 03:29
interesting idea. I did/am doing something simular, but I'm not storing data on the server. Instead I require all clients to maintain data and track nearby players via room numbers. But then I'm not working towards a MM game per say....

http://home.comcast.net/~norman.perry/ProxyServer.html

I started off with 99 zones for 99 players and switched to 999 zones for 9 players per zone. I don't forsee ever having more than 9 players online at any one time anyway... realistic expectations are seldom found on these forums

internet gaming group
current project http://home.comcast.net/~norman.perry/Archon.html
Elleomea
21
Years of Service
User Offline
Joined: 2nd Aug 2003
Location: England
Posted: 26th Dec 2003 03:40
Yeah, giving too much power to the clients in MMO*s is generally a bad idea, since then you get all sorts of "utilities" turning up to "enhance" gameplay .

How much ham could a hamster stir, if a hamster could stir ham?
Bulleyes
22
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 26th Dec 2003 06:45
Just curious,
If you to put the game session only on the server to prevent hackers and cheaters, why not just use the Client/Server mode in DirectPlay. For me, I think DirectPlay is a very good abstraction over the low level network communication API (i.e. socket if TCP connection is used). What I like is DirectPlay's responsiblity of managing the player session and message sending/broadcasting, and those really save me some work.

For the rest of the game specific code, like state synchronziation, encryption, compression, I can just code it on top of DirectPlay.

Sorry if I am being too naive. I am still researching on several models on my multiplayer game. Feel free to comment and enlighten me.

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
Elleomea
21
Years of Service
User Offline
Joined: 2nd Aug 2003
Location: England
Posted: 26th Dec 2003 12:51 Edited at: 26th Dec 2003 12:52
Okay, well I personally do not like DirectPlay. For a start it means you can't do anything multiplatform since it's a proprietary protocol.
Secondly, people have a lot of problems with using the DirectPlay based multiplayer commands in DarkBasic, you just have to have been in #DarkBasic to see all the hours of work some people have put in to trying to get reliable communication between clients.
Thirdly, this is designed as a higher level protocol than DirectPlay, to make things much simpler for hobbyist game programmers, as you can see by the command list and the fact that the server is already created for the user in as generic a form as possible.

How much ham could a hamster stir, if a hamster could stir ham?
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 26th Dec 2003 13:51
looks very good! is there a demo/beta/alpha available to download?


GO TO THE ETERNAL DESTINY FORUMS!!! http://forums.eternaldestinyonline.com
Do it now!!!
Philip 1337
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 26th Dec 2003 13:57
Looks really cool, let me know when finished

Bulleyes
22
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 26th Dec 2003 15:02
Well... looks kinda cool to me. But I am just curious, by looking at the functions you have, like WalkMe(), WalkMeBack(), RunMe(), etc. Are you trying to list all the possible actions? Wouldn't it be hard to generalize the actions for all kind of game?

Again, just knock my head hard if I miss out anything. I am just learning.

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
Mattman
21
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 26th Dec 2003 17:52
ooh,ooh, I might use this for a project I am working on. Thank you!

I am mischeivious
RoooooOoooooKoooooKoooooRoooooOoooooKoooooKooooo!
Elleomea
21
Years of Service
User Offline
Joined: 2nd Aug 2003
Location: England
Posted: 26th Dec 2003 18:29
ReD_eYe: I'm going to attempt to create a 20 line entry (Not sure if it'd qualify for the competition or not) as a demonstration of it's neatness, then release the most uptodate stuff for others to play with.
Bulleyes: Naturally it would be more restrictive than doing everything yourself, but I'm confident I can keep it generic enough for the majority of people to be able to do what they want with it.

The eventual proving ground of future releases (after the 20 line entry) will be Myrmidia, a small MMORPG I've been working on for a while which currently uses the built-in multiplayer commands, but in the next release should hopefully be making use of this DLL instead.

How much ham could a hamster stir, if a hamster could stir ham?
Jimmy
21
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 26th Dec 2003 21:53
$10 says Elleo makes the best MP DLL on the planet. This dood gotz teh sk|||z. Can't wait for it man.

www.dbpcommunity.com - free webhosting
Elleomea
21
Years of Service
User Offline
Joined: 2nd Aug 2003
Location: England
Posted: 26th Dec 2003 22:15
Can I take you up on that bet?

How much ham could a hamster stir, if a hamster could stir ham?
Jimmy
21
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 26th Dec 2003 22:50
haha, so modest

man, avril looks like a little piggy.. I gotta fix that

www.dbpcommunity.com - free webhosting
Mattman
21
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 13th Jan 2004 02:19
way to kill the thread jimmy

a
Jimmy
21
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 13th Jan 2004 10:19
Well, now you guys brought it back so Elleo has to work on it again... WAY TO GO HOMOS

http://www.dbspot.com/ - free webhosting (WORKS NOW)
Don't forget to listen to the unofficial DB streaming radio station: http://jimmykicks.ath.cx:8000
Elleomea
21
Years of Service
User Offline
Joined: 2nd Aug 2003
Location: England
Posted: 15th Jan 2004 20:23
Heh, haven't had much time to work on it recently, had/am having a bunch of exams at the moment, plus a fair bit more work than normal. Probably get back to doing some serious work on it mid-February though .

How much ham could a hamster stir, if a hamster could stir ham?
Rpg Cyco
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Australia
Posted: 16th Jan 2004 05:39
This looks very very useful, I will end up using it most likely.

l8ter

Rpg Cyco

waffle
22
Years of Service
User Offline
Joined: 9th Sep 2002
Location: Western USA
Posted: 21st Jan 2004 19:50
another reason not to use DirectPlay...
A DB app as a server takes a huge footprint and would be unstable.
Not a good thing if you want a remote server (a computer thats located off site). By doing TCP or UDP from scratch its easy to port code to Linux or Windows and keep a small foot print. My server is under 50k .....

A reason to use DirectPlay on a server....
Direct Loby support .... DB/DBPro do not support this option.
Also, the loby support would need to be in C++ as thats how M$
did the docs.

Examples of games using DirectPlay Lobies:
HalfLife,Quake,Warcraft,Impossible Creatures, Starfleet Command.....

internet gaming group
current project http://home.comcast.net/~norman.perry/Archon.html

Login to post a reply

Server time is: 2024-11-24 10:13:39
Your offset time is: 2024-11-24 10:13:39