RTS 'complex' commands & input caching questions
My goal is to send RTS ‘complex’ commands such as SpawnUnit, MoveUnit, AttackUnit etc over the network when required. I’ve searched and seen other discussions on this topic but I have further questions still. I see that there is a way to set byte data for inputs that I could use to contain this command data. However, looking at the TrueSync Input API I’m confused about what will go on behind the scenes.
1) Does Truesync cache data for TrueSyncInput keys? If I set key 0 to some bytedata and then don’t set it again will it only transfer Input for key 0 one time? If it sends it all the time and the value is not changing that’s obviously not ideal, depending on the data size.
2) Is there a way to ask the TrueSyncInput API if an input of a certain key has been modified? I imagine I would want to check this in the OnSyncedUpdate function. If TrueSync does cache values but doesn’t tell you if they’ve been modified I may have to add further keys to say if values were modified or not rather than deserialising complex commands every frame.
3) Is there currently or are there any plans to have a Push/Pop input API rather than a Set/Get? This would probably be more intuitive to my RTS command style usecase.