739 Commits

Author SHA1 Message Date
IntegratedQuantum
330187b9ae Update zig version 2024-09-14 13:42:25 +02:00
IntegratedQuantum
8987dc4eb0 Pull zig from a github repo instead of relying on ziglang.org, this should be more stable.
fixes #719
2024-09-13 23:55:27 +02:00
Zachary Hall
cf6e9df663
Fix Zig download url (#718)
* Update debug_linux.sh

* Update debug_windows.bat
2024-09-13 22:04:15 +02:00
Zachary Hall
51e0d55a0c
Don't trigger window drag when trying to click on a window button (#695)
* Refactor getting X positions of buttons in preparation for not moving the window when clicking the buttons

* Prevent moving the window by the buttons

* Use tabs instead of spaces for indentation, done using sed.

* Fix formatting actually now with sed in while loop

* Attempt to fix indentation

* Add minimum width and change return type of getButtonPositions

* Include window ID in size error

* Fix orientation lines showing when clicking button and incorrect scaling for button press detection on windows

* Don't include windows without titlebar in window size requirement

* Take into account closability of windows when calculating min width

* Add single quotes around window ID in the width error message for clarity

* Fix chat window automatic sizing, refactoring the minimum window size check in the process
2024-09-12 20:20:11 +02:00
ITR
e07a51c9d9 Was accidentally checking against steppingHeight instead of height.
Fixes #703
2024-09-10 18:44:42 +02:00
IntegratedQuantum
f9079be9ca T to open chat.
extracted from #412
fixes the first half of #428
2024-09-09 21:11:59 +02:00
IntegratedQuantum
c5a9ea53cd Clamp /tp coordinates to prevent people from crashign the server by teleporting to a distant location.
This is a temporary work around, until #310 is implemented.
2024-09-09 20:28:46 +02:00
IntegratedQuantum
9f63353f4a Fix rendering of empty strings in debug menus.
fixes #704
2024-09-09 20:23:05 +02:00
IntegratedQuantum
a5a1f53e90 Use a VirtualList for client entities to ensure stable pointers on resize.
fixes #648
2024-09-08 10:51:09 +02:00
Carrie
eecad02ced Add breaking textures. 2024-09-07 22:32:08 +02:00
ITR
df76d2da1b Added ctrl+a to select all text in a text-box 2024-09-07 22:27:19 +02:00
IntegratedQuantum
1764de2912 Fix height check for cave biomes.
fixes #693
2024-09-06 22:45:02 +02:00
IntegratedQuantum
b162199138 Add a VirtualList which preallocates a large amount of virtual memory to ensure that resizing doesn't invalidate pointers.
There is no direct use case for this yet, but I'm sure this will become handy in the future.

fixes #671
2024-09-06 22:22:15 +02:00
ikabod-kee
b748dbec4b Add files via upload 2024-09-06 19:59:07 +02:00
ITR
d6ec78bb44 Remove spammy warning from biome generation. 2024-09-05 21:34:00 +02:00
Mikael Klages
aa04731efb
Ignore user generated backgrounds in the assets/backgrounds folder. (#682)
* Ignore user generated backgrounds in the assets/backgrounds folder.

* Add back newline at end of file in .gitignore
2024-09-05 21:16:49 +02:00
Mikael Klages
a5ae38aba0
Fix #676 Player keeps forwards momentum when sliding against block (#681)
* Fix #676 Player keeps forwards momentum when sliding against block

* Fix velocity stopping one frame too late
2024-09-05 21:16:10 +02:00
OneAvargeCoder193
5cb12cc3ed
Models (#657)
* Added ability to load .obj files

* remove .mtl file

* Replaced z up with y up in obj because apparently it is better

* Make cubyz support blockbench models correctly

* Not working changes

* Segfault

* Fixed bugs because i felt like it

* Catch up

* stuff

* Stuff

* Catch up

* Remove unneccessary code

* Changes to hopefully fix things

* Remove debug log

* Remove exportModel function

* Updated new blocks

* Fixed some std.log.err calls

* aaa

* I AM SO HAPPY YEEEEESSSSSSSSSSSSSSSSSSSSSSSSS

* im silly

* remove commented line

* Remove useless code

* remove thing

* remove backgrounds

* export function just in case i make an oopsie

* add 1 to indices

* final exportModel fix before i remove

* remove export model

* i forgor to do the uv stuff

* hopefully final exportModel change

* yoo

* final changes

* fixed memory leak
2024-09-04 22:18:45 +02:00
ITR
e1d715ce1c Fix fps cap slider being shown as 144 when the settings are opened, despite being unlimited in the settings. 2024-09-04 20:54:31 +02:00
ITR
3c7bd88f6a Reset fadeOutEnd when chat lists are created.
Fixes crash when reentering world in singleplayer after a chat message has faded out.
Fixes error mentioned in https://github.com/PixelGuys/Cubyz/issues/649#issuecomment-2327506297, but does not affect #649
2024-09-04 20:53:58 +02:00
Mikael Klages
2950c152bb
Fix issues with check_format.py (#667)
* Made format_check use os.sep when checking if it should ignore a folder

* Made format_check specify utf-8 encoding when loading files.

* Fixed documentation using wrong filename for format_check.py
2024-09-04 20:53:02 +02:00
ttmso
830db8185e
Fix overwriteing held item when copying block (#662)
undefined
2024-09-04 20:36:42 +02:00
Mikael Klages
d5ae89f846
Player physics fixes and more debug info (#663)
* Add more player debug info to debug.zig

* Made format_check use os.sep when checking if it should ignore a folder

* Made format_check log the file path if an exception occurs

* Made format_check specify utf-8 encoding when loading files.

* Extracted repeated code from player collision check

* Added back eyepos check that affected physics

* Made unstuck always unstuck upwards for the time being (affects #521)

* Added "coyote time" to eyes when you step off a ledge (fixes #636)

* Added eye data to debug info

* Use smarter eyebox check suggested by Quantum.

* Made collideOrStep return Vec3d with correct index set instead of Vec2d.

* Made sure debug loads atomic bools

* Make eye coyote debug number prettier by not showing it being less than 0

* Revert format_check.py changes to have them in a separate commit.

This reverts commit bebdaa57ce74c0d8152e9a3eedeb2ed96a1515ce.
This reverts commit 1e05bd42982ec3516a4f273a5ba3972d70efe1d8.
This reverts commit 2b4944e60c7441e29c7f96bfcc2d0f3436a01ca8.

* Fix accidentally replacing the wrong argument in a67aa290
2024-09-04 20:31:20 +02:00
IntegratedQuantum
afe744fa7d Fix margin calculation in the CaveBiomeMap.
fixes #640
2024-09-03 21:59:17 +02:00
Carrie
53f9abe23b Update diamond and stick material 2024-09-03 20:24:03 +02:00
IntegratedQuantum
1dc0cfa010 My driver doesn't seem to like discards in a while loop.
fixes #654
2024-09-01 21:58:06 +02:00
IntegratedQuantum
542e1270c5 Fix buffer overflow when receiving a brute forcing port message produced by trying to connect from a symmetric NAT.
Should fix #655
2024-08-31 20:25:31 +02:00
IntegratedQuantum
cb20d886dd Fix the enter name prompt not showing on first game launch. 2024-08-31 10:33:53 +02:00
IntegratedQuantum
e49353aad9 Reduce locking in the ThreadPool to avoid locking while calling any task related functions.
fixes a deadlock and reduces the chance for future deadlocks of this kind.
should also fix #384 since now the largest continuous locking time is shorter.
2024-08-29 15:16:06 +02:00
IntegratedQuantum
4cbf907256 Refactor the collision code, moving it outside of the Player struct. 2024-08-18 19:09:09 +02:00
IntegratedQuantum
47356faa23 Fix some item drop physics and visuals.
It uses 4 collision checks to ensure that the item drop doesn't fall through blocks.
Jittering is fixed by adding the acceleration before the collision test.
items are now larger than blocks
items are now centered.
2024-08-18 18:49:51 +02:00
IntegratedQuantum
f0f64e369c Scale the item drops to 0.25 2024-08-18 14:01:54 +02:00
IntegratedQuantum
3abe7e4950 Fix deadlock in Entity chunk creation/destruction 2024-08-17 11:21:42 +02:00
IntegratedQuantum
ce17aee034 Rotate item drops around their center. 2024-08-17 11:10:44 +02:00
IntegratedQuantum
3a6f55b8e7 Implement block drop rendering and fix a couple synchronization issues. 2024-08-17 11:01:22 +02:00
Carrie
44bb49ee5b Add lava caves, obsidian, and dirt 2024-08-11 10:44:28 +02:00
IntegratedQuantum
d23ffc2919 Fix some of the server side physics for item drops.
fixes #637
2024-08-10 22:49:33 +02:00
IntegratedQuantum
d8a3df1aa4 Fix item drops for items with textures.
Fixes the first half of #635
2024-08-10 21:43:49 +02:00
IntegratedQuantum
85ce42d023 Output a question mark before the port when symmetric NAT is detected.
All the other logic for handling it is already in place.

Might fix connection issues for some people.
2024-08-10 17:17:05 +02:00
IntegratedQuantum
0f654ea5cd Send item drop data to the client.
fixes #622
2024-08-05 10:58:55 +02:00
IntegratedQuantum
0efb90a682 Use the new EntityChunks for item drop simulation, and ensure that saving and storing of item drops works.
progress towards #622
Still needs to send them back to the client and check if everything works correctly.
2024-08-04 21:48:03 +02:00
IntegratedQuantum
16852488b7 Ensure that chunks inside the simulation distance remain loaded on the server.
fixes #76
2024-08-04 13:57:06 +02:00
IntegratedQuantum
2d359ccb86 Turn chunk.Neighbors into an enum.
Syntactically this seems to be a pretty neutral change, some expression get longer, other get shorter.
But I guess it increases type safety and I could also replace some of the more magic operations, like `neighbor ^ 1` with a named function.

fixes #602
2024-08-03 17:21:20 +02:00
IntegratedQuantum
55a3957917 Structure chance is now a chance per spawn point instead of a chance per block.
This is more intuitive, but it requires multiplying all the chances in existing biomes by 16×.
2024-08-03 15:49:35 +02:00
IntegratedQuantum
b7a1371f0b Open the block gui when right clicking it.
Also removed the keybind for the crafting gui, since it can now be opened from the game.

fixes #237
2024-08-02 21:24:08 +02:00
IntegratedQuantum
307cf453f1 Fix crash when re-entering a world.
this should finally make the exit to menu button usable.
fixes #100
2024-08-02 21:06:50 +02:00
IntegratedQuantum
2870340ff5 Fix how music is played to avoid crashing when leaving the world.
fixes #408
2024-08-02 20:59:28 +02:00
IntegratedQuantum
135dcd2425 Exit to menu on disconnect.
fixes #632
2024-08-02 20:32:00 +02:00
IntegratedQuantum
35466ec140 Add a window to kick players and cancel open invitations.
fixes #371
2024-08-02 20:18:43 +02:00
IntegratedQuantum
783f342ad9 Allow player to reconnect when the server still thinks the old connection is active.
This makes it easier to reconnect to the server when the client crashed.

fixes #369
2024-08-02 11:07:05 +02:00