Jump to content


The Multiplayer Topic


  • This topic is locked This topic is locked
286 replies to this topic

#1 Guest_Celaris_*

Guest_Celaris_*
  • Guests

Posted 21 May 2004 - 11:37 AM

Expert Users Forum

Here is a hard topic, The Mulitplayer topic is one few people know about, scoring through the Advanced Questions and Answers Forum, so many people were asking how it works, so this, hopefully can become a post to pass on this most valuable of knowledges.

Keep it clean, don't insult people, and because someone doesn't know something do not make fun of them, don't call them a nOOb, there is nothing more punishing then thinking your getting the hang of gamemaker, and you post, asking a question, and you get called a nOOb, please don't do it.


The Inquisitor

Edited by xot, 13 April 2008 - 05:57 AM.
** Old Experts Topic **


#2 Guest_Celaris_*

Guest_Celaris_*
  • Guests

Posted 28 May 2004 - 11:35 AM

Game Maker Community

It's been a week, come on, anybody want to reply, this is really important for a lot of people.

The Inquisitor

#3 Burning Sheep Productions

Burning Sheep Productions

    GMC Member

  • New Member
  • 320 posts

Posted 28 May 2004 - 12:19 PM

Multiplayer as in what?
Over the net or on the same comp with split screen or both?
  • 0
Posted Image
Burning Sheep Productions

#4 Edareot

Edareot

    GMC Member

  • New Member
  • 27 posts

Posted 31 May 2004 - 04:23 PM

Ok, I got a question for you, I can set up a multiplayer connection between to computers and play simple games like pong having only two players with one hosting and the other connecting by entering the host's IP. but I want a bigger game than that. does anyone know if it's possible to have a game with between 6 and 20 and instead of connecting using the IP is it possible to connect like to a server so you don't have to remember IP's and the such like.

So:
  • Is it possible to run games connecting between 2 and 20 computers?
  • Is it possible to connect to a 'server' type thingme and how do I go about doing that?
  • Don't reply with you can connect via TCP, Modem and Serial aswell, I don't care I'm tring to get it so all new users can connect to one big servers so that everyone knows where it is and they dont have to remember IP add's
Get what I mean?
  • 0

#5 Edareot

Edareot

    GMC Member

  • New Member
  • 27 posts

Posted 01 June 2004 - 10:26 AM

Hey guys thought I'd tell you what I've found so far...

It is possible to have games on game maker with 20+ players although I don't know how complex these games can be.

You can play over the internet using severs to connect to rether than having to use different IP's

I have heard people talking about a GMsock.dll which allows larger games to be played over the internet although no one seems to know (or atleast want to tell people) how to use it.

GMsock and GMSql can be used to set up dedicated (or non-dedicated if you wish) servers although I can't find any info on them as of yet.
  • 0

#6 matthewbot

matthewbot

    The Sockmaster

  • New Member
  • 258 posts

Posted 01 June 2004 - 10:43 AM

