Pedro Gimeno
4bb12c872f
Precision improvements (Part 1)
...
Improve rendering precision by subtracting the camera position from the models' position, then temporarily setting the camera to (0, 0, 0) for rendering. This keeps GL coordinates in a low range.
2020-02-24 11:16:19 +01:00
Pedro Gimeno
af1a641a25
Fix calculation of centre position relative to the camera
...
While this fixes the calculation, it introduces visibility determination problems, because the method was not correct. The centre may be out of the area of the camera, with nodes still visible inside. To fix this, the eight corners of the chunk need to be considered.
2020-02-24 11:16:19 +01:00
Quentin Bazin
75f9bc6dbd
[ClientWorld] Teleportation and fast movement won't stop the world from loading. Fixes #50 .
2020-02-24 18:53:21 +09:00
Pedro Gimeno
22ecc2fa8d
Fix 'escape from inside node' after Y/Z swap
...
Missed the case of getting rid of the box at the southwest.
We take the chance for making it more robust by checking all four corners, just in case there's a platform with trouble in an edge case.
2020-02-24 10:38:08 +01:00
Quentin Bazin
879dc28eb2
[FurnaceWidget] Removed. Now completely implemented in Lua.
2020-02-23 22:38:51 +09:00
Quentin Bazin
4eb3e3738f
[ProgressBarWidget] Added.
2020-02-23 20:42:32 +09:00
Quentin Bazin
47b7e3d849
[PlayerCraftingWidget] Removed, implemented completely using Lua.
2020-02-23 18:24:19 +09:00
Quentin Bazin
3399b71de1
[LuaWidgetDef] Added 'resultX' and 'resultY' parameters to 'CraftingWidget' and 'PlayerCraftingWidget'.
2020-02-23 18:00:20 +09:00
Quentin Bazin
904152e1aa
[PlayerInventoryWidget] Removed, only PlayerCraftingWidget isn't coded in Lua.
2020-02-22 22:50:27 +09:00
Quentin Bazin
3cffbc9547
[ChatState] Can now be opened with a slash by using numpad slash.
2020-02-22 03:44:12 +09:00
Quentin Bazin
884562cb36
[Client] Handles disconnection correctly now.
2020-02-22 02:56:55 +09:00
Quentin Bazin
cac41afdfa
[GameState] Now uses GameKey::Chat instead of hardcoded keycode.
2020-02-22 02:16:19 +09:00
Quentin Bazin
2724cb0522
Merge pull request #57 from Unarelith/chat-and-commands
2020-02-22 01:48:43 +09:00
Quentin Bazin
bb0c8e8d49
[ServerCommandHandler] Now supports teleportation command.
2020-02-22 01:44:00 +09:00
Quentin Bazin
3c4fae07f5
[Text] Added the possibility to cut a line in the middle if it's too long.
2020-02-22 01:00:42 +09:00
Quentin Bazin
ec15fec087
[ChatMessage] Added. Messages now have timeout.
2020-02-22 00:31:11 +09:00
Quentin Bazin
087d430acb
[TextInput] Moved background and padding to Text.
2020-02-21 23:58:15 +09:00
Pedro Gimeno
7c8c77d7b9
Change order of enum BlockFace for consistency with Chunk.hpp
2020-02-21 11:02:53 +01:00
Pedro Gimeno
14de0d8e9f
Change vertices array to 2D
2020-02-21 11:02:53 +01:00
Quentin Bazin
e08af87563
[Chat] Added to render messages sent from server.
2020-02-21 17:50:45 +09:00
Quentin Bazin
2f827df14b
[Network] 'ChatMessage' packet added.
2020-02-21 17:25:56 +09:00
Quentin Bazin
676f0937ec
[ChatState] TextInput is now positionned correctly.
2020-02-21 16:33:52 +09:00
Quentin Bazin
8b906d1685
[TextInput] Fixed background. [InterfaceState] Added setting to be able to not display the background.
2020-02-21 16:33:52 +09:00
Quentin Bazin
2ecbdec6bb
[ChatState|TextInput] Added.
2020-02-21 16:33:52 +09:00
Quentin Bazin
530355cb39
[TerrainGenerator] Changed to get back old cave gen. [ClientPlayer] Spawn pos changed.
2020-02-21 16:33:18 +09:00
Pedro Gimeno
c8b5d946a6
Use Z for up (Part 5)
...
Fix other players' box
2020-02-21 03:00:53 +01:00
Pedro Gimeno
5ced7d70d8
Use Z for up (Part 4)
...
Fix chunk visibility test and visibility of world at start.
The assumptions about the working of screen coordinates in the previous commit were clearly wrong.
2020-02-21 03:00:53 +01:00
Pedro Gimeno
9a1b193be9
Use Z for up (Part 3)
...
Fix camera, player movement, and bounding boxes.
2020-02-21 03:00:27 +01:00
Pedro Gimeno
76071d9f26
Use Z for up (Part 2)
...
Fix UVs and ambient occlusion maps. The change of chirality was not enough, as that rotated faces, so that needed to be fixed. This affected vertex indices that were manipulated by the AO algorithm, which needed to be fixed as well.
2020-02-20 23:26:15 +01:00
Pedro Gimeno
7934d217f3
Use Z for up (part 1)
...
Bulk of the changes: swap Y and Z, HEIGHT and DEPTH mostly everywhere; change vertex order to make it right-handed; rename Left, Right, Front, Back to West, East, South, North respectively; switch some arrays and loops to Z,Y,X order.
2020-02-20 23:10:25 +01:00
Pedro Gimeno
780b39605f
Adapt the code to the latest changes in GameKit
2020-02-19 20:11:30 +01:00
Pedro Gimeno
cda1948bb6
Convert Rect instances to new axis-convention-neutral form as well
2020-02-19 17:14:41 +01:00
Pedro Gimeno
8148098464
Update to the new axis-convention-neutral gk::Box format
2020-02-19 17:14:35 +01:00
Quentin Bazin
949cc463cb
[TerrainGenerator] Tall Grass added.
2020-02-19 20:08:46 +09:00
Quentin Bazin
cb356b4a3b
Shaders don't use blockID anymore. Fixes #48 .
2020-02-19 19:30:07 +09:00
Quentin Bazin
80e2fac8ee
[ClientApplication] Pressing 'F11' now switch to/from fullscreen mode.
2020-02-18 18:59:40 +09:00
Quentin Bazin
0757e518fb
[TitleScreenState] Now updated when window size is changed.
2020-02-18 18:54:58 +09:00
Quentin Bazin
78e46f71c6
[ClientPlayer] Moved hitbox to Player.
2020-02-18 18:37:51 +09:00
Quentin Bazin
c3a9eadcea
[BlockCursor] No longer possible to place a block inside the player. Fixes #32 .
2020-02-18 17:37:59 +09:00
Pedro Gimeno
ae9b47e018
Allow the player to dig the node the camera is into
...
That allows them to escape from being unable to move due to being trapped with the camera inside a node (assuming the node is diggable).
Note: The implementation is a bit of a hack. It doesn't consider the lookAt direction.
2020-02-18 14:57:27 +09:00
Quentin Bazin
e5b5ba9568
[ClientPlayer] Temporary fix for MinGW.
2020-02-18 00:04:29 +09:00
Quentin Bazin
d47d5d39e4
[BlockCursor] 'selectedBlock' now uses 'glm::ivec4' instead of 'glm::vec4'.
2020-02-17 19:03:36 +09:00
Quentin Bazin
2c5f289ef1
[Block|Item] 'name' property renamed to 'stringID' for more coherency.
2020-02-17 15:54:19 +09:00
Quentin Bazin
bb5819e5ee
[BlockCursor] No longer possible to replace blocks.
2020-02-17 15:22:12 +09:00
Quentin Bazin
494f56fae9
[BlockCursorRaycast] Added for raycast functions.
2020-02-17 15:02:01 +09:00
Quentin Bazin
a02c493fcf
[BlockCursor] Minor style fix. Depth buffer-based algorithm removed.
2020-02-17 14:44:59 +09:00
Pedro Gimeno
b0d29988ec
Replace the ray tracer with a more precise and complete one
...
Bounding boxes that are smaller than the node (e.g. flowers) are handled. In future it shouldn't be hard to add handling of multiple selection boxes per node.
Fixes #33 .
2020-02-16 20:39:46 +01:00
Quentin Bazin
c4ea0d84e1
[Config] New function 'loadConfigFromFile' automatically loads 'config.lua' if present.
2020-02-15 23:06:01 +09:00
Quentin Bazin
93cd68ffe9
[Config] Moved to client. SCREEN_WIDTH, SCREEN_HEIGHT and GUI_SCALE renamed. [EngineConfig] Added for common config.
2020-02-15 22:48:56 +09:00
Quentin Bazin
e798541304
[SettingsMenuState] Added 'Resolution' setting.
2020-02-15 22:25:29 +09:00