I am developing the combat system for a LAN multiplayer RPG game. For combat and enemy AI code, they will be placed on the server so the calculations for the enemies can be done centrally and the position/animation information will be sent to the clients for rendering.
For some AI code like path finding or obstacle avoidance, how does the server know how the scene "looks like" in order to define the paths or avoid obstacles?
Currently, the server is a separate program from the game code.
:wacko:
How to let the game server be "aware" of a 3D scene?
Started by Weng, Dec 10 2008 09:52 AM
3 replies to this topic
#1
Posted 10 December 2008 - 09:52 AM
#2
Posted 10 December 2008 - 04:54 PM
the only why would be to maintain a map on the server side and do computations there, after receving player position and orientation
#3
Posted 10 December 2008 - 04:56 PM
Well, if you will be doing game AI logic on the server, the server does need to be like the game engine (know the world format, etc), except for the rendering part.
The server must be somewhat like the client (and not an entirely separate program), but it just does not render anything. You can put a flag in the game code, telling the instance if it is running as client or server. Or, it may be separated, but share the world format part with the client (I did this way for a prototype and it worked like a charm).
This is the way I think is the best, but as always I may be wrong. :-)
The server must be somewhat like the client (and not an entirely separate program), but it just does not render anything. You can put a flag in the game code, telling the instance if it is running as client or server. Or, it may be separated, but share the world format part with the client (I did this way for a prototype and it worked like a charm).
Server ---- specifics, does not render anything + | + ---- shared code (world format, etc that is used by both) | + Client ----specifics, does render the world
This is the way I think is the best, but as always I may be wrong. :-)
#4
Posted 10 December 2008 - 05:48 PM
Could you tell us more on how the "game code" is structured? Where is the "game code", especially the part (that I will call the "server code") that would hold the model of the world, meaning the data that describes the game world.
Your AI code would either be mixed in (integrated) with the server code, or exist as its own "service" that gets used by/polled by/notifies the main server code, or exists as a "virtual client" that basically would look like a real client, but would just be a wrapper for a virtual LAN player.
Your AI code would either be mixed in (integrated) with the server code, or exist as its own "service" that gets used by/polled by/notifies the main server code, or exists as a "virtual client" that basically would look like a real client, but would just be a wrapper for a virtual LAN player.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












