Sign in to follow this  
Wave

Multiplayer Module

Recommended Posts

I had this idea to implement a module system in which you can "build" your own network architecture within some limits by replacing/altering this module. It would be like a way to customize the network part to the current game your working with, instead of melding it with the game. Obviously each gametype (action,strategy) would require a unique module and each unique game some small alterations. The update functions for example would be unique for the game such as update(X,Y,X). The module would handle stuff like server/client message packeting and sending a la Unreal or Quake or Warcraft3. The idea is hard to explain. What I wounder (before I waste to much work on it) is if it could work. Can you make a system like this, has anyone done so for their games? In the end (in teory) if it works I could pick a net-module that mimics (let's say) quake3 and my FPS-game could quite easily implement a series of commands to control and upate each object so it runs just like Q3 in multiplayer (assuming someone made a module that mimics Q3's multiplayer structure) How separate can one make the network part from the game? Would this same thing be possible for strategy games like starcraft? What's your thoughts on this?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Wave
I had this idea to implement a module system in which you can "build" your own network architecture within some limits by replacing/altering this module. It would be like a way to customize the network part to the current game your working with, instead of melding it with the game. Obviously each gametype (action,strategy) would require a unique module and each unique game some small alterations. The update functions for example would be unique for the game such as update(X,Y,X). The module would handle stuff like server/client message packeting and sending a la Unreal or Quake or Warcraft3. The idea is hard to explain. What I wounder (before I waste to much work on it) is if it could work. Can you make a system like this, has anyone done so for their games? In the end (in teory) if it works I could pick a net-module that mimics (let's say) quake3 and my FPS-game could quite easily implement a series of commands to control and upate each object so it runs just like Q3 in multiplayer (assuming someone made a module that mimics Q3's multiplayer structure)

How separate can one make the network part from the game? Would this same thing be possible for strategy games like starcraft? What's your thoughts on this?


Yes, this is certainly possible. You'll probably want to settle for one of the more popular cross platform networking libraries that feature easily configurable support for custom protocols and then integrate a scripting engine into this library, so that you end up with a cross platform networking library that can be easily customized by using scriptable protocol implementations.

So, I would recommend to look into the "Torque Network Library" and some lightweight scripting language such as Lua or if you prefer ECMA features/syntax: Nasal.

The TNL is an extremely poweful library and also very cross platform portable, you might even end up wanting to use it without any scripting engine, it should be very possible to simply use XML based protocol specifications if you don't mind linking to an XML parser library.

However, if you do settle for a scripting language such as lua, you will want to look for an implementation that's either very performant or you might have to add some sort of pre-compilation for your scripts, so that the actual protocol implementation isn't slowed down because of the scripted approach.
The easiest solution for the latter would be to simply take any of the cross platform open source serialization libraries and automatically (re-)serialize any scripts that were modified (i.e. timestamp changed).

Ultimately, your applications would then only need to link to this scriptable networking library, whereas you can easily customize the actual protocol by editing a scripted module file - no recompilation needed.

Such a hybrid networking/scripting library may also be useful for several other projects that require support for multiple dynamically modifiable protocols.


good luck

Share this post


Link to post
Share on other sites
Thanks for the reply. It'll take some time to finnish =) but I'll give it a shot. The hard this is that I don't think I can start small. Seems like a lot of work need to be done until I can get even a very basic runnable demo.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this