Some performance/design advice needed for an MMO type app

Hi All,

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:-

  1. 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.
  2. 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?



For 1) You can just put the callable in a method and make the method parameters final, this way you dont really recognize the finals, solution 2) is ok too. Basically these are the main ways to execute something on the OpenGL thread.

Thanks for the confirmation normen. Also thanks for the prompt response as usual.