Jump to content
  • Advertisement
Sign in to follow this  
rjackets

quick question re: game messaging

This topic is 4889 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!