I have created a turn based game. How can I make it multiplayer through the network? Like, player one on his computer can play with player two on her computer over the Internet? Do I have to write some kind of CGI or ASP to make it work?
Printable View
I have created a turn based game. How can I make it multiplayer through the network? Like, player one on his computer can play with player two on her computer over the Internet? Do I have to write some kind of CGI or ASP to make it work?
You can use XML sockets, but you'll need to build a socket-server for that (usually built in java)
You can also use PHP, ASP or CGI with a database for the server-side. Both options work well, though the socket server can be more efficient because it doesn't have to use a polling system.
Making a multiplayer game is a big step though, especially if you don't know anything about server-side scripting. I do know quite a bit about server side scripting, but it still took me several months to get a well-working multiplayer game.
Olorin
ive always wanted to do this but i have no idea how to do it. It would be really cool to make a "idiots" tut on how to do it.
Oh, I see. so, its XML hu? Is there any good web sites that might talk more about this? or any good books I could buy?Quote:
Originally posted by Olorin
You can use XML sockets, but you'll need to build a socket-server for that (usually built in java)
You can also use PHP, ASP or CGI with a database for the server-side. Both options work well, though the socket server can be more efficient because it doesn't have to use a polling system.
Making a multiplayer game is a big step though, especially if you don't know anything about server-side scripting. I do know quite a bit about server side scripting, but it still took me several months to get a well-working multiplayer game.
Olorin
Flashkit should have a tutorial on "idiots XML with socket-server". I only know how to read a XML into flash, but I dont know any thing about XML and socket-server.Quote:
Originally posted by gasattack
ive always wanted to do this but i have no idea how to do it. It would be really cool to make a "idiots" tut on how to do it.
Is it hard to make it RPG able on the web with a socket-server? Like Altima Online? or what ever that game was? So every one can play! Man, that would be cool to do it in Flash.
Yes, it's possible to do a multiplayer RPG in flash, I'll start making one after I finish some other things... But it's not easy, actually, it's very hard to do.
Oh, and I said you could use XML sockets, I never mentioned using XML. Just send normal data through the XML socket, that's a lot faster.
However, if you want to set up a socket server, you'll need to have a dedicated server (expensive! if you're just doing it for fun) so maybe using PHP might be a better idea (it's also a lot easier to do the sever side in PHP)
Olorin
Hmm.. I c. My friend and I go to the same university. I program and he loves drawing 3D animations. So, we are talking about making a online Isometric game. Any way, It would be cool if you could show a multiplayer RPG in flash! :)Quote:
Originally posted by Olorin
Yes, it's possible to do a multiplayer RPG in flash, I'll start making one after I finish some other things... But it's not easy, actually, it's very hard to do.
Oh, and I said you could use XML sockets, I never mentioned using XML. Just send normal data through the XML socket, that's a lot faster.
However, if you want to set up a socket server, you'll need to have a dedicated server (expensive! if you're just doing it for fun) so maybe using PHP might be a better idea (it's also a lot easier to do the sever side in PHP)
Olorin
I would like to learn more about this. I'm making an RPG, and I want to make multiplayer battles possible. It's tile based game, but that doesn't matter since you don't actually go around the game world online, but you can nly battl people online. Olorin, please tell me where you can find tuts, help or any information on this kind of stuff. I basically just want to know how to write and read from a file, which is the only way I know to make a multiplayer game right now, but please share any information you know that I don't! Thank you!
Learn PHP: http://www.php.net
Learn how to use MySQL: http://www.mysql.com
That's the way I did it...
I already knew perl, so php was easy for me, but if you're already a good programmer, php shouldn't be a problem.
Olorin
They made the coolest network game I have seen:
http://www.hypraspeed.com
TB
Oh, one more tip: Don't use a file to write the data to! Basic textfiles can only be open by one player at a time. If you have lots of players who want to write data to the file, some of the data might get lost because of this. It's much better (and easier) to use a database.Quote:
Originally posted by dJide
I basically just want to know how to write and read from a file, which is the only way I know to make a multiplayer game right now, but please share any information you know that I don't! Thank you!
Olorin
Thanks for the help! How do databases work though?
follow the two links I gave, there's loads of info there on how to get data into and out of a database. It might take a couple of days/weeks before you've got the basics down, but once you know the basics, it's all pretty easy from there.
Olorin
I have a question, how about learning the JAVA part for the socket connection? Where do I learn that part?Quote:
Originally posted by Olorin
follow the two links I gave, there's loads of info there on how to get data into and out of a database. It might take a couple of days/weeks before you've got the basics down, but once you know the basics, it's all pretty easy from there.
Olorin
http://www.wdvl.com is a great site to learn about almost any web based programming language. Java is there too. But unless you're already skilled at some other programming languages, I'd stay away from Java, cause it gets pretty complex quite soon. I spent about 2 weeks trying to do stuff in Java, and didn't really get far. With PHP, you can write a script that sends and retrieves data from a database the first day you work with PHP. (well, that was my experience...)
Also, remember that you need to have a dedicated server for socket connections. A normal web-account doesn't support open sockets, because it's a bit of a security risk (hackers).
Olorin
Hi
I'm not sure how aware you are of IRC, but it allows users to join rooms, send messages to rooms (groups of people), or to individual people.
What I've got is a gateway, which simply bounces connections from flash, to an IRC server, and converts the messages a little to bit to allow flash to connect to IRC.
I'm currently converting the wonderful bomberman game (created by supertomato.com) to run on irc servers.
As IRC servers are free, and hugely stable I'm putting all my energy into creating games + chats for it.
You can download several clients and the gateway here:
http://www.flashnexus.com
The clients are not well coded. It was a 'learn as you go along'. However I have knocked up a library of code, which will help you develop stuff. You can download that here:
http://www.flashnexus.com/newLibrary.fla
Any probs you can email me! Alternatively, I will probably be on the server most of the day, if you would like to try the client :)
Steve
Question: How in the world can you make a Flash multiplayer game with in IRC server? I never heard of it.
Tnx.
hehe, I see your point at first, but lemme try n talk you through it. I'll use bomberman as an example.
Screen 1: Enter username/password details also rules/how to play are on this page.
Screen 2: Log you in, you will see a 'connecting' screen. Meanwhile the flash sends your login details to the server, and auto joins a #lobby room.
Screen 3: The lobby room. Here you can chat with people, banter, challenge them to a game. On the left, you will see a list of buttons, these are games people are in and waiting for more users. To find out if the room is a game, or a normal chatroom, i make each game channel start with a #bman-
On this screen you can also 'host' a game. By pressing this button you will /join #bman-myNick
Once 3 other people have joined.. i +I the room, to stop anyone else joining.
Screen 4: This screen shows you which coloured character you are. When the host is ready to start a message is sent to the channel. EG HOST,READY
The clients will receive this message, and start the game.
Screen 5: the game screen. After each keypress a message like: MOVE,MYPLAYER,xCord,yCord,Action will be sent to the channel. Each client will process this, and change the display accordingly.
I've not gone into too much detail, I will make a simple game example when I get time. Untill then I will finish the edit of bomberman, and show you.
Steve
Hmmm.... so if I understand correctly, Flash posts variables into the irc chat room, and retrieves the variables others post there?
If it works like that, it would be a REALY kewl option instead of xmlsockets.