Members - Reputation: 1486
Posted 04 October 2012 - 10:32 PM
How do you go about structuring this so there isn't tons of duplicate code and also no need for render-specific data on the server?
Crossbones+ - Reputation: 13472
Posted 04 October 2012 - 11:18 PM
In other words, you need to seperate the game model data from controller and view data. I.e. your game entity (model) could consist of
- position - rotation - scale - model_name
Then you can define a physic controller, which changes position and rotation depending on input and finally you create a render view which contains the render data to the according game entity.
This way you can divide the single components quite easily, like
Client: game model + render view Server: game model + physics controller