ProudNet provides a function that prioritizes message transmission.
The policies around prioritizing message transmission are as followed.
- When there are messages that haven't been transmitted to the network line and piled up as pending in the transmission buffer, the messages with the highest priority(Priority 1) get transmitted first then those of lower priority(Priority 2). The lowest priority messages (Priority 3) get transmitted when the transmission of Priority 1 and 2 messages are completed.
Prioritizing message transmission can be used at the following events.
Voice Chatting
- Voice chatting normally requires an immersive size of messaging. But the traffic caused by voice chatting shouldn't affect the game play. You can fix this issue by simply setting all messages related to the game play to be the highest priority over voice chatting.
Realtime Content Downloadable Game
- You can develop a game that allows a quick installation then downloads all necessary media data during the game play. By prioritizing the messages related to the game play to be higher than those of downloadable data can significantly improve the performance.
If you wisely use the realtime content download, you can reduce the cost of software distribution and installation. One of good examples is Guild Wars.
Synchronizing the position of massive numbers of characters
- The biggest interest you may have as playing a game is your playable character and another character you are fighting against. Which means synchronization with the characters that directly interact with your character is much more important than those do not. Therefore, setting higher priority for characters in combat or close in range with your character than other messages would offer much pleasant gaming experience.
Massive character objects in one screen, Ikusagami (offline single game from Genki)
The parameter that calls for RMI, Proud.RmiContext has a member variable, Proud.RmiContext.m_priority. All it takes is to set the priority of message transmission in this variable. The priority of message transmission is one of values of Proud.MessagePriority.
Proud.RmiContext.ReliableSend,Proud.RmiContext.UnreliableSend is a global variable. It is recommended to separately create Proud.RmiContext object instead of editing m_priority directly.