[gameprogrammer] Game Network "Library" - Ideas / Comments

Hi all,

This list have had some good ideas and suggestions while I've been subscribed, so I wanted to see what you guys think of my up-comming project - if i dont scare everyone off with this long post :).

Actually it is two different projects; first one is to create a game network library and the other is to use this (simple 2d action multiplayer game). But first the library. Which isnt really a library, but a tool for generating sourcecode. The main goal is the learn networking within the game context - in my case realtime shooters. If its usefull it will be released and I begin on my game soon after :)

My idea is to create a simple layer which handles much of the nittygritty details of communication. But its only ideas and concepts right now. Everything is based on a packet-defintion file, which is a c-like file describing the network packets the game uses. The file is then used by a parser which generates c code; an api to the packets.

The philosophy is that cpu/memory is alot faster than network - so we can spend (some) time on reducing the size of the data we need to transfer.

The main features:
* Data can be reduced in size. Eg. you only need 4 bits for a value, only 4 bits are transferred, saving 4 bits.
* Data can be compressed. (optionally)
* Only diffs are transferred (optionally)
* Uses UDP but gives you a "reliable" connection too (best effort)
* Everything is hidden in functions to read/write packets. Application shouldn't know about the inner works of the library.
* Bandwidth control, Packet assembly/fragmenting
* Support channels (either reliable or unreliable)
* Makes it possible to split up data. Connections is either reliable or unreliable.
* Gametime syncronization (trying to get a "global clock")


Think of the packet definition file as a headerfile with structs with some extra options. Eg. you can specify that the int you're using only uses 9 bits, that data-range is from 10-20, or stuff that might help compressing the data. However the application programmer should not need to worry about datacompression or if data are transfereed as diff.

Then it will provide you with ReadPacketTypeA() but you can still get the raw data and use readUByte(), readUInt32 .. Other features that might be good, is to measure how good a connection is - so the gameserver can send out updates more often the clients with good connections than slow modem users.

In order to test my work, I'll need at testcase, which im also searching for. (BZFlag is my only candidate currently)

Any suggestions, comments or advise?

Thanks for your time.

- dennis


--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: