Opinions about the network engine i'm going to code

Started by
3 comments, last by Brian Sandberg 13 years, 7 months ago
Hi guys,
i'm posting here not because i need help, but because i just want to know if the network engine i'm coding is good/bad and why...

This is the scenario:
A 2d horizontal shooting game, where you can shot in every direction (mouse aiming) and you can play with friends (max 3, so the total players are 4), and there are a LOT of enemies coming from everywhere.

The networking engine i wrote until now usually are most clientside, the server only synced the position with the other players.

The networking engine i'm gonna write these days it's a lot different:
it will have control on objects creation (like CObject, CCollision, CPlayer) and will have the "ability" to give a particular player control on what objects it wants (for example, it can give the control of a CObject to player1 so he can move it and it will be synced to other players).
Also, this increases the possibility of modding maps etc. only changing something in the server without touching the client.

What's your opinion about all this?
Advertisement
A "network engine" is something that lets you find and talk to other players over the network. It may contain things such as matchmaking, scoreboards, packet marshaling, asset patching/updating/streaming and lag compensation.

A "data driven game world" is something different -- it's a method of designing a game world such that what happens in the world varies based on what the resources/data files/scripts tells it to.

These concepts are almost orthogonal. You can write a data-driven single-player game, and you can write a good network engine, but use it on a non-data-driven multiplayer game.
enum Bool { True, False, FileNotFound };
Quote:Original post by hplus0603
A "network engine" is something that lets you find and talk to other players over the network. It may contain things such as matchmaking, scoreboards, packet marshaling, asset patching/updating/streaming and lag compensation.

A "data driven game world" is something different -- it's a method of designing a game world such that what happens in the world varies based on what the resources/data files/scripts tells it to.

These concepts are almost orthogonal. You can write a data-driven single-player game, and you can write a good network engine, but use it on a non-data-driven multiplayer game.


ok...but can you explain me why i shouldn't use a data-driven login in a multiplayer game?
I believe you are confusing the design domains.
enum Bool { True, False, FileNotFound };
Quote:Original post by roby65
ok...but can you explain me why i shouldn't use a data-driven login in a multiplayer game?


Data-driven logic is a good thing :) If you value flexibility.

People are just disagreeing about terminology. What you are describing is a distributed object or entity system - something built on top of a networking "engine".

Realtime synchronization of object states can be handled in many ways; ranging from the server being nothing but a message relay, to the server being the authoritative simulator, and with various predictive schemes on the client.

If you haven't already, I recommend you google a bit for articles on how different commercial game engines handle it; there are some good ones out there. Also have a quick look for "entity system" or "component based entity system", which seems to be the term for flexible distributed object systems these days - there are a couple good threads here on Gamedev too.

This topic is closed to new replies.

Advertisement