View Full Version : Multiplayer?
Pico
July 29th, 2009, 04:07 PM
hi i'v been looking for guides and tutorials for making a multiplayer game in plash(you know online like maple story:pir:,2moons,etc..)
and i didnt found one so i want to ask how can i make a multiplayer game thet i can see outher players in it (like maple-exactly the same,dont worry about coding the walking and all.all i need is the multiplayer making)
so please help me...
~Pico:piercings:~
SparK_BR
July 29th, 2009, 04:30 PM
look for something called sockets
you can do anything with socket connections
there are good socket tutorials in the java.sun.com
and in your flash help files (open flash and press F1)
i had a example of a multiplayer flash game somewhere...
http://www.kirupa.com/forum/showthread.php?t=327381
- somewhere in that thread - (forum doesn't let me attach same file twice)
Pico
July 29th, 2009, 04:40 PM
in the teared there is the multiplayer game or...?
can you find your multiplayer game?
BoppreH
July 29th, 2009, 04:54 PM
Making a multiplayer game is very hard. There are lots of frameworks that make the job easier, though.
What Spark suggested is a built-in tool to establish connections between computers, which is the base for multiplayer games.
From here, you will have to either use one of those frameworks or make more specific questions (like "what's the best way to synchronize the players?").
Pico
July 29th, 2009, 05:01 PM
i just wants something like thet:
http://www.youtube.com/watch?v=8wsu5ml4OGw&feature=channel
SparK_BR
July 29th, 2009, 05:18 PM
you really didn't read the second page of the thread did you?
here's the attachment i told you
http://www.kirupa.com/forum/attachment.php?attachmentid=50056&d=1243974085
it's quite simple, i made it in 1 or 2 hours
Pico
July 29th, 2009, 05:23 PM
i saw it but i cant use it it isnt working and i have flash cs4
its like doesnt connect the game...
SparK_BR
July 29th, 2009, 05:29 PM
http://www.kirupa.com/forum/attachment.php?attachmentid=50066&d=1244084000
this one is better
and did you run the .bat before pressing ctrl+enter ???
you need the server to be running to connect somewhere
Pico
July 29th, 2009, 05:48 PM
yeah now its all good thx alot!
your awesome man!
Pico
July 29th, 2009, 06:03 PM
hi but why cant i get into it from the swf file?
SparK_BR
July 29th, 2009, 10:09 PM
hmm... dunno, try changing the security config from your flash player, or for the .swf, check firewall...
really dunno.
Pico
July 30th, 2009, 05:41 AM
Edit: ok nvm i changed th esettings LOL-thanks anyway!
*how do i change it?
*here is a pic about the problem:
http://img123.imageshack.us/img123/3310/problemi.png
http://img123.imageshack.us/i/problemi.png/
Pico
July 30th, 2009, 06:24 PM
PROBLEM:
it cant contect to my outher friend and outher computer...
WHY?
SparK_BR
July 30th, 2009, 07:08 PM
add his IP to the try list in the second frame
and read the code, there are comments averywhere!
Pico
July 30th, 2009, 08:01 PM
i tried like this:
_root.hostList = new Array('localhost','1234.123.12.1'); //put ips here to tell the clients where to try to connect
_root.autoDetect('hostList',['192.168.0','192.168.254','10.1.1','10.0.0']);
and i tried this too:
_root.hostList = new Array('localhost','1234.123.12.1'); //put ips here to tell the clients where to try to connect
_root.autoDetect('hostList',['1234.123.12.1']);
Both didnt worked
and "'1234.123.12.1'" is a random numbers-as a unreal IP..
SparK_BR
July 31st, 2009, 12:14 AM
you must put YOUR ip OR the ip of the machine that double-clicked the .bat
to know your REAL ip use this web site: www.whatismyip.com
then you put ip there and send the .swf for your friend
make sure you forward the port 31337 of your router's firewall to your computer
that's it
or use hamachi if you don't know how to open your firewall
but then your hamachi ip must be in the list too
Pico
July 31st, 2009, 06:37 AM
but i did it and it didnt worked:
_root.hostList = new Array('localhost','1234.123.12.1'); //put ips here to tell the clients where to try to connect
1234.123.12.1 is an ip i made up but i puted the real ip in my game..
Gnoll
July 31st, 2009, 07:01 AM
and you have ensured you have port forwarded correctly? Go here: http://www.canyouseeme.org/ with your server running and enter the port you chose.
Good luck,
Gnoll
Pico
July 31st, 2009, 07:25 AM
i cant choose a port ,why?
it says :
"Error: I could not see your service on IPnumber on port (5631)
Reason: Connection refused"
it doesn't says "IPnumber", it says my ip number and not "IPnumber"
Gnoll
July 31st, 2009, 08:16 AM
You need to configure your router to forward that port to your internal ip (What ipconfig gives you eg. 192.168.1.x, 10.x.x.x or 172.16-30.x.x)
http://portforward.com/ has many tutorials for many routers. It is TCP if you get to that stage to.
Gnoll
Pico
July 31st, 2009, 08:48 AM
what i have is: RT73 usb wireless
an di didnt get yet what to do with it...
just cant you say how to do it instead of directing me to some sites?
Gnoll
July 31st, 2009, 08:56 AM
Uhh well it differs for each router (Why I gave you that site, it has common routers with image tutorials etc to), first find out what your routers ip / user / pass is. It will be written on the bottom of it most likely, and you can also find out the ip by doing ipconfig and it will be your gateway. Enter this ip into your browser and login. Somewhere in your router there will be a Portforwarding area or Firewall etc. You need to add that port to your internal ip.
Gnoll
Pico
July 31st, 2009, 09:30 AM
ok so i found out my router Ip,user name and password now what?
doomtoo
July 31st, 2009, 04:01 PM
This is exactly what I was looking for and should be very helpful in the very near future!! Thank you!
Out of curiosity, what would a possible solution to having many people under the same WAN IP connecting with people on the internet??
Like in a LAN gaming cafe- all the computers are connected to the internet from the same IP, but can all connect to a internet server and play with people there?
And Pico, I'm pretty sure it's like setting your router up for port forwarding for torrents. Look up that- for mine you type the IP of the router into your browser URl (mine: 192.168.2.1), then go to virtual servers, and set the router to forward whatever the internal LAN IP is for a specific port.
you can go run->cmd, then type in ipconfig to see what your internal LAN IP is(if not connected directly to the modem).
You have two types of IP's- the internal LAN IP, distinguishing each of your home computers from each other, and your internet IP, which all your home computers share.
When a computer wants to connect to your computer they need to know your internet IP and the port to connect on, which sends them to your router. Then you have to tell your router which port you want forwarded, and to which internal LAN IP/computer you want the connection forwarded tol.
Pico
July 31st, 2009, 04:49 PM
ok i'v got my LAN IP,where do i put it and how do i put a port?
Gnoll
July 31st, 2009, 09:09 PM
Yes doomtoo, each client inside that lan would be assigned a port which your server will connect to automatically, on top of that IP so there are no issues there.
Pico look on that site I linked, if your router isn't there, there are many others and you might be able to figure it out.
I can't just explain it,
Gnoll
crucifix
July 31st, 2009, 10:53 PM
Pico how did you fix your flash player cause mine wont let me connect from the swf and i cant figure out the settings?
doomtoo
July 31st, 2009, 11:37 PM
Pico,
Yeah, when you go to your routers page in your browser (to get to it it's specific for whichever router you have) look for virtual servers or port forwarding. Look at the torrent port forwarding things, they have pretty much every router and a walkthough on how to do it for each one.
(like gnoll said)I googled "how to do port forwarding" and this was the first page:
http://portforward.com/
Gnoll, what about games like CS where you don't need to mess with port forwarding? I know a lot of things use TCP/IP, have you ever seen any AS3 programs using that? I would think it would be the same, but never had to mess with port forwarding with online games. I wonder how they do it, although I'm sure sockets might be much easier to implement..?
Gnoll
August 1st, 2009, 12:32 AM
AS3 can only use TCP/IP Sockets currently, seems CS uses both UDP and TCP/IP. You only need to port forward on the server anyway, if you make your own CS server you will still need to port forward. :)
Crucifix what do you mean? It could be Flash Players security settings, the server will need to be giving you a crossdomain.xml if it isn't local.
Gnoll
Pico
August 1st, 2009, 05:23 PM
i didnt found what i need in there...
if ithelps i have :
Edimax EW-7318Ug router
====================
Edit:
i heared abuot a smart fox server-how can i make games there?
doomtoo
August 1st, 2009, 06:56 PM
Gnoll,
Interesting, good to know.
It'd be nice is there was some way around it, for instance to create a chat program where one person creates a chat room, and a bunch of other join,and don't need to ask the hosted sever for anything but verifying the usernames (and not having to open a port).
I'm going to be looking into a lot of multiplayer stuff in the next few days after I get my up to that point in the current project, so your example will help a lot!
Pico
August 1st, 2009, 07:28 PM
wtf man?!
why are you repsonding like thet?!
you can tell him this on PM...
if you have answer for me you can post something here dont sapm man..
and to my question AGAIN(because of this doomtoo):
1.i didnt found what i need in there...
if ithelps i have :
Edimax EW-7318Ug router
2.i heared abuot a smart fox server-how can i make games there?
TOdorus
August 1st, 2009, 08:44 PM
wtf man?!
why are you repsonding like thet?!
you can tell him this on PM...
if you have answer for me you can post something here dont sapm man..
and to my question AGAIN(because of this doomtoo):
You might wanna cool it a bit. This is a forum of people having a common interest helping each other out, challenging each other and generally bieng nice to each other. It isn't an answergenerator at an individuals leisure. Claiming that you own a part of it by posting a thread is a bit farfetched. The forum is a community and by helping one out you can expect help when you need it and not by personally assaulting someone that does show gratitude for the help he's getting.
1.i didnt found what i need in there...
if ithelps i have :
Edimax EW-7318Ug router
2.i heared abuot a smart fox server-how can i make games there?
Thanks to your previous comment I'm pretty inclined to say: Google (http://www.google.com/) instead of gotoAndPlay (http://www.gotoandplay.it/_articles/multiplayerCentral/)
Gnoll
August 1st, 2009, 09:02 PM
wtf man?!
why are you repsonding like thet?!
you can tell him this on PM...
if you have answer for me you can post something here dont sapm man..
and to my question AGAIN(because of this doomtoo):
1.i didnt found what i need in there...
if ithelps i have :
Edimax EW-7318Ug router
2.i heared abuot a smart fox server-how can i make games there?
Sorry that someone else with more constructive, non repetitive questions came in. I feel much more obliged to discuss with them. You have been given the answer to the first question many times already. :zipper:
Gnoll
Edit. Doomtoo even tried to help you in his previous post and reinforced what I was saying. Be grateful and try something yourself, none of us have your router so we can't tell you how to do every step.
Pico
August 2nd, 2009, 08:11 AM
no i didnt have!
in this site there were no guides for this type of router.
and i dont know where to change it cause like i said IN THE OUTHER SITE THET YOU CAN CHOOSE A PORT ITS NOT WORKING TOO!
so WHAT TO DO?
and how can i make games with smartfox server?
Gnoll
August 2nd, 2009, 08:22 AM
With smartfox server you still have to forward ports so no point going there. Look through your routers user manual or actually try to find where to port forward for it.
Gnoll
TOdorus
August 2nd, 2009, 08:41 AM
And now we've come full circle. Again.
So before you ask the same question and get the same answer yet again, try something yourself Pico. It isn't like there's only one site with router information or tutorials on smartfox. You found this place, I reckon you can find those others too.
Pico
August 2nd, 2009, 08:57 AM
i did like in the guide:
i wrote my ip adress in the browse line,pressed on Nat tab,then i choosed Port Forwarding,and i choosed in 'type' tab "Both"(options are:TCP/UDP/Both),on port range thing i choosed 3389-3389,and in Comment i wrote "GameIp",in private ip i kept it empty.
and its still not working cuse i checked in the progren thet you get from this site you gave me..
but if it did changed then where do i put this port in the game file?(Where?)
Here is a PIC:
http://img205.imageshack.us/img205/4875/imagezwr.jpg
Gnoll
August 2nd, 2009, 08:58 AM
That looks right, put your Private IP in that box now, then press add, it should then appear in the "Current Port Forwarding Table:" at the bottom. Then press Apply
Gnoll
Pico
August 2nd, 2009, 09:07 AM
i did it but its not appear in the "Current Port Forwarding Table:" at the bottom....
what to do now?
Pico
August 2nd, 2009, 02:17 PM
i dont get it...
i found out thet the problem is something with the port range and i tried to search everywhere and i didnt found the currect port range...
i have a Windows Xp system(i found something about 3389-3389 and it wasnt currect-it was to Windows 2000 too...)
Help me please...
Gnoll
August 2nd, 2009, 06:47 PM
Theres nothing wrong with that port range, it might not be right for your app but it should still appear in the table at the bottom.
Gnoll
sada
August 3rd, 2009, 05:40 PM
here is a great discussion.thangs
SparK_BR
August 4th, 2009, 07:36 PM
the server i gave you uses the port 31337 by the way...
you should try putting that port there
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.