217 Commits

Author SHA1 Message Date
IntegratedQuantum
7d4d110b03 Use mach-freetype with the package manager and update zig version to 0.12.0-dev.163+6780a6bbf 2023-08-24 09:47:13 +02:00
IntegratedQuantum
840d62177c Switch to f16 frame buffers in preparation for volumetric fog.
Also display some performance data using OpenGL's queries.
2023-08-21 09:41:41 +02:00
IntegratedQuantum
0d69e9965c Fix visibility issues with the new occlusion culling when moving too fast. 2023-08-16 19:41:16 +02:00
IntegratedQuantum
a703cb6c6a Occlusion culling 2023-08-15 21:11:40 +02:00
IntegratedQuantum
83e8d52120 Cleanup some TODOs. 2023-08-05 22:27:06 +02:00
IntegratedQuantum
64ec48840d Fix memory leaks and cleanup. 2023-08-05 21:04:27 +02:00
IntegratedQuantum
dbbda05022 Some improvements to the log function. 2023-08-05 12:51:35 +02:00
IntegratedQuantum
3fb17e24b9 A small change regarding the rotation mode ids.
These cannot be modded, so it doesn't make sense to add "cubyz:" in front of the id.
2023-07-31 21:42:45 +02:00
IntegratedQuantum
3f73c81de3 Goodbye beaches
Replacement biomes are no longer supported. Ocean now go a bit higher, which makes beaches appear naturally.

