Prefabs, serialization, scene/actor loading #3

Open
opened 2021-12-14 15:50:45 +00:00 by keith · 1 comment
Owner
  • [component (resume)] method - called on all components (including deactivated ones) once all new entities have been consed, right before they are processed this frame
  • Init-time references to actors/components should start as an ID, then get converted to a weak-pointer during (resume)
    • Automatically convert ID refs in slots
  • Convert scene/actor's current state into Lisp code at any time
  • [component (suspend)] prepares for conversion

  • Serialization: (dump-scene), (dump-actors)
  • Deserialization: register & resume scene/actors
  • Prefabs (probably can just be done by injecting (make-id) and (make-weak-pointer) into the generated code?)
- [x] `[component (resume)]` method - called on **all** components (including deactivated ones) once all new entities have been consed, right before they are processed this frame - [x] Init-time references to actors/components should start as an ID, then get converted to a weak-pointer during `(resume)` - [x] Automatically convert ID refs in slots - [x] Convert scene/actor's current state into Lisp code at any time - [x] `[component (suspend)]` prepares for conversion ----- - [x] Serialization: `(dump-scene)`, `(dump-actors)` - [x] Deserialization: register & resume scene/actors - [ ] Prefabs (probably can just be done by injecting `(make-id)` and `(make-weak-pointer)` into the generated code?)
keith added the
missing
label 2021-12-14 15:50:45 +00:00
keith self-assigned this 2021-12-14 15:50:46 +00:00
Author
Owner

Okay so 01b787e7bf provides (process-load-forms) and (generate-load-forms), which might be able to do the conversion between id-ref and weak-pointer. Test this theory.

However, more importantly, (process-load-forms) sometimes overwrites data from the source object (specifically lists/conses in the slots of an object). This can probably be fixed by making (replace-in-tree) produce a copy of each cons rather than rplac*-ing things.

Okay so 01b787e7bf provides `(process-load-forms)` and `(generate-load-forms)`, which *might* be able to do the conversion between id-ref and weak-pointer. Test this theory. **However, more importantly,** `(process-load-forms)` sometimes overwrites data from the source object (specifically lists/conses in the slots of an object). This can probably be fixed by making `(replace-in-tree)` produce a copy of each cons rather than `rplac*`-ing things.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: keith/wh-engine#3
No description provided.