sneakyimp
04-04-2007, 01:35 AM
I am working on what I hope becomes an excellent starting point for Flash developers who want to make a multiplayer game. The basic idea is that I want to create a project which is easy to set up that provides the basic building blocks for communications between online users via Flash's XMLSocket connection.
Minimally, it would consist of a socket server written in PHP (intended to run as a daemon) and some Flash and Actionscript components to connect to the script using XMLSockets or perhaps even binary sockets.
What is the best format for the Flash part of this project? Should I create a flash file or should I create some Actionscript includes that dynamically create login elements, windows, etc?
Most multiplayer games start with a game selection interface which is much like AIM or ICQ or some other chat program. For instance, my sample client currently requires 3 frames: login/nickname selection, game view and selection, and then the game itself. As it stands, my flash project contains quite a bit of Actionscript...should I move this to an Actionscript file? Is it possible to create a component that can simply be dragged into the library of an empty flash project?
A few different options occured to me:
1) Create a Flash file with all the code in it including a chat client to find games. Users would put their game starting on Frame 4.
2) A Flash Component that can be dragged into an existing game file. This would make it a lot more difficult to implement the game finder stuff because it would all have to be created dynamically but it might be more desirable because It might be more easily incorporated into some existing user's flash file.
3) A flash movie that users can put in their existing movie that creates global objects that communicate with the server.
I'm sure there are other questions I'll have but this is at least something to start with.
Minimally, it would consist of a socket server written in PHP (intended to run as a daemon) and some Flash and Actionscript components to connect to the script using XMLSockets or perhaps even binary sockets.
What is the best format for the Flash part of this project? Should I create a flash file or should I create some Actionscript includes that dynamically create login elements, windows, etc?
Most multiplayer games start with a game selection interface which is much like AIM or ICQ or some other chat program. For instance, my sample client currently requires 3 frames: login/nickname selection, game view and selection, and then the game itself. As it stands, my flash project contains quite a bit of Actionscript...should I move this to an Actionscript file? Is it possible to create a component that can simply be dragged into the library of an empty flash project?
A few different options occured to me:
1) Create a Flash file with all the code in it including a chat client to find games. Users would put their game starting on Frame 4.
2) A Flash Component that can be dragged into an existing game file. This would make it a lot more difficult to implement the game finder stuff because it would all have to be created dynamically but it might be more desirable because It might be more easily incorporated into some existing user's flash file.
3) A flash movie that users can put in their existing movie that creates global objects that communicate with the server.
I'm sure there are other questions I'll have but this is at least something to start with.