46 Commits

Author SHA1 Message Date
OneAvargeCoder193
4898012311
Use comptime modding for rotation loading (#1509)
Related to: #1507
closes #1533 

I'm pretty sure that the rest of the moving into a comptime mod
interface can be done in a future pr

---------

Co-authored-by: Krzysztof Wiśniewski <argmaster.world@gmail.com>
2025-06-17 18:13:48 +02:00
IntegratedQuantum
5a1a824e05
Add SPIR-V compilation to ensure our shaders remain SPIR-V compatible (#1404)
* Remove unused `directionalLight` uniform

* Add glslang libraries

* Update to the new Cubyz-libs version

* Dehardcode OS-dependent library file name stuff

* Audio somehow crashes on close, not sure why but I assume it's probably because of the library being compiled with a new zig version.

* Remove irrelevant uniforms from Window uniform list

* Remove unused itemdrop uniform

* Implement SPIR-V compilation code, the actual output is discarded

* Improve linking shader errors by passing a file path

* Fix formatting
2025-05-05 20:20:11 +02:00
Krzysztof Wiśniewski
d49f61e7b5
Add zig test runner (#1361)
* Add test runner

* Add runner to build
2025-04-29 17:49:59 +02:00
IntegratedQuantum
b347be8764
Use std.testing.refAllDeclsRecursive in teest builds to compile (most) unused functions (#1249)
* Use `std.testing.refAllDeclsRecursive` in teest builds to compile (most) unused functions

* Fix formatting
2025-03-28 17:23:27 +01:00
IntegratedQuantum
b5951f4bac Remove some unused functions and other problems with std.testing.refAllDeclsRecursive 2025-03-27 21:43:29 +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
0e9ffda1b1 Remove gui and server imports, these convenience imports aren't used anywhere anyways. 2025-03-25 21:14:39 +01:00
IntegratedQuantum
a033913dbb Link X11 instead of x11
This seems to cause trouble sometimes, not sure why. The library file has a capital X, so I guess somehow there was any alias on my PC.
fixes #1148
fixes #1040
2025-03-06 15:16:35 +01:00
IntegratedQuantum
03769c2cda
Update Zig to 0.14.0 (#1158)
* Update Zig to 0.14.0

* Update ci.yml

* Copy the zig fmt source code

* Update ci.yml

* Fix formatting issues

* Update CONTRIBUTING.md with a new formatting command
2025-03-05 21:41:02 +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
d8723da57c Rewrite the formatter in Zig, dropping the partial python dependency.
Also added a check for .zon but not .zig.zon which is the preferred extension.
2025-01-24 21:04:03 +01:00
IntegratedQuantum
c7a67eb42a Add a zon (Zig Object Notation) parser in preparation for #733 2024-09-28 19:55:22 +02:00
archbirdplus
6ca702b67d
Link Cubyz more correctly. (#461)
* Do not add cubyz_deps rpath.

* link deps as object file; add macos rpaths
2024-06-18 08:56:08 +02:00
IntegratedQuantum
9caf51953d Update zig version to 0.13.0 2024-06-07 13:40:22 +02:00
Archbirdplus
a71c4c5f16 build.zig: make release deps default on Mac 2024-05-26 09:22:28 +02:00
archbirdplus
a47b6851e6
Upgrade deps (#347)
* build.zig: add ../Library RPath to Mac

* build.zig: pull from specific package by system

* build.zig: MacOS: Don't link GL, redundant

* Add extra dependency for headers

* Fill the missing hashes and work around problems for linux-gnu targets.

* Update macos libraries using the glfw fork.

---------

Co-authored-by: IntegratedQuantum <jahe788@gmail.com>
2024-05-17 21:24:01 +02:00
archbirdplus
1a6454a92c
Mac Dev PR 1 (#336)
* Add libraries for macos + deps_local

* Tab characters

* build.zig.zon: MacOS comment, use relative path

* build.zig.zon: Add dot to url field

* build.zig: lazily load deps_local

* build.zig: revert bad debug edit
2024-04-28 11:20:20 +02:00
IntegratedQuantum
8a8af8e46f Update zig version 2024-01-12 20:58:58 +01:00
IntegratedQuantum
9978fd2025 Move all the C files to a seperate repo. Also use precompiled binaries to reduce first-time compile-time.
Resolves #110
Resolves #117 (I did however decide to use static linking, I had some issues with dynamic linking)
Also getting closer to #118

Additionally this avoids the problem caused by https://github.com/ziglang/zig/issues/17652 since harfbuzz is precompiled.
2023-10-21 15:00:16 +02:00
IntegratedQuantum
0c2d309f2a Ditch mach-freetype: now building freetype and harfbuzz directly.
Having zig bindings was certainly nice to have, but overall the code isn't too different really.
One nice advantage of building freetype and harfbuzz directly is that we can get rid of some unnecessary dependencies, like brotli.
Also, since that was the only zig dependency outside the standard library, this finally gives me the freedom to update zig whenever I want.
This is a necessary step for #117.

Resolves #139
2023-10-21 10:35:39 +02:00
IntegratedQuantum
cc85c8af1d Update zig. 2023-10-17 17:34:54 +02:00
IntegratedQuantum
91bd0b031c Compile all the C files into a static lib first.
Fixes #125

The workaround was taken from here: https://github.com/ziglang/zig/issues/17091#issuecomment-1710907659
2023-10-16 22:30:20 +02:00
IntegratedQuantum
86ab8ef782 Remove portaudio submodule, getting it through the zig package manager instead.
Resolves #103
2023-09-26 17:42:54 +02:00
IntegratedQuantum
6e43ec3d40 Update zig version to 0.12.0-dev.596+2adb932ad
I also had to add some workarounds for a new regression in the zig compiler: https://github.com/ziglang/zig/issues/17289
2023-09-26 17:15:55 +02:00
IntegratedQuantum
e7c5635048 Update mach-freetype, it got easier to set up. 2023-09-18 15:40:41 +02:00
IntegratedQuantum
1b2ed56e3c Update zig version to 0.12.0-dev.389+61b70778b and display debug times in µs instead of ns. 2023-09-16 20:21:02 +02:00
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
dbbda05022 Some improvements to the log function. 2023-08-05 12:51:35 +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
4fcfd10307 Add music loading/playing using portaudio and stb_vorbis. 2023-06-05 23:11:40 +02:00
IntegratedQuantum
fc12bd5a63 Add terrain generation. 2023-05-01 18:35:45 +02:00
IntegratedQuantum
b98f565f2e Start working on the server:
It can now do a handshake (sort of).
I also added a CommandQueue for the gui system to prevent issues from closing windows while they are being updated.
2023-04-09 11:28:21 +02:00
IntegratedQuantum
60f0c5d3af Add support for menu background scenes (but no default scene yet). 2023-04-04 11:30:02 +02:00
IntegratedQuantum
61e2e417a2 Add textures for the button and window. 2023-02-24 13:25:59 +01:00
IntegratedQuantum
0cf88c46a5 Start the gui system: movable windows 2023-02-14 12:46:29 +01:00
IntegratedQuantum
43da550385 Use the posix socket API wrapper of the zig standard library instead of messing with C code. 2023-01-05 17:18:11 +01:00
IntegratedQuantum
38cae34a27 I cannot pull the submodule from build.zig :( 2022-12-28 13:08:16 +01:00
IntegratedQuantum
5098d4fe0f Use harfbuzz for layouting. 2022-12-28 12:08:20 +01:00
IntegratedQuantum
249b8baa3b Text rendering using mach-freetype. 2022-12-25 17:39:45 +01:00
IntegratedQuantum
0c32d76a4a Make it compile on windows and remove -gdwarf-4 (a workaround to an old zig compiler issue). 2022-10-14 20:08:00 +02:00
IntegratedQuantum
dbc416332a Add Mesh creation for voxelSize=1 chunks. My goal is to combine all meshes in one algorithm to simplify things from the java version. 2022-09-29 12:15:47 +02:00
IntegratedQuantum
af54187d4b Add the STUN stuff. 2022-09-09 16:54:47 +02:00
IntegratedQuantum
d542c21c86 Finish the ConnectionManager and implement the socket in a cross-platform way. 2022-09-09 10:16:45 +02:00
IntegratedQuantum
b12e61260c image loading, chunks/chunk meshes, starting a bit on rendering. 2022-09-02 19:48:16 +02:00
IntegratedQuantum
786b65d556 Add glfw and glad and make a window. 2022-08-24 22:08:07 +02:00
IntegratedQuantum
5ad35f4955 Init project and overwrite logging, so it logs to a file. 2022-08-23 23:06:35 +02:00