There appears to be a lot of mis-understanding going around my DLL. First of all, it can be used for this purpose, but it would be very very difficult. If u think the mplay_ functions are finicky, sockets are 10x that. There is way too much trouble to use GMsock for a small game. However, writing an MMORPG in GMsock is the only gaming task that really makes sence. GMsock let's you get down right to winsock, and create,read/write,listen,and destroy sockets. With an MMORPG, the speed benifits are worth it, as GMsock does NOT use directplay, which is designed for games and makes net games a whole lot eaiser. With GMsock, you have to keep track of every connection to all the computers, and process commands from each one. What I'm saying is, if it only uses 2-6 comps, go mplay_ if it goes about 6 and is MMORPG-ish, than use GMsock, if ur up to the complexity(And if u think GMsock is complex, don't every try to use winsock in C) About the commment about people not knowing how it works, we have an entire (smallish) community, of which probably 8-9 peoples (not including my self) understand at least the basics, and are will to help here (register to view the Q/A forums)

EDIT: GMsock will let u make a dedicated server, as demonstrated by my sockchat example in Creations somewhere. Mysql?? what do u need that for? GMsock can talk to Mysql servers, but u'd have to read up on all the commands. I would use smarty's DLL instead. (I think it was smarty's)

Edited by matthewbot, 01 June 2004 - 10:45 AM.

  • 0

#7 Edareot

Edareot

    GMC Member

  • New Member
  • 27 posts

Posted 01 June 2004 - 12:38 PM

Err, mathewbot I joined your community and I couldn't find any exampes that helped, only ones for sending emails and things with POP3 and SMTP. I intend to make a game with as many players as possible (20 would be fine but more would be great) I only said between 6 and 20 in my previos post because I din't know many more was possible.

Would it be possible for you to give me a link to the sample that was taken out of the zip file (to keep the zip smaller I heard) as I can't find it that would be great and if possible can you link me to any tutorials that you think will help, I have although I cant find anyones that will help.

In case I haven't made this clear I am intending to make a MMORPG! Plus for the benefit of the inquisitor I shall pass on anymore useful information I find ^_^
  • 0

#8 Rky_nick

Rky_nick

    GMC Member

  • New Member
  • 259 posts

Posted 01 June 2004 - 12:46 PM

search for easy multiplayer lib in lib,dll topic thing.I found one that lets you have up to 99,999 players!
  • 0

#9 Edareot

Edareot

    GMC Member

  • New Member
  • 27 posts

Posted 01 June 2004 - 03:49 PM

Rky_nick where did you find the dll and where do I search for the easy multiplayer lib and, if you can managed it, whats the limitations of the dll Im sure my computer (as average as it is) couldn't connect to 99,999 computers and play even the simplest games lag free.
  • 0

#10 gothikal1

gothikal1

    GMC Member

  • New Member
  • 7 posts

Posted 01 June 2004 - 05:51 PM

I'm working on an online FPS that will support up to 8 players in one session. My game uses TCP/IP connection but you don't need to know the IP of anyone's PC. You don't even need to know what IP is. What it does is take the name of your session and your IP address and uploads it to a file on my server. The names are stored in a certain file so that when you start the multiplayer server, it downloads the file and shows what sessions are online. You then just enter the name of one of those sessions and play the game. No need to remember IPs. It is fairly easy to connect and you can add all sorts of info about the session such as player's names, how many players the session allows, if it's a team game, and what level it's in. Also you could even add what type of game it is, i.e. CTF, Snipers, or Team Deathmatch. I still need to do a little tweaking but it works great.
  • 0

#11 Edareot

Edareot

    GMC Member

  • New Member
  • 27 posts

Posted 01 June 2004 - 06:43 PM

Brilliant! Please, Please, Please tell me how you did it (or send me a .gmd)! How bigs the game gonna be? Is it like pong or a decent game?
  • 0

#12 zeroice

zeroice

    GMC Member

  • New Member
  • 71 posts

Posted 01 June 2004 - 06:49 PM

please please send a basic multiplayer example to me!! with the non-ip thingy, so i can build my game on that file, please please please!!!!
  • 0

#13 Elmernite

Elmernite

    Kengine

  • GMC Member
  • 423 posts
  • Version:GM:Studio

Posted 01 June 2004 - 06:59 PM

gothikal1 I must admit that does sound very good. do you plan on giving out the .gmd? I might try somthing like that.
Elmernite ^_^
  • 0

rsbanner.png
Kengine Gaming "Kengine Gaming is the best GM site I've seen" - flubmasterQ
"Good games never die" - Elmernite


#14 Calle

Calle

    GMC Member

  • GMC Member
  • 689 posts

Posted 01 June 2004 - 07:38 PM

ZeroIce, it is not possible to send information without IP.

I suppose you meant that you would like to check all IP numbers and list all sessions? That is what people normally want when they are asking such things. But I'll you there is very few people that have succes with it and I have never seen anybody giving out the .gmd of it. Sorry.
  • 0

#15 Kornbizkit1718

Kornbizkit1718

    Wanderlust

  • New Member
  • 275 posts

Posted 01 June 2004 - 07:48 PM

Formingaband.com/Ominous . The multiplayer example there is more than anyone could ask for.


Edit: Thats not exactly true Kung Keno. Ive done it b4. What you do is save info to a FTP Client (tripod.co.uk) when someone hosts a game, then when u join, jsut read that info via command prompt. Bam, u get there ip, and join there game.

Edited by Kornbizkit1718, 01 June 2004 - 07:51 PM.

  • 0

#16 Edareot

Edareot

    GMC Member

  • New Member
  • 27 posts

Posted 02 June 2004 - 08:40 AM

I think what that guy ment was that you didn't have to enter the ip in your self (as a player) because the game would already know the IP.
  • 0

#17 gothikal1

gothikal1

    GMC Member

  • New Member
  • 7 posts

Posted 02 June 2004 - 05:08 PM

Th IP is saved to a file on a server when you create a session. All the player has to do is click the name of the session that they want to join and the IP is downloaded and connected automatically. I will release the gmd after my game is done. I noticed alot of people stealing things and claiming as their own so I want to finish my game first. It will be quite a while so don't sit around waiting. I also need to add some more functionality to it to make it more professional. I go for the highest quality I can possibly give when it comes to my games and examples. A demo of my game will be out soon. It wont be anything fancy just yet. It is mainly to show what my multiplayer support is capable of. It will show the server, connection and creation of sessions, and simple gameplay. The 3D engine is quite buggy still, i.e. the movement of the player, but it is enough to show what my server is capable of.

Edited by gothikal1, 02 June 2004 - 05:11 PM.

  • 0

#18 Calle

Calle

    GMC Member

  • GMC Member
  • 689 posts

Posted 02 June 2004 - 06:50 PM

Edit: Thats not exactly true Kung Keno. Ive done it b4. What you do is save info to a FTP Client (tripod.co.uk) when someone hosts a game, then when u join, jsut read that info via command prompt. Bam, u get there ip, and join there game.


Nah, I know it isn't, your right. Though I didn't want to explain that since a begginer would never be able to do that anyway. And you cannot give out an example on it since all games can't use the same server and those who uses examples are often not advanced enough to get their own ftp server work.

gothikal1, I'm looking forward for your game! Seems really intresting. The most intresting part isn't the game but if it work and how it work. I got real problems with the slowness GM multplayer has. Mplay + 3D seems to be the ultimate version of two slow parts and forging them togheter ought to cause problem. It will be intresting to see if you can solve it and, if you do, how.
  • 0

#19 gothikal1

gothikal1

    GMC Member

  • New Member
  • 7 posts

Posted 02 June 2004 - 10:17 PM

The engine I am using is teh Irrlicht engine with Xception's dll. The engine is ten times faster than anything I have ever seen. It will even run smoothly at 15 FPS. Don't ask me how that can be, I just know from testing it. And GM's multiplayer functions aren't slow provided that you use them right and your modem is the correct speed for running that type of game.

Edited by gothikal1, 02 June 2004 - 10:18 PM.

  • 0

#20 Edareot

Edareot

    GMC Member

  • New Member
  • 27 posts

Posted 03 June 2004 - 09:45 AM

Hey Kung Keno, could you make an example of how to connect GMaker to an FTP server. I can make and FTP server work but wouldn't know where to start for connecting GMaker to it.
  • 0

#21 39ster

39ster

    GMC Member

  • GMC Member
  • 898 posts

Posted 03 June 2004 - 10:49 AM

Theres alot of newby conversation going on in this Expert users posts.
  • 0

#22 Edareot

Edareot

    GMC Member

  • New Member
  • 27 posts

Posted 03 June 2004 - 11:53 AM

So your saying multiplayer games are a newbie thing then? And connecting to an FTP server with GMaker is a newbie thing? So whats and expert thing then?
  • 0

#23 Calle

Calle

    GMC Member

  • GMC Member
  • 689 posts

Posted 03 June 2004 - 01:24 PM

I fully agree with you, Edareot, Luke's comment was pretty silly...

Anyway, Edareot, I'm sorry but I cannot make the exmaple. ;)

No time and probably not enough with experience to make a good one... :P
  • 0

#24 39ster

39ster

    GMC Member

  • GMC Member
  • 898 posts

Posted 04 June 2004 - 07:09 AM

Nah i meant two people really.

-search for easy multiplayer lib in lib,dll topic thing.I found one that lets you have up to 99,999 players!
-please please send a basic multiplayer example to me!! with the non-ip thingy, so i can build my game on that file, please please please!!!!


And yes i think multiplayer functions are tons easy. Not sure why people think there hard..
I just thought the expert forum was for really expert stuff. I dont usually read this forum much.
  • 0

#25 Guest_Gunscrossed_*

Guest_Gunscrossed_*
  • Guests

Posted 04 June 2004 - 08:03 AM

I'm probably not going to make an example for connecting to an FTP server, but i know how to do it.
You can use PHP functions for connecting and retrieving data, and you can execute the PHP script as a simple webpage that closes itself.
It's a bit slow, but in games like gothikal1's, you would only need to connect and retrieve data in the beginning, so that's not too much of an issue.

Edited by Gunscrossed, 04 June 2004 - 08:04 AM.


#26 Edareot

Edareot

    GMC Member

  • New Member
  • 27 posts

Posted 04 June 2004 - 08:07 PM

Yeah, get what you mean now Luke, you really should be secific in your origional post.
  • 0

#27 Kornbizkit1718

Kornbizkit1718

    Wanderlust

  • New Member
  • 275 posts

Posted 04 June 2004 - 08:47 PM

I'm probably not going to make an example for connecting to an FTP server, but i know how to do it.
You can use PHP functions for connecting and retrieving data, and you can execute the PHP script as a simple webpage that closes itself.
It's a bit slow, but in games like gothikal1's, you would only need to connect and retrieve data in the beginning, so that's not too much of an issue.


Hey Kung Keno, could you make an example of how to connect GMaker to an FTP server. I can make and FTP server work but wouldn't know where to start for connecting GMaker to it.

Th IP is saved to a file on a server when you create a session. All the player has to do is click the name of the session that they want to join and the IP is downloaded and connected automatically. I will release the gmd after my game is done. I noticed alot of people stealing things and claiming as their own so I want to finish my game first. It will be quite a while so don't sit around waiting. I also need to add some more functionality to it to make it more professional. I go for the highest quality I can possibly give when it comes to my games and examples. A demo of my game will be out soon. It wont be anything fancy just yet. It is mainly to show what my multiplayer support is capable of. It will show the server, connection and creation of sessions, and simple gameplay. The 3D engine is quite buggy still, i.e. the movement of the player, but it is enough to show what my server is capable of.


Hehe... You see what my post started? I have written a "Example" (It was for a game.) Of how to do this. I did not use PHP At all. What i essentully did was Had my own FTP Client. (again, just tripod.co.u, they give you one free! How can u beat that?) Then you start the game. Lets say you want to start the server. You hit server, then the name of the game, and max players, all that good stuff. Then it wrote a file to the FTP Client using batch files (.bat's executed in gm) then the game started. The only thing the user notices going on is a command prompt box opening. Now the next person opens the program. It grabs the info of all the servers running (each server had its own file on it, it just had to parse the info. like /name of game\//num of players\\///ip\\\) It read it, parsed it, and spit it back out in a friendly form :D . He clicked on the one he wanted to join (I made my own scroll menu) And bam, joins that ip.


It worked beutfiuly, and i loved it. But no one wanted to use it for some reason. I had it set up so u can jsut merge it with any mmo, mo, or just o game :D. But, no one wanted it. I wonder if i still have it. If so, im me on AIM if u want it. nUpNdown .
  • 0

#28 Blink

Blink

    GMC Member

  • GMC Member
  • 159 posts

Posted 04 June 2004 - 09:02 PM

I found an etremely simple way to make a two player racing game without using two cameras. It may be a newbie style, but it is etremely simple(this is noninternet multiplayer, as in split screen).

All you do, is have a color for the background, and make two of every obstacle, player one's obstacle and player two's obstacle. Lets say the obstacle is a rock, and the goal is a flag. There's rock1, and rock2, and flag1, and flag2. Then, there's player1, and player2. If player2 presses up, all instances of objects for rock2 and flag2, jump to position y+16 relative. Same for player1, but with all the player1 objects. The camera never needs to move, and it will simulate two different screens. It's not good for moving too far left and right though, because there would be the other player's zone on that side. I have used this method many times before for multiplayer, and it works quite well.
  • 0


REGISTERED!!!!!!!!!!!!!!!
Starfox Flotilla - 12%
Get A Life: A New Life - 100% Topic here!
Polkamooma - 76%

All games made by Galigo Games. Get A Life and Polkamooma are copyright Galigo Games.

#29 gothikal1

gothikal1

    GMC Member

  • New Member
  • 7 posts

Posted 06 June 2004 - 08:10 AM

My game actually connects using a dll. I do use PHP to get the IP however. Nice thinking though.
  • 0

#30 Skilzat99x

Skilzat99x

    FlipCast Skilzat99X

  • GMC Member
  • 1164 posts

Posted 07 June 2004 - 08:54 PM

OK, just tell me this and it will be easy. How do you connect to an FTP client from the game.

I think it just might be easier if you connect to your own servers IP address automatically, but the server must always be running.
  • 0

#31 matthewbot

matthewbot

    The Sockmaster

  • New Member
  • 258 posts

Posted 07 June 2004 - 09:01 PM

you just connect to port 21 on ur FTP server, than send FTP commands. Do a google!! No, there is no FTP_download command. Sockets are low level, u have to handle the downloading and saving urself.
  • 0

#32 Skilzat99x

Skilzat99x

    FlipCast Skilzat99X

  • GMC Member
  • 1164 posts

Posted 07 June 2004 - 09:23 PM

So if port 21 always necassary?

And isnt there a FTP d/l command in one of the DLL's, like the one I just got?
  • 0

#33 Kornbizkit1718

Kornbizkit1718

    Wanderlust

  • New Member
  • 275 posts

Posted 08 June 2004 - 03:25 AM

you just connect to port 21 on ur FTP server, than send FTP commands. Do a google!! No, there is no FTP_download command. Sockets are low level, u have to handle the downloading and saving urself.


Actually i got lasy and went through the command prompt. ;)
  • 0

#34 gothikal1

gothikal1

    GMC Member

  • New Member
  • 7 posts

Posted 08 June 2004 - 06:32 PM

U.Y.FTP is a great dll that has all the features that you need such as uploading and downloading. That is what I used to connect my game to my FTP server. It downloads the list of online games and displays them and it also gets your IP by downloading a PHP file.
  • 0

#35 Calle

Calle

    GMC Member

  • GMC Member
  • 689 posts

Posted 08 June 2004 - 06:58 PM

Hey, I made a LAN game on like 30 mins. Not the game itself but the engine.

It works fine when only one player driving, the other can see him move around, wonderful!

My programm do only send information from a player actually moving. So when both player drives at the same time the game lags REALLY much!! Anyone got any idea how to solve this problem. It lags like.... Plz help.
  • 0

#36 Yako

Yako

    GMC Member

  • New Member
  • 186 posts

Posted 08 June 2004 - 09:11 PM

you will need to share the x, the y, the speed, and the direction to make it look smooth. And you should transfer the game processing to one of the games, not to both. This way it's synchronized.
  • 0

#37 Calle

Calle

    GMC Member

  • GMC Member
  • 689 posts

Posted 10 June 2004 - 12:13 PM

Hm... Are you sure that will work? I don't think so. Right now I am sending x,y, direction. It runs smooth... That wasn't my problem.

I do only have problem with the speed... Are you really sure you way will improve the speed?
  • 0

#38 Kornbizkit1718

Kornbizkit1718

    Wanderlust

  • New Member
  • 275 posts

Posted 10 June 2004 - 06:40 PM

you will need to share the x, the y, the speed, and the direction to make it look smooth. And you should transfer the game processing to one of the games, not to both. This way it's synchronized.


See. thats the kind of things that make games lag. You dont need to sync the x and y if you sync the speed and dir. you just need to do more client side. People need to understand that if you want to make a mmo, a real mmo, everything, or atleast 80% of everything needs to be done server side. All calculations server side, and the client really assumes the rest. Client tells the server (one message) the speed, and dir. now the server sends it to all the people close to it (several message), and they figure it out from there. like if there currently at 50,20. and there facing up, and going at a speed of 10, its gonna do it all in the client, so it doesnt have to read all that info every step, just that one time, and interprates from there. I hopt that makes sence, if not, i can elaborate a lil more.
  • 0

#39 Yako

Yako

    GMC Member

  • New Member
  • 186 posts

Posted 10 June 2004 - 06:59 PM

That's just what I said but in other words. And you will need to share the x and y too, because in your way if we lose some mplay data, the game isn't synchronized anymore, because the x's and y's are different in each game instance. If we share the x and y also, the moving object is always at the right place.
  • 0

#40 Omega Metroid

Omega Metroid

    GMC Member

  • New Member
  • 1706 posts

Posted 10 June 2004 - 07:04 PM

Oii, I won't be making MP games for a looong time, unless I use joysticks and the same screen, kinda arcade like and all... but yeah, this just confuses me, but um, the two seperate things you mentioned, with the rocks and the flags, that'd be kinda wierd you know. because how do you know if you're winning? make extras of the bojects, so you can see the other player race ahead of you :) hehe, other then that, I got nothing
  • 0
The purpose of this board is to help others. Do your best to do so.

If you have a problem, first check the forums if there is already a topic. If not, think a moment if there would be a nice tutorial to help you out with your issue then look for it. If not, Gather all the details you can, and then make a post in the novice and intermediate boards. If the topic doesn't get resolved there, ask a mod to move it to advanced. Remember, we're all trying to help each other here.

#41 Kornbizkit1718

Kornbizkit1718

    Wanderlust

  • New Member
  • 275 posts

Posted 10 June 2004 - 07:04 PM

but... not every step.if u feal the need to sync the x,y at all, sync it like every 5th, 10th, or even like fps. so every fps ittl go and grab the x,y. other than that its just to much. also, you dont need to sync the speed and dir every step, maybe every 5th. cause itll do it all on its own in the client. thats something u cant do with just x,y.

Edited by Kornbizkit1718, 10 June 2004 - 07:04 PM.

  • 0

#42 Yako

Yako

    GMC Member

  • New Member
  • 186 posts

Posted 10 June 2004 - 07:05 PM

I made all my multiplayer games my way and it works fine.
  • 0

#43 Tobs

Tobs

    GMC Member

  • New Member
  • 599 posts

Posted 10 June 2004 - 08:28 PM

hi,
i do games like this....
create a 'host/server' on a comp that has broardband, keep it connected all the time and have it as a seperate player.
Then send all the messages of Vars to that comp and have it relayed back to all the other players. I do this every step in non-gauranteed mode and it moves smoothly. The only thing you hav to watch out for is multiple sessions.
H3x
  • 0

#44 Calle

Calle

    GMC Member

  • GMC Member
  • 689 posts

Posted 11 June 2004 - 05:48 AM

The bug is now solved. Sorry for disturbing, it was a simple NOOB mistake. I was sending the x and y position from both of the player... So the one which code was executed last was the one that steered the game. So actually it was not any lagg but I sent the wrong positions which made it look like lagg. When I fix it it worked perfectly well :mellow:
  • 0

#45 bobby2guns2003

bobby2guns2003

    Whateva!

  • New Member
  • 149 posts

Posted 17 June 2004 - 03:09 AM

Multi hosts and lag killer

Main idea:
Ok u have a client and more then 1 host. or use 1 host and send to only certaint areas



exampleA:
you have a host for each room or area. ( might reduce allot of lag )
you send a mplay message to the main host telling them your x,y then the host sends another message back to the client that sent the message telling him were he should be sending he messages.
so then he gets host2 so he sends his messages there about his x,y and this hosts sends them all the other players locations that are in the area/ player that are messaging this host.

exampleB:
ok so if you already know were each hosts location is and it will always stay the same u can do this:
if the x,y are between 1,1 and 100,100
mplay_message blah blah id would be host1 ( wouldn’t be called this would most likely be a number.. )
so now for the other areas u just do the same thing
if the x,y are between 101,101 and 201,201
mplay_message blah blah id would be host2 ( wouldn’t be called this would most likely be a number.. )
then the servers would send a mplay message back to the user that is sent it its x,y that tells the other players x,y ( the ones that send messages to that host so basically it would only be the ones in that area)


Don’t or cant have more then 1 sever for the hosts?

simple use plan/example2B but rather then having it send to 1 host
Do this:
mplay_message blah blah id would be host ( wouldn’t be called this would most likely be a number.. )
then depending on your x and y the server will send you the players messages that are within the range of x,y your in.

WHY?
by having the server/host only sending mplay messages to people within the area of u it technically should create less lag since u would only be getting update from players within your area.



P.S i might release an example of this if/when i complete it

Edited by bobby2guns2003, 17 June 2004 - 04:46 AM.

  • 0

#46 xenu

xenu

    Helpdesk

  • New Member
  • 113 posts

Posted 17 June 2004 - 08:19 AM

You can try uploading a session list through ftp or sql, but that isn't secure. A hacker could for example reverse-engineer your program and steal your password from it. Most secure is to use a php file to register your account and log in.
  • 0

#47 Highwaydog

Highwaydog

    GMC Member

  • New Member
  • 576 posts

Posted 17 June 2004 - 08:51 PM

well, for most games made with game maker which had such multi hosts, it wouldn't be worth the endeavour for a hacker - and even if it is, mostly there isn't much damage what could be caused...
but of course, it's not bad to have the php code :lol:

edit: lol, i wrote "need" instead of "have"

Edited by Highwaydog, 18 June 2004 - 04:24 PM.

  • 0

#48 bobby2guns2003

bobby2guns2003

    Whateva!

  • New Member
  • 149 posts

Posted 17 June 2004 - 09:51 PM

Multi hosts and lag killer

Main idea:
Ok u have a client and more then 1 host. or use 1 host and send to only certaint areas



exampleA:
you have  a host for each room or area. ( might reduce allot of lag )
you send a mplay message to the main host telling them your x,y then the host sends another message back to the client that sent the message telling him were he should be sending he messages.
so then he gets host2 so he sends his messages there about his x,y and this hosts sends them all the other players locations that are in the area/ player that are messaging this host.

exampleB:
ok so if you already know were each hosts location is and it will always stay the same u can do this:
if the x,y are between 1,1 and  100,100
mplay_message blah blah id would be host1 ( wouldn’t be called this would most likely be a number.. )
so now for the other areas u just do the same thing
if the x,y are between 101,101 and  201,201
mplay_message blah blah id would be host2 ( wouldn’t be called this would most likely be a number.. )
then the servers would send a mplay message back to the user that is sent it its x,y that tells the other players x,y ( the ones that send messages to that host so basically it would only be the ones in that area)


Don’t or cant have more then 1 sever for the hosts?

simple use plan/example2B but rather then having it send to 1 host
Do this:
mplay_message blah blah id would be host ( wouldn’t be called this would most likely be a number.. )
then depending on your x and y the server will send you the players messages that are within the range of x,y your in.

WHY?
by having the server/host only sending mplay messages to people within the area of u it technically should create less lag since u would only be getting update from players within your area.



P.S i might release an example of this if/when i complete it

well, for most games made with game maker which had such multi hosts, it wouldn't be worth the endeavour for a hacker - and even if it is, mostly there isn't much damage what could be caused...
but of course, it's not bad to need the php code 


? these multi host and loads are made for reducing lags. It dose this by only sending u updates from players who are in your area
example:
1,1 to 100,100 this is 1 area u only get the updates from players and objects in this area. '
how this works is you send your x,y updation to the server/host then all the players in
1,1 to 100,100 get all the player updations/mplay messages from this area sent to them. this way all the player from 101,101 to 202,202 wont be getting messages from player far away thus reducing lag.

like i said the way the server tells if the player is in 1,1 to 100,100 or 101,101 to 202,202 is by checking the other messages being sent if a message with the x,y between 1,1 and 100,100 the server sends messages from the 1,1 to 100,100 area to him.

there is other ways to do a method like this, and like i said if/when i get this done i will try to post and example unless some one else thinks they can handle this task.
  • 0

#49 Omega Metroid

Omega Metroid

    GMC Member

  • New Member
  • 1706 posts

Posted 18 June 2004 - 03:29 PM

Ok... apparently I lied when I said I wouldn't be making on for a long time.
Why? I registered.

Anyhow... I'm actually going insane trying to find this. I know it must be something simple I'm missing and its driving me insane! So here I am, making my first online game, I spend an hour reading and learning how to set up a decent master/slave connection (honestly, I'm also confused as to how to have more then two people per session but oh well.).
I set it up, and I've got my two spaceships (Hey, I'm thinking I ain't making no cruddy pong game!) and everything works out fine, you can see the movement and stuff but when I go to shoot, only one person sees the beam, making it totally unfair! Please, help me, how do I make newly created objects visible?
  • 0
The purpose of this board is to help others. Do your best to do so.

If you have a problem, first check the forums if there is already a topic. If not, think a moment if there would be a nice tutorial to help you out with your issue then look for it. If not, Gather all the details you can, and then make a post in the novice and intermediate boards. If the topic doesn't get resolved there, ask a mod to move it to advanced. Remember, we're all trying to help each other here.

#50 Highwaydog

Highwaydog

    GMC Member

  • New Member
  • 576 posts

Posted 18 June 2004 - 04:24 PM

yes, and ... why did you quote my posting then, bobby2guns2003?
it was a reply to xenu <_<
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users