Server side collision deletection and BGE

I’m diving into socket programming by creating a “simple” multi player game, more or less I can log into my server, chat with anyone on the server with me, logout and the server keeps track of what each clients if pressing. Now I’m adding in my movement which is easy enough but it leads to the next problem! Collision detection which needs to be handles server side as well for security reason, the client is just for input and graphics.

The collision will be for the terrain as well as all the objects that a player might collide with.

I need advice on a good way to approach this, I could just load the map and all objects into the server like the client has but that seems like it’d really slow things down?

You probably should not worry about it too much at this point in development. I recommend that you just run everything on the server like you normally would and have the server tell the clients the results. If things start to slow down then you profile your program to see where the bottleneck is and fix that. You can’t fix a problem that you don’t have yet.

I guess that means have the server load everything just not display is visually. I suppose the server could dump the real character models and such for a bounding box of some kind. I’ll read more into it thanks.

Yes, for a first pass, I would just let the server run everything as normal (i.e. loads all the graphics and physics). That will let the server compute the physics correctly. If things start to slow down then you can start stripping the graphics but you have to keep all the physics intact.