IntegratedQuantum
10ad990617
fix formatting
2025-04-20 18:24:41 +02:00
IntegratedQuantum
b0e067a458
I forgot to add the file
2025-04-20 18:12:20 +02:00
IntegratedQuantum
176c9d4c75
Introduce item tags and generalize the tag system
...
All tags now share the same index space, I don't see a reason why we should have separate spaces for these.
I also made diamond powerful if encased in gold/silver
2025-04-20 17:43:24 +02:00
IntegratedQuantum
4286455915
Implement basic modifier restrictions with an example for diamond.
...
Still needs tooltips and item tags to be more useful
2025-04-20 13:57:05 +02:00
IntegratedQuantum
5f54d48a73
The new network system ( #1297 )
...
* Create the foundations of the new network system.
* Fix memory leak
* Implement a simple additive-increase-multiplicative-decrease congestion control scheme.
Also fixed the locking with the send path
* Fix edge case for mismatch in read and available position
* fix formatting
* Reimplemtent network statistics of the F6 menu
* Fix problem the F6 window size
* Rename size to capacity
* Implement the advanced network debug menu
* Fix a few problems
* Actually call the handlePacketLoss function
* Reduce startup delay and fix possible problems with negative RTTs
* Fix crash in block of partially received packets.
* Use a PriorityQueue for unconfirmed packets.
Also fixed a display issue in the advanced network menu
* Always send confirmations and change how packet loss is handled to avoid killing the network connection by only resending packets outside the receive buffer.
* Use the length instead of the endIndex in the CircularBufferQueue
this just made everything more difficult to work with.
* Optimize CircularBufferQueue.enqueueSlice with memcpy
* Fix problem with zero-length packets, which is a valid use case
* Fix a small edge case
* fix formatting
* Add missing code to increase the capacity in enqueueSlice
* Don't send more data than the receive buffer can fit.
* Use a better data structures that handles the received ranges
* Use memcpy in more circular buffer functions
* Send a keepalive if the connection hasn't been established but the player was invited by the server
* Implement disconnecting for the new protocol
* Reimplement timeout
* Only add new connections when the other side actually sent an init packet.
otherwise the connections stay in the queue, and need keepalives.
also moved the code from the invite window to network.zig, where it belongs
* Don't allow queueing more than 2 GiB of data (i32 limit)
* Reimplement and simplify reconnection
* Use member functions for Socket
* React to packets using a scheme similar to TCP
TCP will send a fast retransmit on first loss discovered by DACKs, shortly after starting the RTO timer.
In essence this means that only second loss of the smallest packets is handled by congestion control.
* Increase scaling after congestion control halves bandwidth.
Now it increases it by at least 1%, isntead of only by the MTU
* Use start and len instead of start and end for the RangeBuffer
* Use ListUnmanaged in RangeBuffer
* Rename flawedReceive to tryReceive
* Add a `ms` constant to make it easier to see what units some of the constants use.
Also added a function alias for microTimestamp to make it potentially easier to change to other timestamps in the future.
2025-04-19 15:05:02 +02:00
IntegratedQuantum
a6ef0dc57e
Update CONTRIBUTING.md
...
as discussed in #1297
2025-04-19 13:13:09 +02:00
Carrie
332e9f57f0
Add silver ore ( #1306 )
...
* Add silver ore, ingot, block, lower gold ore
* Add recipes, make gold and silver ore values different
2025-04-16 12:36:26 +02:00
Carrie
d4e187e5af
Redistribute ores ( #1304 )
2025-04-14 09:27:54 +02:00
Carrie
da3ffce871
Big mushroom blocks ( #1299 )
...
* Add big mushroom blocks, tweak mushrooms to match
* Add mushroom branches, make glimmergill cap emissive, add recipes, material vals
* Tweak blockHealth
2025-04-13 16:50:23 +02:00
Carrie
871b635cae
Sulfur ore, block, and torches ( #1287 )
...
* Sulfur ore, block, and torches
* Tweak block health
* Add material values, brighten sulfur block
2025-04-13 16:45:05 +02:00
Krzysztof Wiśniewski
823faf64b7
Add tests for BinaryReader
and BinaryWriter
( #1273 )
...
* Add tests for BinaryReader and BinaryWriter
* Add guards for integer values
* Add small integer edge cases
* Add mixed data test
* Apply review change requests
* Use std.math.divCeil
* Adapt to endian parameter removal
* Apply review change requests
* Change duplicate u8 into u0
2025-04-05 11:19:35 +02:00
Carrie
747a2dc957
Add copper ore and make iron generate deeper ( #1268 )
...
* Add copper ore and redistribute ores
* Add copper recipes
* Revert ore redistrib, nerf copper
2025-04-04 17:32:15 +02:00
Krzysztof Wiśniewski
00c6b29736
Always use big endian ( #1274 )
...
* Always use big endian
* Apply review change requests
2025-04-03 21:32:59 +02:00
IntegratedQuantum
db3d640c2a
Add some testing for joining zon and fix #1231
2025-04-03 19:44:26 +02:00
IntegratedQuantum
0762e30955
Update CONTRIBUTING.md
...
I added a section on performance
2025-04-03 18:05:51 +02:00
Krzysztof Wiśniewski
f4e472c218
Add /set
command ( #1236 )
...
* Add /set command with pattern support
* Fix formatting issues
* Remove pattern code from PR
* Fix imports
* Apply review change requests
2025-04-02 21:23:37 +02:00
Krzysztof Wiśniewski
b0af58b21b
Refactor sendKeepAlive and receiveKeepAlive ( #1265 )
2025-04-02 21:18:17 +02:00
Krzysztof Wiśniewski
92fcd10069
Modernize genericUpdate
protocol ( #1257 )
...
* Modernize genericUpdate protocol
* Do not complicate sendGamemode
* Apply review change requests
* Yeet cure
* Rename to biomesByIndex
* Update src/network.zig
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
* Use @typeInfo(T).vector
* Update src/network.zig
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
* Undo blind remove of TODO
* Update src/server/terrain/biomes.zig
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
* Remove defaultIndex argument from getByIndex
* Make biomesByIndex a ListUnmanaged
---------
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
2025-04-02 18:05:36 +02:00
Krzysztof Wiśniewski
098115ad53
Block Entity Data ( #1224 )
...
* Implement VTable for entity data
* Make storage variable global
* Connect onInteract event
* Remove chest poc
* Revert "Remove chest poc"
This reverts commit 49759687dba180cbdf9609cfd942d2363991c4d5.
* Separate client and server callbacks
* Fix formatting issues
* Apply review requests
* Add assert and todo
* Apply review requests
* Remove chest textures
* Fix plenty of bugs in implementation
* Update src/entity_data.zig
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
* Update src/entity_data.zig
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
* Do not trigger onInteract while shifting
* Apply review requests
* Apply review change requests
* Update src/game.zig
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
---------
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
2025-03-31 20:07:31 +02:00
IntegratedQuantum
780c750162
Move the VirtualList into a new file, which will contain other virtual memory related data structures in the future.
2025-03-31 18:46:08 +02:00
IntegratedQuantum
2766b263c4
check if the item in the crafting inventory is null before using it.
...
fixes #1256
2025-03-30 19:30:11 +02:00
Krzysztof Wiśniewski
a7052d25f5
Add /redo
command ( #1238 )
...
* Add undo and redo commands
* Remove unintended change
* Remove redo code
* Revert "Remove redo code"
This reverts commit 80aeca1dc2d0f7b3f3570b95937a8f7fd87cac5d.
* Fix variable name in /redo
* Update import
2025-03-30 17:03:19 +02:00
IntegratedQuantum
1b7102768f
Remove the time from itemdrop rendering.
...
This was used for animated textures which isn't necessary anymore.
2025-03-30 12:13:15 +02:00
MnHs
f8210eb7b4
Add player item display ( #1109 )
...
* extract item model storage from itemdrop renderer to its own struct
* render player held item
* render display item on top of everything
* add custom projection matrix that ignores fov settings
* fixed item display position
* change indentation from spaces to tabs
* improved item display, added interpolation and hiding
* fix formatting
* cleanup
* cleanup, made item movement
* localize item display projection matrix
* fix formatting
* add lighting interpolation, remove item sway
* fix formatting
* switch to trilinear interpolation
* fix light interpolation
* fix formatting
* small tweaks
* small tweaks, move item hiding to f2 button
* some rendering tweaks
* fix item clipping
* resolve conflict
2025-03-30 12:09:24 +02:00
Krzysztof Wiśniewski
4a8c0a6327
Refactor SurfaceMap.zig
to use BinaryReader
and BinaryWriter
( #1252 )
...
* Refactor reading
* Refactor writing
* Apply review requests
2025-03-29 15:07:38 +01:00
Krzysztof Wiśniewski
34558a2906
Fix rotateZ ( #1253 )
2025-03-29 14:26:43 +01:00
Krzysztof Wiśniewski
21409df5a1
Add Structure Building Block asset loading ( #1240 )
...
* SBB
* Fix rotation code
* Remove rotate command
* Fix segfault during generation
* Delete format.bat
* Pregenerate all rotated blueprints
* Apply review suggestions
* Apply review suggestions
* Change child block storage model
* Resolve child structures during load
* Move structure_building_blocks.zig to terrain
* Update src/rotation.zig
* Apply review suggestions
* Remove sbb blocks
* Remove SBBGen
* Remove example SBB
* Remove blueprint code
* Remove createAssetStringID
* Apply review suggestions
* Apply review suggestions
* Add asset ID generation
* Revert "Add asset ID generation"
This reverts commit ffe8fd281486f2124ab83b0e614b6a7db97a020d.
* Remove SBB loading
* Revert "Remove SBB loading"
This reverts commit 7eabad906dd05e3c128115b824986ff96815ac03.
* Apply review requests
* Restore base.zig.zon
2025-03-28 20:05:46 +01:00
Krzysztof Wiśniewski
d9dc3f1a22
Add block pattern parsing ( #1237 )
...
* Revert "Remove pattern code from PR"
This reverts commit d9296b00cff93e7f0bd0962f012aa98f3ec39915.
* Apply review requests
* Update import
* Rename pattern.zig to Pattern.zig
* Fix compilation errors
* Remove code comment
2025-03-28 20:04:21 +01:00
Carrie
8d54e187cf
Convert leaf piles into texturePiles ( #1242 )
...
* Convert leaf piles to texturePiles, add to biomes, reduce break time
* Fix rotation name, tweak yellow leaf pile texture, delete unused leaf pile textures
2025-03-28 19:57:19 +01: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
a82ed65dfb
Initialize the seed in every thread, also added a helper function for threadlocal (de-)initialization.
...
fixes #1248
2025-03-27 20:09:09 +01:00
Carrie
dc902b3909
Add chest textures ( #1245 )
2025-03-27 16:41:28 +01:00
ikabod-kee
ce750dbe77
Added Duckweed ( #1247 )
2025-03-27 16:15:30 +01:00
Krzysztof Wiśniewski
1ec150d624
Blueprint asset loading ( #1207 )
...
* SBB
* Fix rotation code
* Remove rotate command
* Fix segfault during generation
* Delete format.bat
* Pregenerate all rotated blueprints
* Apply review suggestions
* Apply review suggestions
* Change child block storage model
* Resolve child structures during load
* Move structure_building_blocks.zig to terrain
* Update src/rotation.zig
* Apply review suggestions
* Remove sbb blocks
* Remove SBBGen
* Remove example SBB
* Remove blueprint code
* Remove createAssetStringID
* Apply review suggestions
* Apply review suggestions
* Add asset ID generation
* Revert "Add asset ID generation"
This reverts commit ffe8fd281486f2124ab83b0e614b6a7db97a020d.
* Remove SBB loading
* Apply review requests
2025-03-26 23:05:49 +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
84fe4088fd
Add testing to the CI ( #1246 )
...
* Update ci.yml
* Fix compilation failure of testing code
2025-03-25 21:09:53 +01:00
Krzysztof Wiśniewski
05135f9f4c
Fix biome migrations loading ( #1239 )
2025-03-25 19:05:42 +01:00
Krzysztof Wiśniewski
12d05a06ff
Add /undo
command ( #1228 )
...
* Add undo and redo commands
* Remove unintended change
* Remove redo code
* Clean up redo code
* Use CircularBufferQueue
* Fix formatting issues
* Update src/server/server.zig
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
* Apply review requests
---------
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
2025-03-24 21:47:14 +01:00
IntegratedQuantum
fba10a94c2
Update CONTRIBUTING.md
...
Add file/namespace name convention
2025-03-24 21:30:29 +01:00
IntegratedQuantum
005fb6a3aa
Fix missing newline
2025-03-24 20:38:58 +01:00
IntegratedQuantum
1c2899eafd
Move rotation modes into separate files.
2025-03-24 20:33:39 +01:00
Krzysztof Wiśniewski
f5a2e3d3c1
Revert "Remove sbb blocks" ( #1226 )
...
This reverts commit 65cee0ef1202b3a85f9ac2799dc0f6b902fa4074.
2025-03-24 19:11:10 +01:00
Krzysztof Wiśniewski
d9a4e7cdd9
Extract createAssetStringID
( #1229 )
...
* Revert "Remove createAssetStringID"
This reverts commit 2c20a593e55bd84e202b9bfcbf13affb6f83fb96.
* Undo boy scout behavior
* Apply createAssetStringID to readAllObjFilesInAddonsHashmap
* Generialize ID generation
* Fix formatting issues
* Only remove the extension
* Apply review requests
2025-03-24 19:06:08 +01:00
IntegratedQuantum
1559c9d9e8
Update CONTRIBUTING.md
...
applying changes as suggested in a061dcb254 (r154211561)
2025-03-24 17:04:48 +01:00
IntegratedQuantum
ebf157785a
Fix memory leak in the GPU buffer.
...
mentioned in https://github.com/PixelGuys/Cubyz/issues/1202#issuecomment-2746564753
introduced in e7ecd161ce00851240ad5bb9bcb1aa0bd69dc1d5
2025-03-24 07:51:00 +01:00
IntegratedQuantum
a061dcb254
Update CONTRIBUTING.md, specifically the style guide section
...
fixes #1152
2025-03-23 22:50:40 +01:00
IntegratedQuantum
42268c4b22
Allow branches to have a shell model that's always rendered and add leafy branches for all wood types.
2025-03-23 20:21:37 +01:00
Carrie
8f0693f7b0
Lily pads / adjust water reflectivity ( #1221 )
...
* Add lily pads and reduce water reflectivity
* tweka water reflectivity
2025-03-23 19:36:31 +01:00