Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Begin branch/object life system. #1

Open
nhurde opened this issue Jan 1, 2023 · 0 comments
Open

Begin branch/object life system. #1

nhurde opened this issue Jan 1, 2023 · 0 comments

Comments

@nhurde
Copy link
Contributor

nhurde commented Jan 1, 2023

This is a giant design choice.

Currently everything is raw pointers.

Either optimize to smart pointer system (Currently trouble understanding if typecasting and children objects work properly this way) or use life system.

Life system entails:
-Branches all have boolean variable for being_terminated
-Special function is called once being_terminatedis executed, polymorphed function.
-Objects/branches to be terminated removed from every list in engine (not by user) on next frame selected for destruction.
-Objects who link or refer to object MUST check if object is viable for next frame or risk immediate crash or bugs...
-Garbage collection life object will once every second or frame or user-selected time remove objects selected for termination.
--After removed from each list, object is finally deleted UNDER ASSUMPTION that other objects no longer reference it....
--Object is NEVER rendered or stepped/updated once being_terminated is set to true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant