I struggle to come up with an idea to solve the following taks in a network-efficient way:
The Game can create GameMessages, that a certain player should receive. When an enemy attacks you, when you attacked an enemy, when you traded on the market, or something else important happened. Now, I ofcoure have to store the message-corresponding data somewhere. My first try was to just create a Message class und give it a Struct with the necessary data as a parameter. The struggle here was that every message-type is a different struct, derived from a base struct, but I wasn’t able to cast the structs properly so that I could handle them easy on clients and server, since all messages have to be easily iterated through to sort them / display them.
Then I tried to implement different classes for every message so that I could cast / recast them properly, but I can’t replicate non-actors via RPC Calls, do I? And making them Actors would be bandwork overkill, since it is a very network-friendly mmo game (so far) and should stay so. When an Actor is called onlyrelevantToOwner, does the Actor however still replicate it’s instance to all other clients, but just not the data, or will a class marked onlyRelevantToOwner never exist in any form on the other clients?
Assuming 2 Messages averaged per player per hour, this would make, assuming 1000 Players, 48000 Message-Instances after just one day, what would be very conciderable, if the would exist on every client.