Commit Graph
11 Commits
Author SHA1 Message Date
Snowiiii bf92fe22a0 Add Particles 2024-08-16 12:45:58 +02:00
Snowiiii 231bdb5614 World: Add GZip compression 2024-08-16 11:10:16 +02:00
Snowiiii 03cc991bfd cargo clippy --fix 2024-08-14 21:39:05 +02:00
Snowiiii 6485c99167 cargo fmt 2024-08-14 21:37:27 +02:00
lukas0008 03f9b377d5 Optimize chunk loading
- Chunk loading now is done in a more simple manner. Instead of splitting it into regions and having one file handle for all chunks in the same region, now all chunks make their own file handle for the region, the previous overhead was not worth it, since this seemed to increase performance.
- Speed up of ~15%
- Now the `.read_chunks` function does not return anything, instead it sends event to an mpsc channel.
- Dramatically decreased memory footprint.
2024-08-13 23:30:20 +02:00
lukas0008 85785c9ebe Fix: Server panics when loading certain chunks
Cause:
The size that is given in the file for the length of the chunk includes the compression byte, thus when reading a chunk that is at the end of the file, it would read 1 byte more that should be possible, causing a panic.
2024-08-13 14:53:55 +02:00
lukas0008 59749af69c Remove unnecessary logs and loading
- Load chunk (0,0) only in debug mode. This prevents crashes when the chunk for (0,0) does not exist, since this is only used for checking the size of the chunk packet.
- Remove log: `Getting chunks x, from region file y`
2024-08-13 14:14:19 +02:00
lukas0008 b68e9b809f Use rayon for processing chunks 2024-08-13 14:09:49 +02:00
Snowiiii 9fc86e260b Add: Basic Combat 2024-08-13 09:16:00 +02:00
lukas0008 435cd3b365 Remove development things 2024-08-12 20:43:15 +02:00
lukas0008 a991ce214b CHUNK LOADING KINDA WORKS 2024-08-12 20:22:59 +02:00