So in a multiplayer environment, I am building a TArray of inputs over a series of frames, sending this data to the server, which then multicasts this data to everyone for the purpose of simulating movement, the list is then emptied in order to build a new one.
the problem I have is that if I send a TArray as either const reference or nested in a structure, the server never gets the data, as const reference it always points to some random block of irrelevant data and nested in a structure it just considers it to have none.
My next approach was to build the data as a string and send it as that and then parse the string to extract the data, this worked perfectly for about 10 seconds until the client gets kicked for the string being too long. This happens if the client uses every possible input, while in the real world that would never be useful to the player in the game, its always a probably that somebody will just press every button at once to see what happens.
I can’t send the data as individual packets as they need to be sent together to avoid packets being received in the wrong order and not having to give each packet its own unique id to rebuild the list when its all received as this would ramp up the amount of data being sent by each client.