1081 Commits

Author SHA1 Message Date
IntegratedQuantum
1d8c147d13 Supply a global init/deinit and remove namespacing for the instance 2025-08-10 08:04:35 +02:00
IntegratedQuantum
ed7cf86d66 Set the engine name to Cubyz 2025-08-10 08:01:02 +02:00
IntegratedQuantum
c022e814c9 Use an enum for the error codes 2025-08-09 22:11:14 +02:00
IntegratedQuantum
b5c5a234ce Remove TODO that was extracted to an issue #1748 2025-08-09 20:52:36 +02:00
IntegratedQuantum
890e2aee61 Improve function name 2025-08-09 20:48:26 +02:00
IntegratedQuantum
4c22e0205d Correctly handle extension name null-terminated array 2025-08-09 20:36:38 +02:00
IntegratedQuantum
918354f81c Only warn when validation layer wasn't found 2025-08-09 20:20:07 +02:00
IntegratedQuantum
2d30358ae2 Hide some of the magic of the enumerate functions with some wrapper functions. 2025-08-09 20:18:24 +02:00
IntegratedQuantum
c795ee3cd4 fix format 2025-08-09 20:05:54 +02:00
IntegratedQuantum
b6a02d4d82 glfw shouldn't include Vulkan 2025-08-09 20:01:39 +02:00
IntegratedQuantum
bfe48fd30f Remove the linking to the vulkan system library and fix the fix in vulkan error handling 2025-08-09 19:56:58 +02:00
IntegratedQuantum
6fa4cd4df3 Make it work with glad 2025-08-09 19:36:38 +02:00
IntegratedQuantum
0499547e76 Add a vulkan instance and prepare for starting the vulkan rewrite 2025-08-09 18:43:34 +02:00
IntegratedQuantum
12006a2479 Rename stone to slate and replace the baseStone tag
fixes #1638
2025-08-09 16:41:20 +02:00
IntegratedQuantum
481951b563 Fix jumping, see https://github.com/PixelGuys/Cubyz/pull/1707/files#r2264637796 2025-08-09 11:53:27 +02:00
IntegratedQuantum
8b7dbe58a7 Fix memory leak in the GPU buffers when moving fast at high render distance.
This was an oversight in e4840f7503bdb6f61edf8a69472c7ebe55a8050c
2025-08-08 17:12:25 +02:00
IntegratedQuantum
aa53722887
Add chests (#1739)
Progress:
- [x] Load/Store/Create
- [x] Fix deadlock on destruction
- [x] Behavior on destruction (should drop contained items)
- [x] Saving on change
- [x] What happens if the player gets out of render distance or someone
else breaks it while the chest is still open?
→ it becomes uninteractible
  - [x] Don't make it crash
  - [x] Don't make it kick the player
  - [x] ~~Make it close the inventory on the client side~~ → #1740 #1741
- [x] Cleanup, ~~check if there is any legacy chest loading code~~
- [x] Add missing chest variants and recipes

fixes #1060
2025-08-07 15:58:52 +02:00
IntegratedQuantum
560b53f6dd Type safety for inventory ids 2025-08-05 19:07:42 +02:00
IntegratedQuantum
90375b871a
Make reading light data thread safe without mutexes (#1727)
After failing in #1725 I decided to use a different approach at
atomizing the palette compressed data, I added a new indirection which
can be used to swap the entire content in one atomic operation. This
should make the process itself cheaper than what I had implemented
before.

related: https://github.com/PixelGuys/Cubyz/issues/1471
https://github.com/PixelGuys/Cubyz/issues/1413

improves https://github.com/PixelGuys/Cubyz/issues/277

Remaining work:
- [x] double check the implementation
- [x] Fully remove the ReadWriteLock
- [x] Check if this improved meshing performance → yes it did by 10-20%
- [x] Check if this improved block update speed → yes it did by ~25%
2025-08-02 14:42:34 +02:00
IntegratedQuantum
047e29fe72 Avoid realPathAlloc in caching of _defaults
fixes #1351
2025-08-01 17:03:36 +02:00
IntegratedQuantum
29d72d00e1 Remove warning about block entities being null, this is a valid state now
fixes #1613
2025-07-31 20:45:34 +02:00
IntegratedQuantum
7929231a0b Don't accelerate downwards while sneaking and jumping.
Also removed the last use case of the hardcoded airFrictionCoefficient.

fixes #1689
2025-07-31 20:01:26 +02:00
codemob
fc5f76411e
Bouncy mushrooms (#1707)
Fixes #1704

---------

Co-authored-by: IntegratedQuantum <jahe788@gmail.com>
2025-07-31 16:33:02 +02:00
IntegratedQuantum
2dc2a6e790
Rename queue methods to push/pop and redefine back and front to what seemss to be the standard (#1723)
the back is now the goto push location, the front is now the goto pop
location. It was the other way around before due to confusion.

successor to #1709

I also decided to do the isEmpty changes discussed in #1709

fixes #1320
2025-07-28 15:29:06 +02:00
IntegratedQuantum
27865e313e Raise the timer for the sync point error message to 20 seconds.
could fix #1708
2025-07-27 10:15:14 +02:00
IntegratedQuantum
77fb637fe3 Remove reference counting in terrain generation data structures.
more progress towards #1413
2025-07-27 10:07:01 +02:00
IntegratedQuantum
949900f518 Remove refCounting from CaveBiomeMapFragment 2025-07-26 17:37:25 +02:00
codemob
2fa5e0bae2
basic swim movement (#1665)
Adds basic water control. Starts #85.

---------

Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
Co-authored-by: IntegratedQuantum <jahe788@gmail.com>
2025-07-26 14:03:41 +02:00
Krzysztof Wiśniewski
e4030386d6
Binary storage for inventories (#1662)
Related to: #1642
Resolves: #1290

---------

Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
Co-authored-by: OneAvargeCoder193 <mgiakimenko@outlook.com>
2025-07-26 13:52:53 +02:00
codemob
55dc104c37
Use an approximation of the heightmap derivative to "erode" some layers of ground_structure (#1699)
Fixes #188
2025-07-25 22:04:45 +02:00
codemob
a47c8d14a1
Prevent settings from breaking when no previous file is present. (#1719)
Fix #1718
2025-07-25 18:09:51 +02:00
IntegratedQuantum
08c78ff48d Fix double free detection of the StackAllocator 2025-07-25 17:28:59 +02:00
IntegratedQuantum
ab691cec73 Use GarbageCollection for LightMapFragments 2025-07-23 22:29:50 +02:00
IntegratedQuantum
6089c58e55 Fix getBlockFromAnyLod to include the chunk at highestLod
fixes #1710
2025-07-23 21:32:42 +02:00
codemob
468f959c54
Allow searching by tag in the creative inventory (#1700)
fixes #1659

---------

Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
2025-07-23 21:22:50 +02:00
IntegratedQuantum
6baf7fc067
Garbage Collection - The Great Return (#1680)
This is a first attempt to get rid of of reference counting #1413

Basically all threads execute a global sync point, this allows
determining a time when all temporary resources (such as meshes on the
client side used in lighting on other threads) have been freed with 100%
certainty.

Remaining work:
- [x] Implement the sync point
- [x] Implement free lists and free the resources
- [x] Determine if this is worth it performance wise
  - [x] Use this for chunk meshes
- [x] Remove reference counting and the locks on the chunk storage data
structure
- [x] Measure performance of gathering many light samples and compare it
with master → around 15% reduction in time
- [x] Cleanup some unused things (mesh free list)
2025-07-21 22:20:17 +02:00
IntegratedQuantum
1794515c92 Print modifiers, modifier restrictions and tags in item tooltips.
fixes #1587
2025-07-21 17:07:29 +02:00
codemob
df0af7afbc
Preserve unknown entries in settings (#1696)
Fixes #1675
2025-07-20 23:29:50 +02:00
IntegratedQuantum
7aa35798be Fix chisel behavior for blocks with resistance
Until we have a proper tool for it #760 it should break the corners in one hit independently of resistance
2025-07-20 22:46:37 +02:00
IntegratedQuantum
31d62f77ee Set the selected window to null in toggleGameMenu
This caused a bug when pressing escape instead of left-click to return to the game.

fixes #1691
fixes #1655
2025-07-20 22:41:51 +02:00
IntegratedQuantum
fe687be59f Rename player model to "snale"
fixes #1697
2025-07-20 22:32:53 +02:00
codemob
f2dc3faec2
Place certain blocks on water (#1672)
Fixes #1218

---------

Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
2025-07-20 11:10:16 +02:00
IntegratedQuantum
bd5ea763cb Fix undefined behavior in text rendering (TextBuffer.width was initialized with undefined and never changed for draw.print)
(hopefully) finally fixes #595
2025-07-18 23:59:39 +02:00
IntegratedQuantum
c297fe0dfc Panic before the OpenGL buffer surpasses 2 GiB
fixes #1671
2025-07-18 23:58:29 +02:00
IntegratedQuantum
362f540825 Remove on-demand player inventory loading and fix a possible exploit 2025-07-16 17:22:36 +02:00
IntegratedQuantum
aae66ea77f
Update Zig to use the new Writergate version (#1664)
For reference: https://github.com/ziglang/zig/pull/24329

some commits have been extracted from #1583, but the x86_64 backend has
been disabled due to its horrible performance.

Remaining work:
- [x] Wait for official builds on ziglang.org and upload them to our
repository
- [x] Add workaround for https://github.com/ziglang/zig/pull/24466
- [x] Fix TODO comment about ANSI support in stdout
- [x] Check for compile-time performance changes → it went from 13.1 to
11.9 seconds 🎉
2025-07-15 23:00:29 +02:00
IntegratedQuantum
6811f21682 Don't fetch controller mappings in debug mode, decreasing compile-time by 5 seconds (25%)
see also: https://github.com/ziglang/zig/issues/24435
2025-07-13 21:47:55 +02:00
codemob
684d154a6d
Added invert mouse Y setting (#1666)
Fixes #1296.
2025-07-13 12:19:58 +02:00
Krzysztof Wiśniewski
76c0d885a5
QoL changes for creative inventory (#1635)
Although major UI changes are planned, they are expected in rather far
future. Unfortunately current state of creative inventory makes it
really frustrating to use when building and when testing newly added
blocks. Therefore I have implemented a dead simple search bar which
filters out all items with IDs that don't contain the searched phrase. I
also made a sin of (subjectively) improving the look of item list by
padding last row of item list with empty immutable slots if it was not
filled with items found.

![Screenshot 2025-06-20
025239](https://github.com/user-attachments/assets/17f6ca67-fc65-4588-b76e-c5cb0fb65ff1)

![Screenshot 2025-06-20
025312](https://github.com/user-attachments/assets/e7af7498-4415-45d8-a72c-ef155683e91e)

![Screenshot 2025-06-20
025245](https://github.com/user-attachments/assets/6dbf2b30-c075-491a-803f-b1dd92efa49c)
2025-07-07 22:23:33 +02:00
IntegratedQuantum
5a80a2d281
Speed boost when breaking a block based on leftover damage (#1658)
This makes the DPS statistic more accurate and reduces the impact from
off-by-one errors as described in #1643

fixes #1656 

@ikabod-kee please check this out
2025-07-06 21:49:45 +02:00