quick question re: game messaging

Started by
2 comments, last by rjackets 18 years, 8 months ago
I've been reading up a bit on game messaging and I'd love to know just what I should include in the messaging system? I expect things like move commands, and key input, and object creation should be handled this way, but just how far should I go? Any simple pointers on which direction i should take here?
Advertisement
I just got started on doing this myself, and I tried to make a message sent for almost everything I can. Even setting position. But the only reason I did that was becasue I wanted replys for my engine, so if I could message everything and record the messages, then I could replay everything back from a file.

Also I belive network programming would be much easier like this.
I already wrote mine and it works great.

The gameLogic deals with objects in the stance of physics and collision based on terrain and other such static objects.

Object to Object collision will be informed via the messaging system. Units taking damage, units to be spawned. The user interface, option changes and networking.

The only problem I have with my system.. which really isn't much of a problem I guess: gameLogic and messages cannot be dealt with in sync since they reside in different threads. gameLogic updates then during rendering messages are pumped. If rendering time is very low, it will be hard for messages to pump, but pumping messages in almost all case's will be WAY faster than rendering so I highly doubt the queue will ever backlog. This however offers an advantage as the non-physics half of the gameLogic will be updated in a different thread.
Thanks. That's about what I was expecting, but I appreciate the confirmation.

This topic is closed to new replies.

Advertisement