From 426a9f92610f2371ffe71765f0ed0f0ba17538e3 Mon Sep 17 00:00:00 2001 From: lawnjelly Date: Fri, 13 Sep 2019 19:26:52 +0100 Subject: [PATCH] Update README.md --- README.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3b4f8a2..ebed2ac 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,8 @@ Work in progress, not yet fully functional * Auto creation of mirror portals DONE * Recursive determine visibility DONE * Prevent memory allocations (use pools for plane vectors) DONE -* Add support for objects moving between rooms - cameras, players, physics etc - Tomorrow +* Add support for objects moving between rooms - cameras, players, physics etc - DONE +* Cleanup code, Optimize * Investigate multiple passes (shadows, lights) ## Instructions @@ -24,7 +25,14 @@ This is all subject to change, but to give a rough idea of the current process: Once this structure is set up in the scene graph: * Convert the parent of the rooms to an LRoomManager node -* At game / level start, call 'convert' method on the LRoomManager. This will convert room and portal spatials to LRooms and LPortals, and make portals 2 way. -* Call 'set_camera()' on LRoomManager to set which camera is used for visibility determination (this is useful for debugging) +* At game / level start, call 'rooms_convert' method on the LRoomManager. This will convert room and portal spatials to LRooms and LPortals, and make portals 2 way. +* Call 'rooms_set_camera()' on LRoomManager to set which camera is used for visibility determination (this is useful for debugging) + +Dynamic objects (DOBs) like players, boxes etc are handled slightly differently. You currently can maintain them outside the roomlist, but instead of adding them to the rooms directly, you call: +* `void register_dob(Node * pDOB);` +to register with room system, so the DOB will be culled as part of the system. +* `bool update_dob(Node * pDOB);` +each frame you move the DOB to keep it up to date within the system. This will automatically move the DOB between rooms when it crosses portals. + +I may also add the option of having the system automatically update the dob, instead of having to call update manually. I only didn't do this initially because you might want dynamic objects to go to sleep when they aren't moving, so there is no need to update in the system. -That's pretty much it for now. There will also be calls to help determine which room the camera starts in, it just defaults to the first room for now. I'll try and figure a way of automatically tracking the camera room.