Also removed the old terrain generator which was no longer compatible anyways.
2023-07-26 21:26:46 +02:00
IntegratedQuantum
555838e369 Better biome interpolation. 2023-07-26 21:19:12 +02:00
IntegratedQuantum
d0c1f03fb3 Update zig version to 0.11.0-dev.4246+71dfce31b 2023-07-26 18:39:18 +02:00
IntegratedQuantum
248691d54d Store key names at runtime instead of at compile time.
Reduces code complexity and binary size.
2023-07-24 11:36:45 +02:00
IntegratedQuantum
460adcba4b Quality of life improvements to the gui system:
Some windows like the inventory now hide when ungrabbing the mouse, making it easier to leave the inventory.
The top right corner of a window (containing the close and resize buttons) won't go out of bounds anymore.
2023-07-23 14:24:56 +02:00
IntegratedQuantum
a5763f7307 Some uncommited small change that was lying around for a couple months. 2023-07-23 10:53:57 +02:00
IntegratedQuantum
8581a17c48 A couple of changes related to block placing and transparency:
Allow emissive transparent blocks (such as uranium glass (ok to be precise that's actually flourescence))
Allow selecting the inventory slot with mouse wheel.
Render item preview for transparent blocks (I don't really like how it looks yet)
Fix some bugs.
2023-07-22 18:56:51 +02:00
IntegratedQuantum
d19e69d141 Block placing. 2023-07-21 22:00:32 +02:00
IntegratedQuantum
7597b8c5ff Add transparency sorting using a O(n) algorithm. 2023-07-19 16:40:36 +02:00
IntegratedQuantum
a65aba58d9 Add glass. 2023-07-17 22:07:42 +02:00
IntegratedQuantum
190c21ed6b Remove the far clipping plane. 2023-07-16 19:09:44 +02:00
IntegratedQuantum
5ca4ab6a9d Fake reflections and transparency (both absorptive and regular transparency are possible) 2023-07-16 14:09:18 +02:00
IntegratedQuantum
7cb347ce3c Update zig to 0.11.0-dev.3990+f2d433a19 2023-07-14 11:24:18 +02:00
IntegratedQuantum
6928041259 Reduce comptime code duplication of logging, improving compile-time by 10%. 2023-07-14 10:23:46 +02:00
IntegratedQuantum
6009b26929 Fix some audio file issues.
I decided to ignore the sample rate for now. A little bit of distortion is definitely better than a crash.
2023-07-07 17:45:19 +02:00
IntegratedQuantum
10b4431964 Some performance improvements.
Less allocations.
Work around another of Zig's performance bugs by removing a work-around for an older, now fixed performance bug.
2023-07-07 12:16:55 +02:00
IntegratedQuantum
f5220cfe9f More random fixes.
Note to self: Zig is cursed https://github.com/ziglang/zig/issues/16311
2023-07-03 22:12:52 +02:00
IntegratedQuantum
649eaf30a1 Fix some bugs.
Note to self: Don't copy the value into a `var` if you want to change the original.
2023-07-03 19:34:16 +02:00
IntegratedQuantum
93b2a29cc8 Add a volume slider. 2023-07-03 11:27:50 +02:00
IntegratedQuantum
faa70b5328 Play biome specific music. (And the fading isn't bugged) 2023-07-02 22:52:52 +02:00
IntegratedQuantum
73f1941933 Update freetype dependency. 2023-06-30 09:54:45 +02:00
IntegratedQuantum
1cf6fa087e Add some tall mountains and fix the subbiome chances. 2023-06-29 21:59:02 +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
ae57f7bd3d Merge branch 'master' of github.com:PixelGuys/Cubyz 2023-06-26 17:33:50 +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
e6109cdf7f
Create README.md 2023-06-21 19:01:24 +02:00
IntegratedQuantum
0867dd1975 Update mach-freetype (it finally works again!!!) and fix problems when there was no settings or guilayout file. 2023-06-21 17:38:58 +02:00
IntegratedQuantum
81992c9be0 Improve logging performance by reducing the number of syscalls. 2023-06-21 12:14:55 +02:00
IntegratedQuantum
ae9584b26b How did this even happen? 2023-06-21 11:27:49 +02:00
IntegratedQuantum
bf3a01ad95 Revive windows support.
It had been broken for a while due to a (now fixed) bug in zig and a couple other problems.
2023-06-21 11:20:18 +02:00
IntegratedQuantum
b0a358f63c Update zig version to 0.11.0-dev.3655+a2f54fce5 2023-06-17 11:04:01 +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
4fcfd10307 Add music loading/playing using portaudio and stb_vorbis. 2023-06-05 23:11:40 +02:00
IntegratedQuantum
4d092126cc Store the player position on the server to prioritize terrain generation. 2023-05-28 19:31:03 +02:00
IntegratedQuantum
cfc7b903e6 Fix a couple smaller TODOs. 2023-05-26 22:36:34 +02:00
IntegratedQuantum
4402c55203 A couple of small improvements. 2023-05-25 13:36:48 +02:00
IntegratedQuantum
f15d1adc56 Various performance improvements:
The NoiseCaveGenerator now produces all (noise + interpolateValue) values at once instead of recalculating them 7 times on average.

The TerrainGenerator no longer uses integer division.

The chunk meshing doesn't calculate the giant switch case in the middle of `cenBeSeenThroughOtherBlock()` if the block as the simple cube model.

And some smaller things.
2023-05-10 21:25:24 +02:00
IntegratedQuantum
83f4503390 Update zig to 0.11.0-dev.3041+8e9c9f6fd
Featuring `@memset`, `@memcpy`, multi-argument `@min`/`@max` and annoyingly #15644
2023-05-10 13:55:20 +02:00
IntegratedQuantum
5341f7c48f Improve performance of the NoiseCaveGenerator by using a non-cached version of the 3d fractal noise. 2023-05-09 18:48:09 +02:00
IntegratedQuantum
67c0d1f183 A couple of small fixes and refactoring. 2023-05-08 21:19:02 +02:00
IntegratedQuantum
c3a842b326 Interpolation in a bcc lattice using 3d barycentric coordinates.
Among that I also improved the cave biome map to actually use a bcc lattice as the underlying biome grid (before that a biome was spread over multiple points in the lattice, now it's just one.

And I also improved performance of the 2d fractal noise algorithms by using `@memcpy`.
2023-05-03 21:06:41 +02:00
IntegratedQuantum
fc12bd5a63 Add terrain generation. 2023-05-01 18:35:45 +02:00