I have designed a real time Physics simulation with NIO, which is about moving balls simultaneously (real time) on multiple clients
Currently, i m sending the coordinates of one ball with string parsing, but now i want to move multiple balls and want to have some generic mechanism other than sending string, so i create 4 balls on server.
How it can be realize that, coordinates of each ball correspond to same ball on client (which i created on client too), and each ball can be move according to its received coordinates from the sever.
This should be realize by sending the reference of each ball but i don't have idea how to realized that with java byte buffer and with NIO overall.
I have the problem with implementation, if somebody help me with code example , it would be great, anyway which can be generic for sending simulation data like object coordinates other than strings can be acceptable(if somebody did similar work) but it should implement the usecase as i described.
Thanks,
Jibbylala
P.S : May i know the reason of Downvoting question?