Hello all!
I have recently endeavoured to improve my networking system, primarly to make ti more accesible to the end users, the majority of who’m want to keep things simple, otherwise they’d code their own!
So, i present to you my new concept:
I already have a working barebones demonstration, which i will document, and then make more logic brick friendly before release!
Many thanks to all that helped (Moguri, fault finding!!)
Some networking info relating to FPS games
- http://developer.valvesoftware.com/wiki/Latency_Compensating_Methods_in_Client/Server_In-game_Protocol_Design_and_Optimization
- http://gafferongames.com/networking-for-game-programmers/what-every-programmer-needs-to-know-about-game-networking/
- http://gafferongames.com/game-physics/networked-physics/
Many of you will notice that i have many interests in networking in Python, and i recently stumbled across some interesting articles with regards to structure of networking in today’s gaming world. I won’t go into too much detail about networking in blender/python, that’s for my tutorial. However, here is an overview:
Networking could be described as data transfer. I prefer to describe it as:
dropping marbles down a small drain pipe with addresses written on them.
Firstly, i’m not mad. What i’m trying to illustrate is that the majority of issues with networking relate to bandwidth and connection speed, not actual coding. Of course, this statement is not entirely correct, as speed can be increased with the right coding techniques. But you see my point. It was only recently that i sat back and thought what methods are there for networked games?. There are many, answered the little voice inside my head. However there are actually very few solid concepts, which i will illustrate here. There are three main types of networking for games;
Server router
Server processor
P2P
I am working on the former, because i would argue that it best suits the capabilities of the Blender Game Engine. However, many games use the second option. Server processing is normally referred to as “an Authoritative Server”.
Authoritive servers are used to reduce the ability of hackers to manipulate game play, such as flying, ammo tweaking etc. They receive raw user data, and return the valid user data, such as positioning, after first determining if the movement was “legal”. This system is laggy however, so it is used in combination with client side prediction, which basically carries out the action that the server would send it (if it were legal), whilst waiting for the response. This means smoother, less laggy gameplay occurs, whilst if cheating occurs, the server overrides and corrects it.
The last method has no server, and simply connects a client to a client, mutually exchanging data.