Placing items in a 3D world can be extremely difficult to engineer.
From the load balancing to avoiding exploits there are many things to consider.
We have been floating a few ideas around about exactly how we want to handle Item Placement within our world. This post will highlight the main solution I will be using for starting out as well as some possible solutions for problems i can foresee.
The Basic System:
- Players can place Items (3d objects) in the world.
- Any Player can pick up the Item.
- An Item in the world is destroyed depending on their Render Level. Higher Render Levels will decay faster.
- Items are not persistent, a server restart will destroy them.
Locking Items Down
If an Item is placed inside a house, anyone with rights to that house can lock the item down.
-Locking an item down prevents other players from being able to pick the item up.
-Locking an item makes that item persistent in the world past a server restart.
The bandwidth and rendering is also a great concern.
- Render Level – Item Spec Oracle has a field for “Render Level” which is a value between 1-5.
- Render Object at 60 meters distance and object has physics. ( LARGE statues, LARGE trees, shouldn’t be used unless thoroughly vetted )
- Render Object at 30 meters distance and object has physics. ( Statues, vegetation, flags )
- Render Object at 5 meters distance and object has no physics. (Large Tables, Large Chairs, Large Desks )
- Optional Render of this Object at 2 meter distance and object has no physics. ( Bed, Paintings, Work Stations, Larger Tools, Vases, Potions )
- Optional Render of this Object at 1 meter distance and object has no physics. ( Jewelry, coin, weapons, tools )
- Toggle Rendering – RL4-5 for performance reasons. We may make this automatic if you enter Combat.
- Limiting Players Placement – Players will only be able to have 5 active items down at 1 time. Active Item is an Item that has not been locked down yet and is placed in the world.
- Item Placement Time (consideration) – Another tactic to prevent players from spamming items would be to create an Item Placement time. This would also stop players from using Items in PvP as they would have to complete the placement uninterrupted. ( 4 seconds? Instantaneous if you are placing on your house and not in combat )
- Turning Textures Off – Players will be able to set the ability to render House Items with out textures to save on performance as well. Since RL1-RL3 interact with the physics engine they must be rendered but to save on performance we can allow them to render with out a texture.
We think this basic rule set for an item placement system will work properly within our world.