157 Commits over 424 Days - 0.02cph!
Change Set/GetHealth to Set/GetBlockDamage and update in BlockState
Fixup bit shifting for damage
Remove log and update texture 3d test (probably wrong)
Add ChunkLightMap.SetHealth / GetHealth and have a seperate PendingData and Data for volume texture updates
Add BlockState.OnCreated and BlockState.OnRemoved and update volume texture for health accordingly
Add BlockState.ShouldTick and BlockState.TickRate let states decide if they do anything
Just only send the dirty ones that have a valid state still
Remove dirty block state update if a block is removed
Try using BinaryHelper to ensure state updates don't fail if a current block doesn't support that state
Added VoxelWorld.GetBlockType<T>() for ease
Add distance params and condition param to SetBlock and GetBlock methods
Add BinaryHelper to simply some stuff
Vastly improve serialization and deserialization of worlds so that if any one component fucks up (such as an entity, or block state) it should not prevent the whole map loading. This is useful because if an entity is later removed, or a block state changes the way it serializes, entire worlds won't be lost. Maybe just switch to JSON in future but files could get super large.
Don't log out empty biomes
Silently fail and use the air block when no block can be found after loading a map (if that block type was previously deleted)
Add a warning if trying to deserialize a block state outside of the world bounds
Fixed ToSourceBBox method
Add NetworkIdent to ISourceEntity
Better name for spawn positions
Add WorldSpaceBounds to ISourceEntity interface
Have ISourceEntity extend IValid
Added ISourceEntity.Transform
Allow customizing center properties on ToSourcePositionCenter
Add ISourceEntity and SourceEntityAttribute
Remove SourceEntityAttribute
Serialize and Deserialize ISourceEntity on Voxel World load and save
Ensure that ISourceEntity types are deleted when a VoxelWorld is reset
Properly clean up worlds and chunks when destroyed. Properly send and refresh worlds when changed on clients.
Added VoxelWorld.SaveToFile and VoxelWorld.LoadFromFile
Added VoxelWorld.GlobalOpacity
Added ability to SetState and create a copy of a BlockState
Ensure affected neighbours have a full update queued when updating lighting
Fixed not being able to change blocks if they aren't air. Use GameTask.Yield.
Rename to GetPositionsInBox
Added VoxelWorld.GetBlocksInBox
Potential progress?
Have the lightmap queue a full update when it becomes dirty
Update mesh immediately when ready and perform initial torch/sunlight update in thread
Stash
A little better maybe but still screwed. May need a general re-think.
Screw it, just do it all in another thread... slight visual glitch with this though when updating mesh in a thread (to investigate)
Merge pull request #1 from Facepunch/light-fixes
Light fixes
Screw it, just do it all in another thread... slight visual glitch with this though when updating mesh in a thread (to investigate)
A little better maybe but still screwed. May need a general re-think.
Have the lightmap queue a full update when it becomes dirty
Update mesh immediately when ready and perform initial torch/sunlight update in thread
Added LiquidState. Have each queued tick have its own delay. Add queued ticks to a list(?) then process ready ones into a queue. Sort of kind of maybe somewhat happy with liquid for now.
Rename Block Data to Block State
Added LiquidBlock
Refactor and add queued ticks system
Adjust starting time of day and sunlight
Added DayCycleController and DayCycleGradient to control time of day in a voxel world
Update GlobalBrightness in voxel shader based on day cycle brightness
Add VoxelWorld.DayCycle accessor and setup day cycle controller with sensible defaults
Water flow experiment but it's slow and sucks, stash it
Use correct material when creating render layer
Added ChunkRenderLayer. Added BlockType.UseTransparency. Added Translucent, AlphaTest and Opaque render layers for chunks.