IntegratedQuantum
949900f518
Remove refCounting from CaveBiomeMapFragment
2025-07-26 17:37:25 +02:00
IntegratedQuantum
8bcc00f536
Sort the world list in save selection by least recently used.
...
Also did some further refactoring to make it easier to deal with different world paths (#606 ) in the future.
fixes #1311
2025-05-13 20:39:12 +02:00
Krzysztof Wiśniewski
00c6b29736
Always use big endian ( #1274 )
...
* Always use big endian
* Apply review change requests
2025-04-03 21:32:59 +02:00
Krzysztof Wiśniewski
4a8c0a6327
Refactor SurfaceMap.zig
to use BinaryReader
and BinaryWriter
( #1252 )
...
* Refactor reading
* Refactor writing
* Apply review requests
2025-03-29 15:07:38 +01:00
IntegratedQuantum
c2ef9aba62
Remove the root . . . . . . . . . . import, replacing it with @import("main")
...
To fully solve the ZLS issues I had to also add the import to the other executables.
2025-03-27 21:16:35 +01:00
IntegratedQuantum
b13e835a21
Add memory pools to all terrain generation data structures.
2025-03-09 20:44:05 +01:00
IntegratedQuantum
471210f585
Use array @splat
...
progress towards #1160
2025-03-06 22:08:15 +01:00
IntegratedQuantum
bc02bb0587
Use (an adapted version) of zig fmt to format the source code. ( #1140 )
...
* Format all the files
* Fix compilation error.
* The install scripts now patch render.zig from the zig standard library.
* Update ci.yml
* Update ci.yml
* Update ci.yml
* Update ci.yml
* Update ci.yml
* Update ci.yml
* Update ci.yml
* Update ci.yml
* Update ci.yml
* Update ci.yml
* Update ci.yml
* Update the formatter, it doesn't need to run on .zig files anymore.
* Update ci.yml
* Update ci.yml
* Add a mistake to check if it works
* IT WORKS!
2025-03-02 16:36:58 +01:00
IntegratedQuantum
22488a28ae
CI: Check for trailing spaces and (missing) newlines at the end of the file
...
fixes #737
2025-02-12 17:36:44 +01:00
IntegratedQuantum
458dd20ade
Allow setting the highestLod parameter when in the menu.
...
I decided to avoid the trouble of making this dynamic, by just only allowing to change it in the menu.
fixes #747
2024-12-17 14:37:45 +01:00
IntegratedQuantum
8c35f9f736
Store the biome hash even if there are no chunks loaded yet.
...
This avoids needless LOD regeneration on second join and removes some useless debug spam.
fixes #650
2024-11-15 22:37:49 +01:00
IntegratedQuantum
7b4461ad00
Improve biome interpolation on biome changes.
...
Now it uses a 1d noise, to offset the biome positions and the height interpolation.
This should also fix #633 and helps reduce the impact of #766
2024-11-05 23:30:27 +01:00
IntegratedQuantum
b4f3dfbeca
Replace json with zon in the entire game and autoamtically convert all json files when an old version is detected.
...
progress on #733
2024-09-29 16:28:16 +02:00
IntegratedQuantum
72207c973e
Refactor: Use decl literals, a recent addition to Zig.
2024-09-14 14:54:49 +02:00
IntegratedQuantum
330187b9ae
Update zig version
2024-09-14 13:42:25 +02:00
IntegratedQuantum
289e3c61f1
Add VSCode section headers to make navigating large files easier.
2024-07-14 11:31:57 +02:00
IntegratedQuantum
5f192f224f
Decrease the compression ratio of stored maps to improve their generation time.
...
helps with #513
2024-07-01 16:36:54 +02:00
IntegratedQuantum
d56db52835
Store height map as an integer, which makes it more compressible, reducing file size by ~5×.
...
fixes #479
2024-06-22 11:17:12 +02:00
IntegratedQuantum
3de8271671
Store biome and height maps, interpolate height map with surrounding terrain on load, store heightmaps for old worlds that didn't have them on load.
...
fixes #350
2024-06-17 11:46:44 +02:00
IntegratedQuantum
3e0c666108
Audit usage of reference counting, making it thread safe in a (pretty rare) edge case.
...
Also uses a more consistent naming convention when reference counting is involved.
Fixes #332
Potentially fixes #329 (I can't reproduce it anymore)
Discovers #338
2024-04-30 22:36:46 +02:00
IntegratedQuantum
f7cd5e4c9c
Fix more errors at the integer limit.
...
Fixes #309
2024-04-05 11:44:42 +02:00
IntegratedQuantum
0acb0e2c80
Update zig
...
This one was annoying.
2024-04-03 13:57:38 +02:00
IntegratedQuantum
1cc6410ef6
z is now up
...
Closes #272
2024-02-26 17:31:42 +01:00
IntegratedQuantum
de004841b7
Handle OutOfMemory errors centrally for the globalAllocator and derivatives.
...
To let the rest of the code know about this decision I implemented a wrapper over the Allocator interface which cannot fail.
This is just the first step in the upcoming refactoring attempt.
2024-01-29 17:22:20 +01:00
IntegratedQuantum
4330f33d36
Improve priority calculation for light maps so it always generates the light maps before the contained terrain.
...
Fixes #243
2023-12-21 22:10:55 +01:00
IntegratedQuantum
3eb3e2b358
Add sunlight.
2023-12-20 14:25:56 +01:00
IntegratedQuantum
a61fe26fab
Update zig: Andrew broke it all.
2023-11-28 00:04:01 +01:00
IntegratedQuantum
e398824cab
Refactoring: Use const instead of var where possible.
...
When I started to use zig, I mostly used `var`. But over time I adapted to using `const` where possible which is more readable and the compiler is currently optimizing it better.
2023-10-22 21:12:45 +02:00
IntegratedQuantum
83e8d52120
Cleanup some TODOs.
2023-08-05 22:27:06 +02:00
IntegratedQuantum
7c3d3462c9
Update zig version to 0.11.0-dev.3879+5804f3f75
...
Note: Requires running `zig fmt` in the mach subfolder to work.
Zig did some weird stuff there. Partially helpful, partially annoying. But it made me clean up some old code, so that's a good thing I guess.
2023-06-28 19:54:52 +02:00
IntegratedQuantum
64f5b363a4
Rewrite the biome system (there still some smaller things left to do)
2023-06-26 17:33:15 +02:00
IntegratedQuantum
e2280c2b63
Update zig version to 0.11.0-dev.3380+7e0a02ee2
...
Zig got worse at copying unnecessary stuff onto the stack :(
2023-06-06 13:38:38 +02:00
IntegratedQuantum
fc12bd5a63
Add terrain generation.
2023-05-01 18:35:45 +02:00