How to write robust, efficient and well structured client interpolation code?

Started by
13 comments, last by caymanbruce 6 years, 8 months ago

Sorry, I don't understand what you are talking about with the state lists.

Yes, I mean recalculate it. Typically this is a couple of multiplications and a few additions; the sort of thing a modern computer does billions of times per second normally.

Advertisement

@Kylotan I mean I put those extra properties in because I want to query it directly from "currentRenderState" when I want to display or use them on client. But if I don't put those properties into "currentRenderState" I need to maintain a separate data structure that only contains those values. That will be a lot of work when adding or deleting values(player status) in it.  I guess that will be fine?

It shouldn't be a lot of work. You don't need everything about one entity to live in one massive lump of data anyway. That's never going to scale well. Separate the data you need to interpolate from the data you don't.

 

@Kylotan Thanks I will update my code with this in mind.

This topic is closed to new replies.

Advertisement