1277 Commits

Author SHA1 Message Date
IntegratedQuantum
701627fdbf fix formatting 2025-07-10 20:41:17 +02:00
IntegratedQuantum
fc1897de92 Banish those large assets into a separate repository
A first step towards #763 to unblock the addition of large assets.
2025-07-10 20:35:15 +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
OneAvargeCoder193
ffcdf5e91f
Enable placing logs on transparent blocks (#1660)
fixes #1579
2025-07-07 16:57:05 +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
Krzysztof Wiśniewski
19fe9508d5
Binary Item storage (#1473)
## Description

This pull request implements binary storage for items to allow more
compact storage of inventories for ECS and block entities.

## Links

Depends on: #1494 
Depends on: #1478

---------

Co-authored-by: OneAvargeCoder193 <mgiakimenko@outlook.com>
Co-authored-by: OneAvargeCoder193 <85588535+OneAvargeCoder193@users.noreply.github.com>
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
2025-07-06 12:44:42 +02:00
IntegratedQuantum
a8ffa97ebc Buoyancy, volume friction and volume mobility
fixes #83
fixes #84
first prototype of #85
2025-07-05 16:56:29 +02:00
IntegratedQuantum
4b856619b5
Trying out miniaudio (#1652)
It does seem to offer a higher level interface, including spatial audio.

However this proof of concept only uses the low level interface, which
is pretty similar to port audio so far, also performance-wise.
Only technical difference so far seems to be that we can actually deinit
it without crashing.

@ikabod-kee since you got better ears for this, could you check if you
notice anything that got better or worse with this transition?
Particularly, I'd like to know if you notice any improvements with
respect to #571.

Remaining work if accepted:
- [x] Include this in the libs and precompile it instead of adding it
here
- [x] remove portaudio from the libs
- [x] make a new libs release and use it here
- [x] Remove remaining references of portaudio from the source

fixes #415
fixes #571
2025-07-05 11:49:18 +02:00
IntegratedQuantum
dd506e197e Don't allow two players of the same name to join (except from testing worlds)
fixes #1636
2025-07-01 22:47:36 +02:00
Krzysztof Wiśniewski
54aab15a4e
Add SBB rotation parameter (#1530)
## Description

This pull request adds `rotation` parameter to `cubyz:sbb` simple
structure with default value `.random` which allows specifying fixed or
randomized rotation for structures generated. Rotation for structure is
only propagate through the strcuture children only for vertical child
blocks. Additionally, a `rotation` parameter was added to structure
building block children definition to allow overriding / re-enabling
random rotation for children of strcuture. Default value for that
parameter is `inherit` which takes the rotation of parent (only for
vertical child blocks until interrupted). Valid values for rotation are
`0`, `90`, `180`, `270`, `random`, `inherit`, all accepted as a string,
numeric values also accepted as floats and integers.

## Links

Resolves: #1529

---------

Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
2025-06-28 16:38:36 +02:00
Krzysztof Wiśniewski
254546c789
Use enum instead of packed struct for *Index objects (#1640)
Resolves: #1600

---------

Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
2025-06-28 15:45:34 +02:00
IntegratedQuantum
24a1fcdc69
Use world-space dithering as well as a better dither matrix to handle transparency in mipmapping/anisotropic filtering (#1641)
- [x] Prototype
- [x] Remove old code
- [x] ~~Apply this form of dithering to other shaders as well (item
drop)~~ → old dither looks better for items and display model
- [x] Can we finally remove the dither seed?
- [x] Check performance impact → it's slightly (insignificantly) faster
even
2025-06-26 20:14:54 +02:00
IntegratedQuantum
ba5711f607 Fix remaining shaders affected by a8b36f3ca450d83e9fd2e903bb998b5f4169b7ad 2025-06-20 22:37:58 +02:00
IntegratedQuantum
a8b36f3ca4 Don't use vector types in the GPU buffer.
I decided to pack the corner positions, everything else would have made it more ugly.

fixes the most relevant part of #1634
2025-06-19 22:04:26 +02:00
Krzysztof Wiśniewski
9c33f8184d
Fix amber ore (#1633)
Amber ore was not adjusted to #1509
2025-06-19 16:46:28 +02:00
IntegratedQuantum
74ceef2902
Use issue forms (#1631)
makes the issue template UI nicer than it is right now

related: #1625
2025-06-18 16:04:21 +02:00
Yiheng Wu
f75f3d40e4
Calculate font unit per pixel dynamically (#1629)
This PR turns font unit per pixel (a "magic number") into actually
computed value. Previously the "font unit per pixel" is hardcoded as
float `4.0`, because `units_per_EM` field of unscii is 64, and default
font size is 16. If another font is loaded, layout will be corrupted by
invalid scaling of `glyphPositions`. Note that only transformation from
font unit to pixel is affected, no visual change is made, and width of
glyph(character) is not changed.
2025-06-18 15:37:50 +02:00
Krzysztof Wiśniewski
fe09535244
Add coniferous trees the way I like them (#1377)
I still need more variants of lushy branches, also the average branch
variants seem a bit bare, too bare IMO, tho maybe these are things we
could tweak later?

![Screenshot 2025-06-02
000603](https://github.com/user-attachments/assets/b190ec37-a897-4373-ade2-da4bd53d761c)
![Screenshot 2025-06-02
000620](https://github.com/user-attachments/assets/4c63b49a-6b74-47a5-aabb-f0731a1b8377)
![Screenshot 2025-06-02
000636](https://github.com/user-attachments/assets/2bb1cbc6-8307-4289-aab7-309faae93f25)
2025-06-17 18:23:47 +02:00
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
b7da179eab
Create issue templates 2025-06-16 19:52:28 +02:00
ikabod-kee
61b05ba1b5
Create GAME_DESIGN_PRINCIPLES (#1466)
Adds game design principles for Cubyz that we can follow.
This PR is a work in progress, so please chip in with feedback and
suggestions.

I am also not the best at wording; feel free to make suggestions to how
things are worded to make it easier to understand.

---------

Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
2025-06-16 19:35:31 +02:00
IntegratedQuantum
e17e6e2067 Simplify obj parsing code 2025-06-14 11:00:24 +02:00
Carrie
ce9e0dc4ef Update tool textures (#1621)
![image](https://github.com/user-attachments/assets/ede1ffc2-dce6-4e09-8c5e-a8d7cb7572cf)
2025-06-08 21:41:16 +02:00
OneAvargeCoder193
dde261750a
Stop erasing the old logs from inventories that already have them (#1616) 2025-06-08 16:05:06 +02:00
IntegratedQuantum
a8767938f0 Don't schedule draw calls when there are no chunks to draw.
should fix #1614
2025-06-08 11:54:14 +02:00
Krzysztof Wiśniewski
9f0289551d
Add ToolTypeIndex struct (#1478)
## Description

This pull request adds `ToolTypeIndex` struct that behaves similarly to
`ModelIndex` and `BaseItemIndex` structs.

## Links

Related to: #1290 
Related to: #1060

---------

Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
2025-06-08 11:38:33 +02:00
IntegratedQuantum
cd4cd8e9b9
Add and allow for more optional slots (#1612)
This checks slots based on texture connectivity. It really is just a
gimmick at this point, but it has potential to be more than that with
the right modifier restrictions.
![Screenshot at 2025-06-07
10-03-05](https://github.com/user-attachments/assets/e2aa96d4-8add-47cf-abc4-97f383c5fe41)
![Screenshot at 2025-06-07
09-59-46](https://github.com/user-attachments/assets/6aa00d24-8a97-4200-8c77-86b9751d2e2d)
![Screenshot at 2025-06-07
09-54-42](https://github.com/user-attachments/assets/247a2fdd-29ce-4467-85ff-3183f0ec36f1)

The big questions I have for you are:
- Is it obvious why some tools don't work while others do or is this too
confusing?
- @careeoki can you improve the texture to look better for these crooked
tools? Many slots do just seem to produce a thin line of diagonally
connected pixels, and this really doesn't look good and the algorithm
doesn't accept those as valid connections.

fixes #1589
2025-06-08 11:32:56 +02:00
archbirdplus
a24729eb40
Orient blocks in inventory to face left (#1618)
Implements @careeoki's suggestion, aka resolves #1577. Also fixes a
comment I didn't like.

<img width="789" alt="Screenshot 2025-06-07 at 21 44 36"
src="https://github.com/user-attachments/assets/e4b7e1b0-a1ea-4968-869b-ece5bf69386c"
/>
2025-06-08 11:20:37 +02:00
archbirdplus
27ef22e21a
Allow send Add ## in chat (#1617)
Resolves #1615.
2025-06-08 11:19:16 +02:00
IntegratedQuantum
bf7d20f11e
Separate the face buffer based on LOD (#1609)
- reduces allocator overhead (less items in the free list of each
buffer)
- reduces the chance to run out of fake GPU memory (we can now
effectively store 50% more faces than before)
- reduces the chance to run out of actual GPU memory
- reduces height of lag spikes of buffer resizes (but increases their
frequency)
- makes it more clear in which LOD (LOD1) the main memory bottlenecks
are
- reduces the occlusion culling lag (#1161) after disocclusion of parts
of the screen (roughly halving the impact).

It however does decrease the granularity of timing information, since I
can no longer look at the passes separately, but I think that's a fair
price to pay

- [x] cleanup
2025-06-07 09:32:05 +02:00
IntegratedQuantum
b1af1be3d2
Cleanup and fix the deposit on close behavior of the workbench. (#1602)
In the process I had to improve how the player inventory is handled,
which required adding an interface to externally load an inventory for
the inventory system.

This new interface is also relevant for block inventories, which is why
I would like you to review this @Argmaster

fixes #978
2025-06-06 19:26:21 +02:00
IntegratedQuantum
e91f42225b Show the base stats of the result tool in the workbench gui
fixes #229
2025-06-05 19:46:03 +02:00
IntegratedQuantum
552ddc78c6 Encase amber 2025-06-03 19:15:01 +02:00
Carrie
44e9232dff
Amber ore & blocks (#1585)
part of #1326

![image](https://github.com/user-attachments/assets/702eb90d-3445-40c9-a6cf-8f6161d7b830)
Amber starts generating at -1250. I would still want it to appear in
sandstone caves, beaches, etc. but we don't support that right now.


![image](https://github.com/user-attachments/assets/e3a5acac-75b7-4d70-8e49-85d84c5fd004)
Amber has the `light` modifier at 50%


![image](https://github.com/user-attachments/assets/93dd9ce9-25cb-46a4-a633-1e6af72e5032)
Something unique compared to other gem blocks is that amber is
translucent.
2025-06-03 18:38:18 +02:00
Krzysztof Wiśniewski
ac76d1ffd6
Move compiler detection to separate scripts (#1573)
This will allow for Cubyz Dev Kit to install compiler without building
the project itself.

---------

Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
2025-06-02 15:50:25 +02:00
IntegratedQuantum
03a5e2cf38 The particle hashmap was never inited 2025-06-02 15:38:40 +02:00
OneAvargeCoder193
a59ac2b011
Change log rotation to be more similar to branches, and also remove log_top (#1496)
Fixes #357 

Stuff left to do

- [x] Make them more like branches
- [x] ~Make them rotate~ Fixed automatically by making them like
branches
- [x] ~Let them be chiseled like stairs?~ This will be a future pr
- [x] Automatic migration between old and new logs

---------

Co-authored-by: Carrie <carriecapp9@gmail.com>
2025-06-01 17:17:33 +02:00
IntegratedQuantum
0c1ee186b2 Silence some of the less important OpenGL messages
fixes #1532
2025-06-01 15:22:47 +02:00
IntegratedQuantum
39bea9a66e Fix lossy chunk compression for transparent blocks
fixes #1565
2025-06-01 15:05:18 +02:00
IntegratedQuantum
4dc994ae9d Remove the text listener while deiniting the component
Previously there was a rare race condition where this could crash.

should fix #1562
2025-06-01 14:48:44 +02:00
IntegratedQuantum
beed67403e Allow summing tool parameters instead of averaging them.
Currently everything uses average, but it does make some things less intuitive.
2025-06-01 14:32:20 +02:00
Krzysztof Wiśniewski
8f9ebe55fa
Allow direct use of blueprints as SBBs (#1500)
## Descriptions

This pull request adds inline SBBs feature which allows blueprints to be
used directly (without SBB zon file) as child in other SBB files.
Blueprint used this way must not any child blocks on it's own.
To ensure that the feature works correctly some of the now redundant SBB
zon files were removed.
Current implementation generates SBB at runtime for each of the
blueprints that has 0 child blocks and doesn't have an SBB with same ID.
In the future the implementation could be changed to create SBBs on
demand, to avoid wasting memory on blueprints which are not used or use
SBB with different name, that is not critical tho (really small gains)
and requires #1499

## Links

Resolves: #1403

---------

Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
2025-06-01 12:56:54 +02:00
Carrie
74b0fb4431
Misc texture palette tweaks (#1568)
Some thrilling and game-changing texture edits:
These are a bunch of small tweaks that have been on my to-do list.
Ideally i would have before/afters for these but they are so minor that
I feel its not worth the effort

- Lower contrast of brightest sand colour (this was bothering me all
week when testing logs in the desert)

![image](https://github.com/user-attachments/assets/764933e4-11db-4f68-9081-5ab9f29d7233)

- Lower contrast of duckweed 

![image](https://github.com/user-attachments/assets/73820d80-c17d-4cb4-96d4-52e784d9d2be)

- Reduce hue shifting on red chalk (the darkest colour is now more red
than more pink)

![image](https://github.com/user-attachments/assets/cf56f087-b33b-4250-8877-e56977c87905)

- Darken dead leaves & lower contrast. This is probably the most
noticeable change. (ensuring good contrast when on top of grass blocks)

![image](https://github.com/user-attachments/assets/1fe5c9b1-3f05-45a3-96bc-8550e3a49d60)
2025-06-01 11:28:32 +02:00
MnHs
152e91b6d1
Fix particle UVs (#1564) 2025-06-01 11:17:40 +02:00
IntegratedQuantum
4b3e5aebf2 Introduce a testing mode for developers which doesn't reload LODs on biome changes and doesn't save maps either.
fixes #1489
2025-05-31 14:20:02 +02:00
IntegratedQuantum
b9a43284c6 Close all settings windows when the mouse is grabbed
fixes #710
2025-05-31 13:57:14 +02:00
IntegratedQuantum
3846cd54d4 Add crafting recipes for signs 2025-05-31 11:09:25 +02:00
Krzysztof Wiśniewski
df99bfc804
Add baseItem migrations (#1534)
Resolves: #1503
2025-05-31 11:05:40 +02:00
IntegratedQuantum
eaaf524f99
Signs (#1446)
- [x] Rotation (already merged)
- [x] basic GUI
- [x] sign models and textures
- [x] sign blocks
- [x] update the text on the client
- [x] Figure out block entity rendering
- [x] Render the text to a texture on update
- [x] Render the texture in the world in the location of the sign
- [x] Use varint instead of u32 for storing the block data lengths,
(now, while we can still change it)
- [x] Sync the text with the server and all clients
- [x] Figure out block entity storage on the server
- [x] Send the entity data of the initial chunk
- [x] Store the text on the server
- [x] Set the chunk as changed whenever a block entity data update
happens, so we actually store it
- [x] Disable or figure out optimized local chunk transmission
- [x] fix memory leak
- [x] Rethink some of the API (do we need onPlace/onBreak, when there is
unload and updateData?)
- [x] Remove the background shadow from text, it produces too much
aliasing
- [x] Figure out if the default should be black or white
- [x] Correctly center the text
- [x] Why are newlines not working?
- [x] Check if a deadlock is possible on deinit --- it would be possible
only if another thread has a reference to it, which should not be the
case when unload is called.
- [x] Set the text margin and sizes reasonably
- [x] Make sure the GUI fits with the sign width
- [x] Create an issue for configurable sign texture size and
configurable default color

fixes #367

---------

Co-authored-by: Carrie <122191047+careeoki@users.noreply.github.com>
Co-authored-by: OneAvargeCoder193 <85588535+OneAvargeCoder193@users.noreply.github.com>
2025-05-31 10:49:50 +02:00
Carrie
b333d22bbc
Add sickle (#1550)
resolves #1547 

The sickle, balanced to the best of my ability. It breaks `.leaf` and
`.cloth` tagged blocks.
A metal sickle lets you get rid of floating leaves or clear a grassy
field super quickly.


![449059994-d2c01e85-3d92-471b-a4e3-e766d7dfb00b](https://github.com/user-attachments/assets/428afbc0-e337-4cb6-9469-e02acdbcadda)

![449060984-db0d1f5d-5f2f-4cd0-b4e1-bffd1046be09](https://github.com/user-attachments/assets/b5d5d517-c3c0-4442-82b4-8dfa07508a19)

![449060868-712ecad3-f6ef-432c-8269-de34c59ba154](https://github.com/user-attachments/assets/3d2528ed-62e5-44ed-a3bf-d19b37877216)

![image](https://github.com/user-attachments/assets/e4d52853-501c-44dc-a933-8855b1b91c79)
2025-05-30 20:40:44 +02:00