Up to Main Index Up to Journal for March, 2017 JOURNAL FOR FRIDAY 31ST MARCH, 2017 ______________________________________________________________________________ SUBJECT: Cleaning up DATE: Fri 31 Mar 18:30:56 BST 2017 Spring is in the air, the clocks have gone forward, I've lost an hours sleep, must be time to spring clean. In the sense that I'm working on item clean ups after doing resets and respawning. Now, you might think that item clean ups are easy. A player drops something on the ground, after a period of time the item gets 'cleaned up' and either disposed of to be garbage collected or scheduled for a reset. In doing so you do not have a lot of items just laying around where ever they were dropped. This is especially important for items that spawn where you could end up with a large number of items. Actually clean ups are quite easy - if it wasn't for containers. Easier than resets and respawning anyway. As with resets and spawning you have to consider what happens to items when they are inside containers and possibly inside other containers. There are a number of 'what ifs' to ponder over: - What happens if you put an item into a container and then pick up the container?. - What happens if you drop a container - which schedules a clean up - and you then put something inside it - without picking it up? - What happens if there is a narrative container you can not pick up and you put an item in it? - What happens if you put something in a container that is on the floor, then put that container in another container that is also on the floor. Either container could already be scheduled for a clean up. There are a number of ways to handle clean up scheduling and many rules that could be applied to what gets scheduled when. Some of these ways are easier than others[1]. What I think is most important when deciding on the mechanics is what would make sense to actual players? I'm not going to pick a mechanism just because it's easy to implement - half the fun of this project is working through problems and implementing the solutions. Why do we need clean ups? There are three main reasons for having clean ups. The first it to remove items from the game when they are no longer wanted. The second reason is to automatically have items reset for puzzles and treasure. If you didn't then a player could hide a puzzle item or a valuable item so that other players cannot find and use it. Last of all if it wasn't for clean ups the world would either become a very empty and boring place to be or filled with junk items that nobody wants. My best effort at implementing clean ups is now out on the public dev branch for people to have a look at. As always I'm very interested in feedback and comments - good or bad: diddymus@wolfmud.org This months release - which will include resets, respawning, clean ups and numerous small bug fixes - may be delayed a day or two so expect v0.0.5 sometime between Sunday and Tuesday. -- Diddymus [1] The easiest method being to stop the world, put the players in a holding location and then reload everything from disk. Not a good player experience. It also suffers from the stampeding herd issue of everyone bolting for the best items when you open up the world to players again. Up to Main Index Up to Journal for March, 2017