473 Commits

Author SHA1 Message Date
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
50d9c9a825 Windows can be moved again.
Fixes #334
2024-04-27 13:41:11 +02:00
IntegratedQuantum
41f0a9b08b Fix the menu background
fixes #333
2024-04-27 13:38:25 +02:00
IntegratedQuantum
d450fa5f62 Improve CPU-side light interpolation code, reducing the number of samples needed in the average case of axis aligned blocks.
Fixes #296
Helps with #277
2024-04-25 11:47:47 +02:00
IntegratedQuantum
ad1e79a4c1 Dedupliacte quads from the model data, reducing it from 4151 to just 247 unique quads.
Fixes #278
2024-04-24 19:55:27 +02:00
IntegratedQuantum
c64ece2163 Revert 413372a3218d966f328d09b11f2b4966ea91c357
RwLocks don't work like that.
Fixes #330
2024-04-23 22:45:56 +02:00
IntegratedQuantum
6da2971528 Refactor: Move the Window struct out of main.zig into its own file. 2024-04-23 16:30:30 +02:00
IntegratedQuantum
032acc1600 Add new music to the crystal caverns made by TotallyDemented 2024-04-23 10:30:17 +02:00
IntegratedQuantum
9738d6252f Limit the randomness of the FractalCaveGenerator to prevent infinite recursion.
Should fix #328
2024-04-21 10:54:10 +02:00
IntegratedQuantum
e2459d1fbd Remove all the commented java code.
Most of it is already implemented elsewhere or no longer applicable and would need to be rewritten from scratch.
closes #129
2024-04-20 10:58:59 +02:00
IntegratedQuantum
c9f9dbf634 Avoid unnecessary syscalls from checking the millitime in each call of isStillNeeded
Reduces lag caused by updating the priorities in the threadpool.
2024-04-18 17:02:19 +02:00
IntegratedQuantum
22a482eb65 Use OpenGL's types instead of c_long, on windows these are defined as c_longlong.
Might fix some problems maybe?
2024-04-18 11:12:04 +02:00
IntegratedQuantum
f0d8e8e6bf Always create a debug context of OpenGL. 2024-04-17 21:11:47 +02:00
IntegratedQuantum
775dcc85fc Use palette compression for chunks and increase the maximum render distance.
fixes #156
fixes #136
2024-04-17 17:29:25 +02:00
IntegratedQuantum
64e37dca26 Move all the palette compression related code into utils.
More progress towards #156
2024-04-17 16:22:27 +02:00
IntegratedQuantum
82be61ed6d Implement mutex assertions only in debug mode.
This avoids side effects in release fixing #317
2024-04-16 22:16:19 +02:00
IntegratedQuantum
4ea9b37b8c
Update ci.yml Does it now work? 2024-04-16 14:11:05 +02:00
IntegratedQuantum
d585551ba7
Update ci.yml 2024-04-16 14:03:43 +02:00
IntegratedQuantum
b8b1ba49f4
Create ci.yml
Should fix #315
2024-04-16 14:02:40 +02:00
IntegratedQuantum
aba651a998 Add a simple python script to check for common formatting errors (tabs and line endings) and fix existing problems.
a step towards #315
2024-04-16 13:51:22 +02:00
archbirdplus
5b76d2c33c
Adjust mesh selection by crosshair (fixes #302) (#323)
* Adjust mesh selection by crosshair (fixes #302)

* view space is now also z-up. The projection matrix now transforms z-up to y-up.

This makes it more intuitive to use the camera matrix for cpu-side computations. (see #323)

* Correct axes in cameraDir/cameraUp vectors

* Remove f32 arg from degreesToRadians in crosshair selection

* Fix some remaining issues.

---------

Co-authored-by: IntegratedQuantum <jahe788@gmail.com>
2024-04-16 12:28:45 +02:00
IntegratedQuantum
3d3a1322cb view space is now also z-up. The projection matrix now transforms z-up to y-up.
This makes it more intuitive to use the camera matrix for cpu-side computations. (see #323)
2024-04-15 11:24:59 +02:00
IntegratedQuantum
413372a321 Use a RwLock for the lighting data to allow meshing to lock it in a wider scope.
Fixes #319
2024-04-14 20:20:17 +02:00
IntegratedQuantum
86e08b9f8a Use palette compression for light data, reduing memory usage (of light data) by up to 100×.
Progress towards #156
Makes #277 worse
2024-04-14 15:42:49 +02:00
careeoki
80a54a8727
Colour Balancing & Texture Changes (#314)
* Colour balancing / texture changes

Slight changes to block colours to look nicer.
- Oak leaves are darker than grass. Oak woods are less saturated
- Sand is darker and more yellow
- Stone and soil are both slightly lighter

Texture changes:
- Sand tiles better
- Gravel tiles better

* Cont. colour balancing and texture changes

Essentially a more polished version of last commit. 
Soil is more textured, with a new highlight colour
New log is higher contrast
New planks texture that is less contrasty

* New grass plant texture

* Edit sand.json to reflect texture changes

* Delete misplaced texture

* New grass plant texture

* Fix line endings

---------

Co-authored-by: IntegratedQuantum <jahe788@gmail.com>
2024-04-11 13:43:20 +02:00
IntegratedQuantum
5d079c706e Fix incorrect assert which produced false positives. 2024-04-10 15:14:23 +02:00
IntegratedQuantum
0ab706c184 Fix stair model uvs
fixes #312
2024-04-08 17:12:03 +02:00
IntegratedQuantum
0a6521ff3e Fix texture brightness in game
Fixes #313
2024-04-08 15:35:50 +02:00
IntegratedQuantum
293100305c
Update the link to the java version. 2024-04-06 14:06:43 +02:00
IntegratedQuantum
63be36dfb3 I accidentally commited debug code that disabled occlusion culling in my previous commit. 2024-04-05 20:47:25 +02:00
IntegratedQuantum
f7cd5e4c9c Fix more errors at the integer limit.
Fixes #309
2024-04-05 11:44:42 +02:00
IntegratedQuantum
0b11301910 Some fixes for terrain generation at the world border.
Terrain generation no longer crashes which is a step a step towards #309
Also fixed #286 which I found along the way.
2024-04-04 18:58:33 +02:00
IntegratedQuantum
0acb0e2c80 Update zig
This one was annoying.
2024-04-03 13:57:38 +02:00
IntegratedQuantum
2dfbe98844 Add texture hot-reloading for Linux and Windows.
Closes #106
2024-04-02 16:47:32 +02:00
IntegratedQuantum
114888110d Fix the menu background capturing. 2024-04-01 11:38:21 +02:00
IntegratedQuantum
f4a8de00ba RotationModes can now change the selection based on the item.
Also make water unselectable.

Closes #292
2024-03-31 16:36:51 +02:00
IntegratedQuantum
5fea779e37 Undo the performance regression of the previous commit by adding a special case for air blocks. 2024-03-30 22:54:48 +01:00
IntegratedQuantum
4ab40cc85b Better occlusion and lighting for non-cube models.
Full faces of non-cube models now block light and occlude neighbor faces, whereas the others will let light through.
This does make light propapagation significantly (~40%) slower though due to the extra logic involved.

Closes #295
2024-03-30 22:13:55 +01:00
IntegratedQuantum
0bee580059 Add temporary chisel texture and recipe. 2024-03-30 15:58:27 +01:00
IntegratedQuantum
d1a81cfa93 Make light values more consistent at T-junctions inside of a model.
Fixes #291
2024-03-30 10:13:15 +01:00
IntegratedQuantum
6473362c6e Add the chisel to make stairs.
fixes #69
2024-03-28 21:11:46 +01:00
IntegratedQuantum
8418202df8 Store and update 3 color channels at once instead of treating them all seperately. This makes lighting ~twice as fast. 2024-03-26 21:23:21 +01:00
IntegratedQuantum
fce29ed4a0 Fix problem with the top fence uvs. 2024-03-25 21:57:49 +01:00
IntegratedQuantum
662ef94d0c Add a terrain border between caves and the ocean floor.
Fixes #282
Also fixes #281 by making water degradable
2024-03-25 20:55:31 +01:00
IntegratedQuantum
92b38a526e Add the torch model and rotation mode.
Resolves #70
2024-03-25 17:52:24 +01:00
IntegratedQuantum
44a786165d Properly handle closing the game menu.
Fixes #37
Fixes #248
Fixes #283
2024-03-25 14:17:37 +01:00
IntegratedQuantum
b6cffba122 Some small UI improvements
Fixes #245
Fixes #262
Fixes #284
Fixes #285
2024-03-24 20:00:21 +01:00
IntegratedQuantum
16f0e4d37f Add stairs as a rotation mode and generate all 2⁸ possible stair models.
A step towards #69, still missing a more convenient way to produce stairs.
2024-03-23 23:46:32 +01:00
IntegratedQuantum
c321bd927c RotationModes can now change block data on neighbor updates. This allows connecting fences on placement.
Closes #68
There is still some remaining functionality from the java version that's not implemented, but things like collision detection should be performed on the model directly instead of the rotation mode.
2024-03-22 23:00:35 +01:00
IntegratedQuantum
0159b65e51 Remove the Permutation and generate all variants of the fence model.
Progess towards #68
2024-03-22 21:27:10 +01:00