VisualGMQ / NickelEngine

a game engine based on ECS
MIT License
53 stars 4 forks source link

Use data pool to replace handle system #4

Open VisualGMQ opened 4 months ago

VisualGMQ commented 4 months ago

Currently handle system is hard to use. I assume to use DataPool to replace it and rewrite handle system.

DataPool will create/allocate any type of element(not only assets), reuse them, and auto-recycle them.

new handle system is based on DataPool, it access data from pool, check object validation.

VisualGMQ commented 4 months ago

now old handle system replaced with data pool and new handle system in 47ede1fae746fab1e05109eb6e93fcab161fa9e8

but data pool can't auto-recycle when object refcount == 0