PDA

View Full Version : Online Flash Games?



DrRobot
October 15th, 2007, 06:48 PM
So, how do online flash games work? like do they run off a domain? lets say I wanted a game where all you can do is just move a box around on a platform, or a topdown game or something. how do I make it online, or even use a LAN.

Is that possible, using the LAN?
but, back to the main subject, can you give me a brief idea of how it works? don't tell me you have to have a rpgram running 24/7 to keep it online...

Sirisian
October 15th, 2007, 07:30 PM
Flash multiplayer games work like any other multiplayer games. They use sockets to connect to a listening server or they connect directly to another person and create a person to person (P2P) socket connection. Do you know how to program proficiently (read as "more than one language")?

If you know C# or something it only takes a few hours to set up an online game server that clients can connect to.

There's many other things you can look into also. For instance, if you wanted other people to host servers then you can set up a simple php file and sql system if you have server access.
http://www.gpwiki.org/forums/viewtopic.php?p=106635#106635

What did you have in mind, any past networking experience? All I have to say is "send policy file, close socket connect again never use the same socket"

DrRobot
October 15th, 2007, 09:09 PM
alright, not anything in specific, just though i'd expand my flash knowledge.

but always thought it'd be fun to make an online flash game.

now, yea, i know abit of C++, alot of PHP, and AS2-3 knowledge.

not much networking experience by the way.

Sirisian
October 15th, 2007, 11:58 PM
Well C++ is fine. I just made a winsock client for work in C++ the other day and it was my first time using it. The only reason why I'm not so big into the whole creating it with C++ is that it's unnecessarily troublesome to beginners I guess. The .NET framework has socket classes which are very easy to use and beginner friendly.

PHP is useful if you saw my link. (disregard the point about passing in the IP, PHP gets your IP from the header packet).

AS3 is your best bet. Look into the documentation for the Socket class. If you do look into making a multiplayer game then here's some info on binary packets (AS3's socket class has a built in byte packet manager):
http://gpwiki.org/index.php/Talk:Binary_Packet
(just pay attention to the theory of serialization and how to optimize).

//edit Also if you get stuck or need some advice just PM me, or you can find me on IRC in irc.freenode.net in the #gpwiki channel good luck :)