Multiplayer Online Game

Started by
3 comments, last by Waterboy550 15 years, 2 months ago
I have made a few flash games and was wondering what it took to make them available online. The games are single player now. One game that I'm most interested in is a racing game. I would like to some day setup a sever to host a website where the game could be reached the users would then login with a user name and password. The server would then match the racers based on skill level. Kind of a Halo matching process. What websites or forums are out there where information about all these things could be researched? I basically am interested in how realistic is setting up a single player racing game to be a multiplayer online game? Thanks to anyone who can me with providing info or sources of information.
Advertisement
This is one of the best sites for those kinds of questions.

The problem is that multi-player networking is pretty tricky, because there are a lot of uncertainties involved. The latency between the players and the server is uncertain. Whether packets make it from the player to the server, or back, is uncertain. Who pressed the "brake" button first is uncertain, because there is significant transmission time between the different computers that are involved.

If you have learned programming mainly through Flash, and do not have a decent computer science background with systems programming experience, then you're going to have to read everything that is in the Forum FAQ, and are going to have to learn a lot of new concepts that might seem dumb, foreign, and generally in the way of getting things done.

I'm not wanting to discourage you, just setting expectations :-)
enum Bool { True, False, FileNotFound };
I have an extensive background with setting up servers for businesses. I am currently a junior in college and working on my Info Tech degree. I have programmed with and understand Java, VB, and SQL. I also understand many networking concepts, since I am focusing on network design. I just don't know what things I should be looking up, or researching. Mainly the things I have found on this forum are very specific to their own problem. I am just wondering if anyone can point me to some good resources or has info themselves.
As mentioned it can be difficult.

You'll want to begin by writing a java or VB.NET socket server. This is awesome practice with networking. The idea is that you'd have a port you'd be listening on. Then you'd have flash using the flash.net.socket

Here's the documentation on flash.net.socket with an example at the bottom.

So you'd have your client connect to the listening socket on your socket server. On your socket server you'd accept the connection and store it in a container. (Maybe a map/dictionary). Then you'd start receiving on that new socket. Flash does something special when it tries to begin a connection. It requires a policy file. The white papers for flash security is found here. Your socket server will receive an XML like string "<policy-file-request/>". At this point you'd need to send a policy file giving flash authorization to communicate essentially.

At this point your socket server must disconnect after making sure it sent the policy file. Flash will automatically connect back. It won't say anything this time so you might want to have flash send something like "connected" then your socket server will know that everything is ready.

That's all there is to it really. The most difficult part is getting your socket server set up.

Good luck.
Anyone have an success or experience using GFS server (Giant Flying Saucer)? This is a socket server that was developed for use with online games.

This topic is closed to new replies.

Advertisement