167 Commits

Author SHA1 Message Date
Quentin Bazin
2555d89fa2 [TerrainGenerator] Portals added. 2020-03-09 21:10:03 +01:00
Quentin Bazin
ff516ec30b Basic sky API added (see #76) 2020-03-09 19:36:46 +01:00
Quentin Bazin
f04993be26 [ScrollBarWidget] Added and used in creative window. 2020-03-09 10:38:30 +01:00
Quentin Bazin
1b2f30ba56 [BlockCursor] Block destroy texture now loaded in constructor. 2020-03-08 23:12:55 +01:00
Quentin Bazin
b851b41dad [ChunkBuilder] Cactus draw type added. 2020-03-08 20:00:20 +01:00
Quentin Bazin
edec9ff87f [Tree] New attributes. [biomes.lua] Desert now spawns cacti and dead bushes. 2020-03-08 17:28:35 +01:00
Quentin Bazin
58ef40b09f [TerrainBiomeSampler] Now aware of dimensions. 2020-03-08 16:07:32 +01:00
Quentin Bazin
be1e49cfe0 [blocks.lua] Portal block added. Send PlayerChangeDimension on right-click. 2020-03-08 16:07:32 +01:00
Quentin Bazin
81986cb55d [WorldController] Added. It's basically a container for 'ServerWorld' instances. 2020-03-08 16:07:32 +01:00
Quentin Bazin
3ef71df8c2 [Dimension] Added. Loaded from Lua and saved in Registry. 2020-03-08 16:07:32 +01:00
Pedro Gimeno
d0166c4a59 [ChunkBuilder] Rotate vertices instead of faces; add more orientations 2020-03-07 16:07:25 +01:00
Quentin Bazin
8231b352f2 Style and small C++ mistakes fixed. 2020-03-07 13:52:47 +01:00
KdotJPG
474cdd16c4 Lua trees, ores, desert, review changes, merge 2020-03-07 13:52:47 +01:00
KdotJPG
53bb1c14c0 Biome setup & rudimentary generator 2020-03-07 13:52:47 +01:00
Quentin Bazin
b0ffedd44b [mods/default] Oak Wood Slab added. 2020-03-04 23:25:19 +01:00
Pedro Gimeno
a9a3343604 Make server side position of player be doubles 2020-03-02 20:41:47 +01:00
Quentin Bazin
b2e48c9540 [LuaGUI] Refactorized and splitted into separated classes. 2020-03-02 17:49:04 +01:00
Quentin Bazin
ec7ef36d45 Blocks can now be rotated depending on the player direction. 2020-03-02 00:17:28 +01:00
Quentin Bazin
c092e53116 [Inventory] Now supports using 'addStack' on a subset. 2020-03-01 12:28:26 +01:00
Quentin Bazin
4d9a2fbe7e [LuaGUIState] Now handles Shift+Left click to move items quickly. 2020-03-01 00:15:49 +01:00
Quentin Bazin
45c797cd5f Creative window added on key 'H'. 2020-02-29 18:07:01 +01:00
Quentin Bazin
502a4b542d include and source folders merged. 2020-02-29 03:31:14 +01:00
Pedro Gimeno
89a1520d7c Change player position to be at the feet, rather than the head
Note: This breaks the visualization of the other players (PlayerBox).
2020-02-26 22:17:37 +01:00
Quentin Bazin
bcc3f65147 Headers updated and CONTRIBUTORS file added. 2020-02-25 01:48:38 +09:00
Pedro Gimeno
6e506d8500 Precision improvements (Part 5)
Get rid of floats when calculating chunk position from block position. This can be done in integers. Since CHUNK_WIDTH etc. are guaranteed to be powers of two, using & -N is equivalent to doing & ~(N-1), or put differently, making it divisible by N. That makes the division exact, and allows the compiler to transform it into a plain shift (tested with both gcc and clang).

We did the same in Part 3 of this series.
2020-02-24 12:00:02 +01:00
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
Quentin Bazin
879dc28eb2 [FurnaceWidget] Removed. Now completely implemented in Lua. 2020-02-23 22:38:51 +09:00
Quentin Bazin
47b7e3d849 [PlayerCraftingWidget] Removed, implemented completely using Lua. 2020-02-23 18:24:19 +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
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
Pedro Gimeno
7c8c77d7b9 Change order of enum BlockFace for consistency with Chunk.hpp 2020-02-21 11:02:53 +01:00
Pedro Gimeno
9016dab8a1 Create a mapping to determine texture index from array size/face 2020-02-21 11:02:29 +01:00
Quentin Bazin
2f827df14b [Network] 'ChatMessage' packet added. 2020-02-21 17:25:56 +09: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
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
8148098464 Update to the new axis-convention-neutral gk::Box format 2020-02-19 17:14:35 +01:00
Quentin Bazin
cb356b4a3b Shaders don't use blockID anymore. Fixes #48. 2020-02-19 19:30:07 +09:00
Quentin Bazin
78e46f71c6 [ClientPlayer] Moved hitbox to Player. 2020-02-18 18:37:51 +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
888db4e241 [Block] Removed unused properties. 2020-02-17 15:40:34 +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
7793e2ee71 [ClientChunk|ChunkLightmap] Performance improvement. 2020-02-15 18:16:58 +09:00
Quentin Bazin
b2fd4e6b51 [ServerChunk] Incomplete tree issue fixed (see #41). 2020-02-15 17:36:24 +09:00
Quentin Bazin
71587c0da8 [Network] PlayerInventory and BlockActivated packets now send screen size and gui scale informations. 2020-02-15 14:42:29 +09:00
Quentin Bazin
857c7e4060 [LuaGUI] Now provides SCREEN_WIDTH, SCREEN_HEIGHT and GUI_SCALE instead of them being hardcoded in init.lua. 2020-02-15 13:54:02 +09:00
Quentin Bazin
41a46ba13b [CMakeLists.txt] Small improvements. 2020-02-14 18:36:45 +09:00