So, I have a SimpleApplication thread and I also have a thread sat on a socket deserialising objects that come from my server to move objects around / apply effects / load terrain blocks as my game character moves throughout the world. This thread contains information to update the physical space and geometric state of objects.
After doing some reading it looks like I have 2 options to update the geometric state of objects within the scene graph:-
- Use the callable interface from the thread sat on the socket - seen some posts around this from normen but I need to parameterise objects submitted when calling different functions for convenience sake. Which doesn’t fit well with callable object parameters having to be final.
- put a queue container within my SimpleApplication and drain the queue from simpleUpdate every tick - make the queue of a made up class like BaseChangeGeoState and then derive all transormations and node additions from that object
My question is, are there any other ways of ensuring I don’t compromise the geometric state, crashing the app? and also, which would people say from experience is the faster method? or is there in essence no difference between the two?