39ster
Dec 22 2004, 12:12 PM
39DLL version 2.5
39DLL is a poweful dll which gives you access to windows sockets using game maker. Make fast multiplayer games or connect to protocols like http, irc, ftp, etc.
Download:
39dllV25.zipTutorials:
Http tutorial:
http://host-a.net/39ster/http.rtfTerms of use:
Credit is good.
Some popular games that use this dll:
Cubes OnlineStick onlineHover tank3DTrix!Slime OnlineIf you think your game is popular and it uses the dll then pm me.
manther
Dec 22 2004, 08:23 PM
Hmm, Seems good. The example doesnt really show much about the how good it is as you can very easily do that with the m_play functions, However there was no lag when i ran it twice on my computer

Like i said seems good, but how will it do against the other dlls like GMsock?
39ster
Dec 22 2004, 08:33 PM
Thanks. The demo was just to show how to make a little mini game with it.
I dont know how it will go against gmsock because i havnt used it but i did see the gml code for the functions and it uses alot of GML which is quite slower than compiled code. My dll doesnt have much gml so it may or may not run faster.
I may make a better example and an example of the file compression. You can use this one dll to make a mmorpg and use the binary functions to save files. The binary functions are better than gms cause you can read/write strings and integers.
EDIT:
New version coming out soon fixed alot of bugs...practically flawless and faster. This time it will come with a Unlimited player example (shows you how to make a game where there is no limit on the players using player id's..massively multiplayer basically). I may also make a bunch of scripts where it simplifies the use of the dll and a much easier way of using both udp and tcp.
jolley small
Dec 25 2004, 06:05 PM
Could you please release a better example on making a game with this
39ster
Dec 25 2004, 06:12 PM
Hey. yea i have just uploaded an example on how to make unlimited player game. I need people to test cause theres this weird problem where when more than 2 people are playing it like recieves data a block at a time or something...like the playing will be moving in all the right positions then stop for like 5 seconds then start going in all the places it should of went and so on..
Just run the server and then run the client and connect to urself then run another client and connect and hopefully u will see u and the other u and can move around
My ip is 202.93.97.133 and im hosting on port 14804 if you want to test it with me.
BTW im on 56k.
Catclone
Jan 23 2005, 05:32 PM
This thing owns. I really needed lagless bin functions >:D
39ster
Jan 25 2005, 03:39 PM
Thanks for the reply. Thought this dll died lol.
Cubiso
Jun 9 2005, 10:53 AM
How do you send binary through udp?
39ster
Jun 9 2005, 11:21 AM
Back from the dead again...lol wtf? Just send UdpSend with no data but set the message id to the binary value you want to send! You cant use 255 but because this is so old i probably wont update it so you can..
Smarttart62
Jun 9 2005, 11:41 AM
whats with you people... (dragonsoft) well stop doing this!
-Steve
Cubiso
Jun 9 2005, 01:12 PM
What's wrong with asking a question?
39ster
Jun 29 2005, 06:33 AM
MAJOR UPDATE! Look and please download and give it a try.
*Ignore the posts above this message because this dll is pretty much rewritten*
Timmo
Jun 29 2005, 07:19 AM
Is it faster than GMsocket?
39ster
Jun 29 2005, 07:26 AM
QUOTE (timmoLiiva @ Jun 29 2005, 07:19 AM)
Is it faster than GMsocket?
Yes! Its easier on your cpu because it doesnt use any gml and its faster at sending messages if you write in binary form and send in binary mode!
Timmo
Jun 29 2005, 09:35 AM
Can you make example of that infinite peole can join and they can talk and move.
bobby2guns2003
Jun 30 2005, 12:44 AM
was messin around with it... and it seems to be easy to use, propz
39ster
Jun 30 2005, 01:05 AM
Yes once people understand the internal memory buffer and writing in different data types its very easy to use. Ill show you how to know which data type to use.
Alright say i want to send my x and y co-ordinate in 1 packet. I would write this:
QUOTE
clearbuffer(); //Make sure their is nothing in the buffer.
writebyte(1); //This can be used as a message id system.
writeshort(x); //Write 2 bytes representing the x.
writeshort(y); //Write 2 bytes representing the y.
sendmessage(socket); //Now send all the data in the buffer!
Alright tthe first line "clearbuffer()" is just used in case their is already data in the internal buffer. The second line writes the message id. I made it a byte because you probably wont need more than 255 different message id's. The second line says write the x position. The reason i wrote it as a short is because if i wrote it as a byte then the maximum x position could only be 255. A short can be anywhere from -32500 to +32500. As long as your room width is smaller than 32500 than you should use a short for the x and y position. This is also the case for the y position. Now i just use the script sendmessage() which will work on a tcp socket and udp sockets (no seperate scripts for the 2 protocols).
To recieve that message i just wrote i would put in the step event of the person to recieve it:
CODE
while(1) //make a loop because we might recieve multiple messages a step
{
size = recievemessage(socket);
if(size <= 0) break; //If no message
mid = readbyte(); //Get the message id
switch(mid)
{
case 1: //If the message id is for the players x, y pos.
x = readshort();
y = readshort();
break;
}
}
Ravotus
Jun 30 2005, 11:49 AM
Wow, very interesting idea for the buffer. You should make it like a stack where you push values then pop them off in the opposite order.
Yourself
Jun 30 2005, 01:13 PM
QUOTE
Yes! Its easier on your cpu because it doesnt use any gml
QUOTE
CODE
while(1) //make a loop because we might recieve multiple messages a step
{
size = recievemessage(socket);
if(size <= 0) break; //If no message
mid = readbyte(); //Get the message id
switch(mid)
{
case 1: //If the message id is for the players x, y pos.
x = readshort();
y = readshort();
break;
}
}
Looks like GML to me.
39ster
Jun 30 2005, 01:28 PM
QUOTE (Yourself @ Jun 30 2005, 01:13 PM)
QUOTE
Yes! Its easier on your cpu because it doesnt use any gml
QUOTE
CODE
while(1) //make a loop because we might recieve multiple messages a step
{
size = recievemessage(socket);
if(size <= 0) break; //If no message
mid = readbyte(); //Get the message id
switch(mid)
{
case 1: //If the message id is for the players x, y pos.
x = readshort();
y = readshort();
break;
}
}
Looks like GML to me.
Errr, i think its pretty obvious i meant the scripts contain no gml..
Yourself
Jun 30 2005, 02:03 PM
You wrote scripts in GM without using any GML? That's pretty impressive.
39ster
Jun 30 2005, 02:10 PM
QUOTE (Yourself @ Jun 30 2005, 02:03 PM)
You wrote scripts in GM without using any GML? That's pretty impressive.
Ahem, quote from myself in the first post:
QUOTE
Speed:
With an exception to the splitstrings script, the only gml used in the scripts are the
external_call functions.
Why the hell are we even talking about this? Why did you bring this up?
Yourself
Jun 30 2005, 02:13 PM
Well then you used GML. Besides, how much GML does GMSock actually use? Sure it has many scripts, but are each of those scripts very large? And also, even if your scripts are faster, aren't you just leaving more work to the programmer? All the GML you left out will probably end up being put back in by the programmer anyway, won't it?
39ster
Jun 30 2005, 02:14 PM
QUOTE (Yourself @ Jun 30 2005, 02:13 PM)
Well then you used GML. Besides, how much GML does GMSock actually use? Sure it has many scripts, but are each of those scripts very large? And also, even if your scripts are faster, aren't you just leaving more work to the programmer? All the GML you left out will probably end up being put back in by the programmer anyway, won't it?
No. Maybe you should actually try the dll and see for yourself, Yourself. I said its handled by the dll.
Yourself
Jun 30 2005, 02:31 PM
I could, but there's no way I could compare it to GMSock as I don't have that (and the site's bandwidth exceeded, so I can't get it). I just think it's a bit silly of you to advertise this as faster when you said yourself you didn't actually use GMSock.
39ster
Jun 30 2005, 02:35 PM
QUOTE (Yourself @ Jun 30 2005, 02:31 PM)
I could, but there's no way I could compare it to GMSock as I don't have that (and the site's bandwidth exceeded, so I can't get it). I just think it's a bit silly of you to advertise this as faster when you said yourself you didn't actually use GMSock.
Yeah i did say that, but then again look at the date when i posted that. I could of used gmsock within 7 months. I also said in that post (the one that i made before i ever used gmsock) "My dll doesnt have much gml so it may or may not run faster." Never actually saying it IS faster.
yourjustconfused
Jun 30 2005, 05:35 PM
Is there a max to how large the message your sending is?
darkmage
Jul 1 2005, 07:32 PM
i tried to connect to eachother through lan but nothin was recieved maybe a better example would help
becuase i think i am doing somethin wrong with connecing so can you maybe make an example just that a few people can connect and walk or sometihng
it would really help out other people and me ofcourse to
for so far i have see it looks good but are u shure the irc works because when 2 are connected they cant chat with eachother only with them selves :S:S
39ster
Jul 2 2005, 02:15 AM
QUOTE (darkmage @ Jul 1 2005, 07:32 PM)
i tried to connect to eachother through lan but nothin was recieved maybe a better example would help
becuase i think i am doing somethin wrong with connecing so can you maybe make an example just that a few people can connect and walk or sometihng
it would really help out other people and me ofcourse to
for so far i have see it looks good but are u shure the irc works because when 2 are connected they cant chat with eachother only with them selves :S:S
The irc program is very simple and i forgot to add a way to recieve messages from other people when i released it. Im making a much more advanced online game example right now.
39ster
Jul 3 2005, 02:54 AM
GM6_Dude
Jul 4 2005, 02:07 AM
QUOTE (39ster @ Jul 2 2005, 07:54 PM)
OMG THIS IS NEAT!!!!!!1
i needed this to make my new ...........
wait better keep it a secret
but when u see the best online game

j/k
just remember u gave that project its life
Rebound->
Jul 4 2005, 05:20 AM
LMAO Yourself, you're so stupid :-P
Nice DLL 39ster, i'm actually going to try and test this against GMsock. Good job.
GM6_Dude
Jul 4 2005, 06:23 PM
QUOTE (GM6_Dude @ Jul 3 2005, 07:07 PM)
QUOTE (39ster @ Jul 2 2005, 07:54 PM)
OMG THIS IS NEAT!!!!!!1
i needed this to make my new ...........
wait better keep it a secret
but when u see the best online game

j/k
just remember u gave that project its life

<ME
DJ Gman
Jul 4 2005, 11:09 PM
this dll is a bit confusing could use a more in depth help file
Zaltron
Jul 5 2005, 03:08 AM
Hey, I think this thing is great! I have seen one bug with 2 people though. When p1 and p2 and gone in and and of both maps then p1 was in the house map and p2 was outside of the house map, p1 could see p2 at the top of the house map except that p2 looks like he was stuck in the black on the outside of the house in the house map even though he wasn't on that map. Hope that helps :\. Also, I looked through your scripts and couldn't figure where and when you sent your x and y data to the server, I was just wondering, where in your scripts are you doing that?
39ster
Jul 5 2005, 09:02 AM
I have now made a tutorial for the dll! Its in the zip and its called tutorial.rtf.
I also updated the dll and scripts so if you have already started making your game using the old scripts then to use the new ones do this:
Under scripts, remove the folder the dll scripts are in
Go to File->Merge game and select the DllScripts.gm6
Updates:
The only real update to it is writestring() and readstring() are more extensive and now requires less programming to use.
This is the old way you could of used writestring() and readstring() (you can still do it this way in the new update):
writestring("hello");
readstring(bytesleft()); //had to put how much letters to recieve.
Thats all well and good if your only sending one string over winsock, but what if you want to something like x, y, user and password in one message? How are you going to know how long the username string is and the password string? The new update makes strings alot easier to use because you can use them like readshort() or readint() where you dont have to give an argument.
//Write the data
writeshort(x);
writeshort(y);
writestring("39ster", true);
writestring("123456", true);
//Reading the data
x = readshort();
y = readshort();
username = readstring();
password = readstring();
How does it work? Simple. If you set the second argument in writestring() to
true then that means to add a Null (ascii code 0) terminator character after the string. Now when you dont set argument0 or if argument0 is 0 in readstring() then it tells the dll to read until it reaches the null terminator.
What if i want to send a string over a text based protocol..Text bases protocols dont allow the ascii code 0.
You can define your own seperator string other than the ascii code 0!
Example:
//Writing the data
writestring(username + ":" + password + ":");
//Reading the data
username = readstring(0, ":");
password = readstring(0, ":");
Warning: Do not write a string with a null terminator if your going to read it using your own seperating string! This will crash the game.
Also i have removed the splitstring() function because its not needed anymore!
DJ Gman
Jul 6 2005, 03:54 PM
thanks the tutorial helps a lot
Stryke
Jul 7 2005, 12:16 AM
I made an .gm6 for everyone that wants a online example that is less advanced. It only works with 2 players so if you want to work with unlimited players you gotta edit it.
http://www.rocketsoft.gm-school.uni.cc/uploads/RPGClient.gm6This example is probably good for a pong game.
Timmo
Jul 7 2005, 12:21 AM
God dammit, this dll is so good. But why not there are much posts about it? This is much better than Gm's mplay functions and more simple too.
Stryke
Jul 7 2005, 05:56 PM
Yeah, only 2 pages from December 2004 - July 2005.. sad
39ster
Jul 9 2005, 06:38 AM
Ok guys let this topic die if you want but what im about to say isnt just because i made this dll. This is the only dll on these forums that you can make professional lagless multiplayer games. MPLAY and no other winsock dll supports binary mode and the use of reading/writing in different data types. All professional online games you see use this method and if anyone here wants to make anything professional involving multiplayer then this is the only dll.
To understand why this dll is important read
http://www.gamedev.net/reference/articles/article712.asp in the section: "Birth of Lag: Building the Packet". This dll can do everything mentioned in that section.
Timmo
Jul 9 2005, 07:38 AM
"MPLAY and no other winsock dll supports binary mode and the use of reading/writing in different data types."
Wht does it mean?
39ster
Jul 9 2005, 08:28 AM
When im talking about different data types i mean these scripts:
writebyte() - Utilizes 1 byte
writeshort() - Utilizes 2 bytes and can be a number between -32000 to +32000
writeint() - utilizes 4 bytes and can be a number between -2000000 to + 2000000
writefloat() - utilizes 4 bytes and can store numbers with a floating point (e.g 4.2)
writedouble() - Utilizes 8 bytes and is the same as writefloat but the number can be much much larger!
Jochem
Jul 9 2005, 01:22 PM
I was wondering something.
Is it necessary to send a string and the numeric values in different packets (when the numeric values are being packed with writebyte())?
I've made a string_split() script (how original!), which uses a character from the ASCII-table (like '|') to split different values from each other. Since some strings depend their size on their user, like names and passwords.
For example, I send the packet: "LG|Jochem|mypassword|5600" to log myself in. I could easily halve the size of bytes for 5600, but that isn't possible, because there is already used a ASCII-character for the strings, and the whole packet will be messed up when readed, thus leading to errors.
I did though of giving a name and password a fixed size, but that would be a waste of bandwith, wouldn't it?
Does anyone have any suggestions?
39ster
Jul 9 2005, 02:13 PM
QUOTE (Jochem @ Jul 9 2005, 01:22 PM)
I was wondering something.
Is it necessary to send a string and the numeric values in different packets (when the numeric values are being packed with writebyte())?
I've made a string_split() script (how original!), which uses a character from the ASCII-table (like '|') to split different values from each other. Since some strings depend their size on their user, like names and passwords.
For example, I send the packet: "LG|Jochem|mypassword|5600" to log myself in. I could easily halve the size of bytes for 5600, but that isn't possible, because there is already used a ASCII-character for the strings, and the whole packet will be messed up when readed, thus leading to errors.
I did though of giving a name and password a fixed size, but that would be a waste of bandwith, wouldn't it?
Does anyone have any suggestions?
You do not need to have the packet seperated with "|".
Just do:
//Building the packet
writestring("LG", true);
writestrng("Jochem", true);
writestring("mypassword", true);
writeshort(5600);
//Reading the packet
lg = readstring();
username = readstring();
password = readstring();
short = readshort();
See when you set argument1 in writestring() to True then this adds a NULL terminator character at the end of it. This Null terminator will now be used to find when the string ends. Setting argument0 in readstring() to 0 (or leaving it blank) means to extract the string by finding the NULL terminator. This is also alot faster then a split_string() script written in gml.
Null terminator character is the ascii code 0 btw and is very rarely used in strings..apart from telling the app when the string finishes.
Jochem
Jul 9 2005, 02:54 PM
Ah, now this makes sense. Thanks. I will be playing a little around with the DLL and see how it works.
39ster
Jul 11 2005, 08:10 AM
Ok iv made a new update. It now includes the zlib library so you can compress and decrompress the internal memory buffer. You can also create a checksum of the data inside the buffer!
Jochem
Jul 11 2005, 11:07 AM
"You can also create a checksum of the data inside the buffer!"
What do you mean with that? :/
"It now includes the zlib library so you can compress and decrompress the internal memory buffer."
Err.. since most of the data is already expressed as small as it could be, how could it be any smaller?
RiChArD_fLoOd
Jul 11 2005, 11:10 AM
is this better than gmsock cos i'm kinda in the middle of makin a game with gmsock
Jochem
Jul 11 2005, 11:15 AM
Well, it depends more on the way you work around with it, but that's already explained a million times by other people. Though, if you use both DLL's at their best, I think this DLL would win, but pretty close, though.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.