(continues from page 2)
SERVER SIDE INTEGRATION & MODULARITY
Server side integration is a very important aspect of web-based games: different informations about the game status need to be exchanged between the client and the server to make games richer : from basic highscores tables to more advanced features like saving custom made levels, all these operations cannot be achieved without using a bit of server side communication.
In DickDynamite we implemented a lot of client-server interaction to manage the user maps, the LevelEditor and the Arena.
With the latest Flash Mx, server side integration is achieved easily: the new LoadVars() object makes it very simple to send and load data from a server, while for more complex data exchange you should try the Flash Remoting Components.
In DickDynamite all server work is done using PHP, a very popular oper-source scripting language
that is specifically designed for the web.
Its syntax is very C-like and so it resembles actionscript in many ways. In our future articles on server side interaction we will use samples written in PHP: they will just serve as a guideline to learn the "idea" behind it, so that you can translate them into other languages as well.
Modularity was another important issue: the game was divided into 3 main components that
interact together.
1) Game Engine (XML parsing, game logic, AI, server side comm.)
2) Media Assets (Graphix, Sound fx, Music)
3) Dynamic Data (game levels, user status, statistics)
As you can see these 3 blocks are furtherly subdivided into modules that take care of a specific task: these modules are the "building blocks" of the game (more generally, every game should be broken into smaller elements) and they should be kept as a separate entities.
Pic 3: a custom map generated
with the LevelEditor.
That's all for now, this was just a tour in the features that we implemented in DickDynamite and that we would like to share, so stay tuned for next articles to come. |