Hi everyone.
I've not posted here before so let me introduce myself. My name is Ian Macintosh and I've been programming in Pascal on and off for some 25 odd years on various applications, mostly business and mostly SQL based. I have recently started using FPC, specifically via Lazarus and it's rather nice IDE.
The reason for this post is that I need a game network library for my personal use. Having browsed over the various available libraries I don't find anything that quite fits the bill. Some are just plain too much, some are non free, many seem to have fallen into various states of disrepair, etc. The one that seems to almost fit the bill is ENet (http://enet.bespin.org).
I am not averse to writing it myself, and having searched quite thoroughly now, see that it is the most likely outcome. With that in mind, I've written up a requirements spec as a broad swipe at the problem. I am hoping that in reading the requirements, the list members may be able to possibly suggest an existing suitable library, or suggest additions, deletions or corrections to the requirements spec, or even display an interest in participating in the library. Any participation, even limited to purely constructive critisism would be appreciated.
Herewith the document itself which will obviously loose some formatting in the process. If you are not averse to seeing it in it's Google Docs form, the direct link to the source document is https://docs.google.com/document/d/1...DJy1gIGfY/edit
Please feel free to mail me directly with your comments, flames or critique, or here if you feel that the subject material suits the forum purpose.
Regards,
Ian.
-------
Game Network Library
Requirements
- Low level library
Allows other more complex functions to be built on top. Also allows others to choose to use only this part of the library if the higher functions are not suitable for their application.
- Low latency
- LGPL - Free Open Source Software without limitations. In particular, the ability to link it into any program, even a commercial one.
- Session based
Support session validation via callback and receive/transmit login or authentication details. Allocate a session ID to established connections, but allocate decreasingly minimal resources to unauthenticated new connections.
- Inquiry (without a session)
Support non-session data enquiry such as for example querying for a list of servers from a master list server.
- Unreliable data transfer
Not all data requires reliable transfer. For example voice data, if it arrives out of sequence or late or never, makes no difference.
- Reliable data transfer
Some data must be delivered. Support both reliable sequenced and unsequenced data packets.
- Bandwidth limiting per interface
To maintain low latency for all connections, do not exceed the interface bandwidth capabilities. Queueing is the enemy of low latency.
- Bandwidth limiting per session
A major factor in multi-user environments is bandwidth costs. In addition, individual bandwidth limits ensure that single sessions do not impact the experience of other connections.
- Single Port UDP only
Multiple ports are unnecessary. An extremely trivial overhead of a single byte will allow as many concurrent streams of data as are necessary.
- Non blocking when within bandwidth and queue limits. If bandwidth limits are exceeded, make the caller(s) queue, not the traffic. Not a major issue if the caller is multi-threaded. However when used correctly (ie, enquire remaining bandwidth details before creating additional packets) will not block. However, if used incorrectly the library will block the caller.
- Apply QOS to all data-grams - default time-critical but allow library user to set another default if required.
Optional
- Payload encryption
Provide some protection against simple man-in-the-middle traffic manipulation.
Per session details
Bandwidth
- Optional limits
- Statistics
- Total bandwidth
- Current moving average
- Query available bandwidth
Round-trip time
- Cumulative average
- Current moving average
Packet loss
- Cumulative total
- Current moving average
Types
- Standard unreliable data-grams (i.e. - UDP default)
- Reliable unsequenced data-grams
- Reliable sequence data-grams
Streams
- Multiple streams
Bookmarks