goto binertia.com

Simple Flash Multiplayer Game Physics Test

2007-10-09

The flash gaming world is slowly moving towards AS3, which offers tremendous advantages both in speed and good design. The commercial gaming servers are coming out with their own examples, some of them do work already. Smartfox server is a good place to start. As far as development tools go Flash CS3 is out for few months now, while Flex 3 is in beta. One might find themselves in quite a mess and with no easy place to start.

This example is using AS3, for writing the code one can use tools such as ultra-edit, for FLA editing and compilation Flash CS3 is recommended.

There is a multitude of issues when developing real time multiplayer games and this example will illustrate a number of them. By no means is it perfect. Actually I'm currently aware of many bugs and pending design issues some of them are:
1) De-Synchronization of the game in a relatively short time. although it's still playable by both ends.
2) No score synchronization.
3) Bouncing should check area hit and do a proper bounce back, velocity of both objects should be considered then the player balls can bounce from each other.
4) Ship removal might be leeky, performance testing should be done to see if it's more beneficial to just keep them invisible all the time . no synchronization on removal.
5) Score saving would be great.
6) Ability to play as one player, and more then 2 players.
7) Smoothing out dragging and throwing the ball.
8) Special moves, shakes, power-ups, levels so on and on.
9) The ball should disappear for a time after it's killed.
10) Animations for destroyed objects.
11) Notification if the opponent disconnects.
12) Only 1 game at a time per server extension.
Open Physics Test in another window (you need two to play)

 

download physics source

Get two games connected on the server, first one connected will have the player on the left, you can drag and throw the ball it will bounce of ships (which spawn randomly) and of the walls. If you get errors just dismiss them. You can only destroy other objects when your ball turns white, that's after a few bounces.











games.nofate.com