1326 Commits

Author SHA1 Message Date
IntegratedQuantum
1ff4e6acfc
Create the logical device and queues. (#1752)
Also generalized how the device features are handled and loader stuff.

progress towards #102
2025-08-10 19:34:01 +02:00
IntegratedQuantum
10c67d6aeb Allow attempting to open windows after the gui has been deinited.
Fixes crash in leak logging
2025-08-10 18:58:00 +02:00
IntegratedQuantum
a4a79603ba
Vulkan: Select the physical device (#1749)
progress towards #102

I also made a new Window, which is hidden by default, but we can use it
to start drawing things in Vulkan parallel to the rest of the game in
the future, to ease the transition process.
2025-08-10 13:21:13 +02:00
IntegratedQuantum
2ef1e1860f
Add a vulkan instance and prepare for starting the vulkan rewrite (#1620)
- [x] Use glad to load vulkan (current solution doesn't seem to work on
windows)
- [x] Update the Cubyz-libs

progess towards #102
2025-08-10 08:08:36 +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
012894d7d7 Fix formatting 2025-08-03 11:29:31 +02:00
IntegratedQuantum
119cc1b108 Add some old migrations that were made before the migration system was added 2025-08-03 11:25:58 +02:00
Krzysztof Wiśniewski
b24c953c3c
Away blueprints directory goes (#1733) 2025-08-03 11:04:25 +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
IntegratedQuantum
b5f255c9a2 Move the guidelines to /docs 2025-07-26 14:28:44 +02:00
ikabod-kee
29796daba5
Game Design Principles Update (#1650)
I went ahead and rephrased much of the Game Design Principles to make
them clearer.

---------

Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
Co-authored-by: Krzysztof Wiśniewski <argmaster.world@gmail.com>
Co-authored-by: IntegratedQuantum <jahe788@gmail.com>
2025-07-26 14:25:00 +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
EN
432e476d0f
add .mushroom tag and make mushroom logs cuttable (#1717)
Added ".mushroom" tags suggested here #1713 
Also made the mushroom logs ".cuttable" to match the rest of the
mushroom blocks.
2025-07-24 16:49:17 +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
codemob
8a0eeaa9ae
Use mineable, choppable, diggable, and cuttable instead of stone, wood, sand, and leaf. (#1711)
Fixes #1604 
Fixes #1601
fixes #1712
2025-07-23 20:06:40 +02:00
IntegratedQuantum
709abbd5bd Add an issue template link and a file for info about content suggestions 2025-07-22 20:28: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
a8470ea78a Always compile with --prominent-compile-errors
So far I couldn't see any downsides from doing this.
2025-07-21 18:37:48 +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
OneAvargeCoder193
32760169f7
Make the new cactus block craft the cactus arm instead of the old one. (#1694)
fixes #1693
2025-07-20 09:49:38 +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
IntegratedQuantum
701627fdbf fix formatting 2025-07-10 20:41:17 +02:00