fishfolk / bones

An easy-to-use game engine for making real games.
https://fishfolk.org/development/bones/introduction/
Other
210 stars 20 forks source link

Derive macro for hashing types to support net desync detection #381

Open MaxCWhitehead opened 4 months ago

MaxCWhitehead commented 4 months ago

Goal is a derive macro to allow hashing components / resources. One of the challenges is floats + glam types like vec / quat don't support implementing std::hash::Hash - but we need some support for this.

Properties can be opted out of being included in hash, but otherwise all properties are required to support by default. Then World can hash all supporting components / resources and use hash with ggrs desync detection.

I have decent amount of progress on this WIP - but I successfully resolved current desync issues so far without it, and don't need full solution in this moment. Will wrap this up once got other things out of the way.

Some discussion + context on implementation details from discord here