Initial commit - v1.4.2 stable
|
|
@ -0,0 +1,8 @@
|
||||||
|
build-linux/
|
||||||
|
build-windows/
|
||||||
|
saves/
|
||||||
|
.vscode/
|
||||||
|
.DS_Store
|
||||||
|
*.o
|
||||||
|
*.exe
|
||||||
|
MorriCraft
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
cmake_minimum_required(VERSION 3.20)
|
||||||
|
project(MorriCraft VERSION 0.1.0 LANGUAGES C CXX)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
include(FetchContent)
|
||||||
|
|
||||||
|
# Fetch Raylib
|
||||||
|
FetchContent_Declare(
|
||||||
|
raylib
|
||||||
|
URL https://github.com/raysan5/raylib/archive/refs/tags/5.0.tar.gz
|
||||||
|
)
|
||||||
|
FetchContent_MakeAvailable(raylib)
|
||||||
|
|
||||||
|
# Create executable
|
||||||
|
add_executable(MorriCraft src/main.cpp)
|
||||||
|
|
||||||
|
# Link Raylib
|
||||||
|
target_link_libraries(MorriCraft PRIVATE raylib)
|
||||||
|
|
||||||
|
# Copy assets to build directory
|
||||||
|
add_custom_command(TARGET MorriCraft POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||||
|
${CMAKE_SOURCE_DIR}/assets
|
||||||
|
$<TARGET_FILE_DIR:MorriCraft>/assets
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
# MorriCraft
|
||||||
|
|
||||||
|
MorriCraft is a high-performance voxel engine built with C++ and Raylib. It features a custom physics engine, dynamic world generation, and an interactive inventory and crafting system.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
- **Custom Physics**: Stable "Ground-Lock" system prevents camera jitter and ensures smooth movement.
|
||||||
|
- **Dynamic World Generation**: Multi-octave Perlin noise (FBM) for realistic terrain, including biomes like grass, sand, and forests.
|
||||||
|
- **Advanced Crafting**: Includes both a 2x2 player inventory grid and a 3x3 workbench system.
|
||||||
|
- **Optimized Rendering**: Texture batching and neighbor-chunk caching for stable 60+ FPS.
|
||||||
|
- **Cross-Platform**: Builds for both Linux and Windows.
|
||||||
|
|
||||||
|
## Version History
|
||||||
|
|
||||||
|
### v1.4.2
|
||||||
|
- **UI Redesign**: Overhauled the inventory and crafting windows to match the classic Minecraft layout.
|
||||||
|
- **Character Preview**: Added a player preview placeholder in the inventory.
|
||||||
|
- **Centered Layout**: All UI grids are now symmetrically centered.
|
||||||
|
|
||||||
|
### v1.4.1
|
||||||
|
- **Texture Fixes**: Corrected leaf and log textures.
|
||||||
|
- **Inventory Stability**: Fixed the double-toggle bug when pressing 'E'.
|
||||||
|
- **Bug Fixes**: Resolved grass rendering issues and fixed tree generation.
|
||||||
|
|
||||||
|
### v1.4.0
|
||||||
|
- **Crafting Table**: Implemented the Crafting Table block and 3x3 grid interaction.
|
||||||
|
- **Advanced UI**: Centered stack counts and added red versioning to the title screen.
|
||||||
|
|
||||||
|
### v1.3.x
|
||||||
|
- **Physics**: Implemented "Ground-Lock" stabilization.
|
||||||
|
- **Inventory**: Added basic drag-and-drop support.
|
||||||
|
- **Wireframes**: Added real-time block selection highlights.
|
||||||
|
|
||||||
|
## Build Instructions
|
||||||
|
|
||||||
|
### Linux
|
||||||
|
1. `mkdir build-linux && cd build-linux`
|
||||||
|
2. `cmake ..`
|
||||||
|
3. `make -j$(nproc)`
|
||||||
|
|
||||||
|
### Windows (Cross-compile from Linux)
|
||||||
|
1. `mkdir build-windows && cd build-windows`
|
||||||
|
2. `cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain-windows.cmake ..`
|
||||||
|
3. `make -j$(nproc)`
|
||||||
|
|
||||||
|
## Controls
|
||||||
|
- **WASD**: Movement
|
||||||
|
- **Space**: Jump
|
||||||
|
- **Mouse**: Look / Aim
|
||||||
|
- **Left Click**: Destroy Block
|
||||||
|
- **Right Click**: Place Block / Use Crafting Table
|
||||||
|
- **E**: Toggle Inventory
|
||||||
|
- **1-9**: Hotbar Selection
|
||||||
|
- **ESC**: Pause Menu / Close Inventory
|
||||||
|
After Width: | Height: | Size: 6.9 MiB |
|
After Width: | Height: | Size: 166 B |
|
After Width: | Height: | Size: 200 B |
|
After Width: | Height: | Size: 477 KiB |
|
After Width: | Height: | Size: 328 KiB |
|
After Width: | Height: | Size: 219 B |
|
After Width: | Height: | Size: 197 B |
|
After Width: | Height: | Size: 329 B |
|
After Width: | Height: | Size: 298 B |
|
After Width: | Height: | Size: 199 B |
|
After Width: | Height: | Size: 212 B |
|
After Width: | Height: | Size: 195 B |
|
After Width: | Height: | Size: 188 B |
|
After Width: | Height: | Size: 151 B |
|
|
@ -0,0 +1,18 @@
|
||||||
|
# the name of the target operating system
|
||||||
|
set(CMAKE_SYSTEM_NAME Windows)
|
||||||
|
|
||||||
|
# which compilers to use for C and C++
|
||||||
|
set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
|
||||||
|
set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
|
||||||
|
set(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
|
||||||
|
|
||||||
|
# where is the target environment located
|
||||||
|
set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)
|
||||||
|
|
||||||
|
# adjust the default behavior of the FIND_XXX() commands:
|
||||||
|
# search programs in the host environment
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
|
||||||
|
# search headers and libraries in the target environment
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||