Jump to content


The Multiplayer Topic


  • Please log in to reply
286 replies to this topic

#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

#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

#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

#51 FlashbStudios

FlashbStudios

    Ultra Gamer

  • New Member
  • 28 posts

Posted 18 June 2004 - 04:35 PM

Is there any multiplayer example out there exept the one gamemaker.nl has?
because no offence pong sucks lol.
  • 0

#52 Bear

Bear

    GMC Member

  • New Member
  • 846 posts

Posted 18 June 2004 - 10:16 PM

;) Maybe this question doesn't belong here, but: Does anybody know where to get an example of a multiplayer game of more players than 2?
  • 0

#53 Tobs

Tobs

    GMC Member

  • New Member
  • 599 posts

Posted 21 June 2004 - 12:13 PM

STOPPPING LAG...
  • only sinc every few steps/when data changes
  • Host must have a decent speed
  • if an object if out of the view (and not a cont) then dont have it active
  • Less objects-higher speed. SO have one cont only active at any one time
try to think of any more
EDIT: oh yeh, im making a multiplayer tutorial for about 6 players. Its only a raceer, but it does help.
H3x

Edited by h3x, 21 June 2004 - 12:14 PM.

  • 0

#54 bobby2guns2003

bobby2guns2003

    Whateva!

  • New Member
  • 149 posts

Posted 21 June 2004 - 03:35 PM

STOPPPING LAG...

  • only sinc every few steps/when data changes
  • Host must have a decent speed
  • if an object if out of the view (and not a cont) then dont have it active
  • Less objects-higher speed. SO have one cont only active at any one time
try to think of any more
EDIT: oh yeh, im making a multiplayer tutorial for about 6 players. Its only a raceer, but it does help.
H3x

but just becuase objects not in view are not active you would still get player updates from players in out of your view so, using my meathod would most likly kill alot of lag.
  • 0

#55 matthewbot

matthewbot

    The Sockmaster

  • New Member
  • 258 posts

Posted 21 June 2004 - 06:19 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.

Right now, we have a topic in the GMsock Design forum about different ways to effeciantly handle MMORPGs here A couple of interesting things going on there, including my longest post ever. It might be of use to you.
  • 0

#56 Calle

Calle

    GMC Member

  • GMC Member
  • 689 posts

Posted 23 June 2004 - 11:12 AM

Hm... Do anyone have an example on listing up sessions throw FTP to those who are to lazy to/can't make their own engine?

I could probably do the GML thing but I can't set up a FTP server... Could anyone help me??
  • 0

#57 Gmaster

Gmaster

    GMC Member

  • New Member
  • 71 posts

Posted 10 July 2006 - 08:17 AM

I dont understand you at all, :)
Why you dont just make a Single-Player 3rd Person RPG in GM,
and then just write the Server Code in Visual Basic for Example.

I did this and it worked great. :)

Its much more Safe and its easier becasue there are lots of tutorials on the Web.

Why you dont try that guys? -_-
  • 0

#58 Juju

Juju

    GMC Member

  • GMC Member
  • 862 posts

Posted 10 July 2006 - 09:12 AM

Why you dont try that guys?

Because very few of us know how to program in VB. Why do you think we're using GameMaker? Because it's the easiest program available to make games in. If we knew how to code in VB, we would have made the entire game in VB... Engage your brain before you type.

I could probably do the GML thing but I can't set up a FTP server... Could anyone help me??

You have to setup an FTP server on the internet or on your home computer. GameMaker cannot (as far as I know) create an FTP session for you.

Does anybody know where to get an example of a multiplayer game of more players than 2?

No, you're right. That question doesn't belong here. Try posting that in the Advanced Questions and Answers, you're more likely to get a proper answer.

Please, help me, how do I make newly created objects visible?

Wrong question for the problem. First of all, check that your beam object is actually being transmitted from host to client. Then, check that the beam object is being created properly in the right place. After that, then there's something very wrong and you might need to change a substantial amount of code. Good luck, send me a PM if you have any more trouble.

bobby2guns2003, your Example A is not a "Multihost", but rather a number of different servers. There is no coordination between the servers beyond telling the player to move from one to another - which, by the way, wouldn't work very effeciently as you'd continually have to check IPs and make connections, making changes from area to area extremely slowly and precarious. Example B is also somewhat pointless. Why limit it to just a fixed, including bits which the player doesn't see? Why don't you only update what is in the player's view? When the player changes his X and Y coordinates, it's very easy just to create an if statement in the server to know when to send messages from players outside the area.
  • 0

#59 Cdaghostie

Cdaghostie

    GMC Member

  • New Member
  • 255 posts

Posted 13 July 2006 - 12:30 PM

http://www.pageresou...web/ftptut1.htm
theres a ftp tutorial right now im checking it out will make an example if i figure it out
you also have to have a ftp account somewhere (i signed up with tripod.com)

ok thats plain and simple

connecting to tripod
ftp.tripod.com
your username
your password


i have no problem connecting but how do i create a .bat file with it
im using Fastream

what did you use

Edited by Cdaghostie, 13 July 2006 - 05:05 PM.

  • 0

#60 Cdaghostie

Cdaghostie

    GMC Member

  • New Member
  • 255 posts

Posted 09 August 2006 - 07:02 PM

I've figured it out I think i just need someone to test it

What you need:
1. A multiplayer app on two computers to test
2.The app to have
a.SuperCrypt
so even if an idiot gets on your server they don't get the ip
b.U.Y.ftp
when you get the topic you need to right click on the dl link and save as
so you can connect and upload the file

3. a webhost that supports ftp
ex. tripod

heres a site showing the commands
ftp commands

there you go

if the person is a host
decrypt the password and username from a file
download the current server list
create a file that has the ip
encrypt the file delete the ip's file
edit the server list with the game name and the encrypted ip
delete the file on the server
upload the file

if the person is joining
decrypt the password and username from a file
downlaod the current server list
let the user pick what game he wants
read the ip of that game and decrypt it
connect to that ip and delete the file

bam online servers

it should work no problem *Solved* (hopefully)

edit: It'd be impraticle to use this for anything else really only for hosting
it would give you a
webserver > server > client type thing
you couldn't do webserver > client except For PATCHES download (thats if the uyftp can check to see if a file exists)

Edited by Cdaghostie, 09 August 2006 - 07:07 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users