Commit Graph

12 Commits

Author SHA1 Message Date
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
5075c97faa Load the world radially 2024-08-13 14:59:52 +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
Snowiiii
cfa20776f6 Add Clientbound Client Informations (Play) 2024-08-12 21:26:09 +02:00
lukas0008
435cd3b365 Remove development things 2024-08-12 20:43:15 +02:00
lukas0008
eaf806a928 NOW IT FULLY WORKS 2024-08-12 20:23:15 +02:00
lukas0008
a991ce214b CHUNK LOADING KINDA WORKS 2024-08-12 20:22:59 +02:00
Snowiiii
19af3618cb fix: all clippy warns 2024-08-04 00:40:27 +02:00
Snowiiii
ae69bbc7f1 Add pumpkin-world
also refactor player
2024-08-04 00:29:20 +02:00