PDA

View Full Version : Multiplayer Game Solutions



iceflyin
August 2nd, 2007, 08:02 AM
I was wondering if there was any free/cheap backend solutions for multi player flash games.

I think I could run turn-based games with amfphp and MySQL memory tables. Although... Rather inefficient with the constant calls to check for new data with the way I was thinking. :/

Is Red5 is just designed for Streaming music and video? Does Flash Player 9/AS3 have the capabilities, and is there a server program good enough to get down to around 100ms response times for games??


Getting 1kb of data from MySQL:
AmfPHP:
Total time: 181 ms
Encode time: 1 ms
Send/receive time: 180 ms
Decode time: 0 ms
Network time: 159 ms

Total amfphp time: 21 ms
Framework time: 15 ms
Amf decode time: 0 ms
Service include time: 0 ms
Service call time: 5 ms
Amf encode time: 1 ms

eudora
August 2nd, 2007, 11:26 AM
Actually I would love to know this as well...

On a side note.. I have written up the client-server codes on java which I can run locally successfully. However if I upload it to my server, the port is blocked.. does anyone know what I need to do? I think I need to open up the ports which I want to use? Is this done in Apache setup?

gamera
August 2nd, 2007, 11:56 AM
red5 is the right choice. it handles sharedobject on remote server. so it's perfect for multiplayer games.

iceflyin
August 2nd, 2007, 04:15 PM
Do I need to get a dedicated server to run Red5?

I don't think I can install Red5 on my shared server at BlueHost.

gamera
August 2nd, 2007, 04:55 PM
you can check the required stuff on red5 site.
basically you need java runtime on your server.

sangackt
August 3rd, 2007, 10:56 AM
I haven't really looked into red5 but my first thought was that you could try making your flash use XMLSocket. So then you'd have to write your own server in whatever language you can.

You could even go as far as writing your server to communicate with a SQL database if you needed to store game info.

iceflyin
August 3rd, 2007, 03:48 PM
My shared host doesn't really support anything that I could code a game server in. No java runtime, and no ability to install my own stuff.
http://www.bluehost.com/tell_me_more.html

I think my best option is VPS/Red5 if I build some multiplayer games quality enough to launch. I wan't the fastest sharedObject possible! I don't care about any of the other features!

Sirisian
August 3rd, 2007, 08:37 PM
I coded my game server in VB.NET using asynchronous sockets. Works the best for lots of players. C++ also works well. Just remember that you need to send the policy file on a different socket then the one you connect and play the game with. Took me a day to realize that. My implementation is a bit overkill though since my game is real-time.

For hosting, I just use an extra computer I have next to me. Works well.

If you are shooting for tons of players and know C++ well, then I recommend doing that. The only reason I'm using VB.NET atm is because of the GUI since I don't want to make another client to communicated with my server.