921 Commits over 516 Days - 0.07cph!
Added Map.BuildCollisionInThread and set to true
Started work on dynamic chunk loading/unloading
Implemented ChunkViewer
Update TorchLight / SunLight in the full update thread and use ConcurrentQueue
Only send chunks that have completed their first full update
Added ChunkGenerator class. Added PerlinChunkGenerator class. Added Map.IsInfinite and Map.SetMaxSize.
Implemented SetMaxSize properly. Set it to 256, 256, 128 as it was before to test
Merge pull request #4 from Facepunch/stream
Stream
Added ChunkGenerator class. Added PerlinChunkGenerator class. Added Map.IsInfinite and Map.SetMaxSize.
Implemented SetMaxSize properly. Set it to 256, 256, 128 as it was before to test
Only send chunks that have completed their first full update
Update TorchLight / SunLight in the full update thread and use ConcurrentQueue
Started work on dynamic chunk loading/unloading
Don't try to generate a tree if it'd leak into another chunk
Added biome support. Added proper chunk generation and seed support.
Suitable spawn positions will be the center of the voxel
Package block updates into a single compressed update
Added F to blow a hole in something for testing. Use GameTask.FromResult to return vertex data from StartUpdateVerticesTask. Don't keep a list of vertices around that is used cross-threads.
Added max iterations to Map.Trace. Only remove the old shape from the world body after the first one is added. Because this update is threaded it can cause a slight collision issue until the new shape is resolved otherwise.
Comment out GetAvailableThreads as it isn't whitelisted for public
Add a delay to player block placement / removal
Various updates to improve threaded tasks
Return Task instead of void
Don't perform a mesh build if any adjacent neighbour chunks are still updating
Ensure that the full update task is not running before rebuilding mesh
Testing some stuff
Everything seems to be running with threaded tasks pretty well now. Don't allow the player to move if they're in a chunk that hasn't had collisions updated yet.
Merge pull request #3 from Facepunch/threads
Removed Block Slice Stuff / Perform Threaded Chunk Updates
Everything seems to be running with threaded tasks pretty well now. Don't allow the player to move if they're in a chunk that hasn't had collisions updated yet.
Added support for sending many chunks at once compressed. Removed support to show back faces for now (need to solve z-fighting.)
Added BlockType.CullBackFaces and don't cull back faces for leaf blocks
Some UI tweaks and hotbar wrap fix
Automatically perform threaded full updates of chunks closest to the player first
Added Player.TryGiveBlock and automatically remove / cleanup orphaned items
Renamed HotbarSlot to a generic InventorySlot. Hooked Hotbar UI to inventory system. Fixed a bug where item ids started at 0.
Queue a threaded full update on neighbouring chunks when a new chunk is initialized
Added a simple dot crosshair
Added Map.ToSourceBBox and add parameter to Map.SetBlockInDirection to check for collisions. Players can no longer place blocks if it would collide with an entity
Changes to how maps are loaded. Prevent Source hang dialog by turning GeneratePerlin into a Task. Added Map.OnInitialized. Only send maps to players if the map is actually initialized / generated.
When holding Shift you won't fall off the block you're on
Added Voxel.GetBlockType()
Make Map.GetSourcePosition and Map.GetVoxelPosition static
Added Chunk.GetVoxel and Map.GetVoxel and Voxel struct. A slightly slower but nicer public API for dealing with blocks but heavy operations can still grab everything manually.
Fixed block slices not updating properly when an opaque block is removed next to a translucent one
Merge branch 'main' of sbox-corewars
Allow lighting to be fetched from z chunks
Removed ao details from material
Turn it into a PerlinGenerationConfig struct to pass in
Always ensure that there is some form of block at the bottom most level
Fixed grass and (temporarily) generate a list of suitable spawn positions
Update light maps immediately on chunk initial load + when refreshing. Grass blocks will not show their grass if there is no sunlight.
Increase world size Z by double. Mess around with generation a little for testing. Refactor UpdateNeighbours. Add Chunk.GetNeighbour.
Merge branch 'main' of sbox-corewars