Initial commit - v1.4.2 stable

This commit is contained in:
Michael Howard 2026-04-23 14:32:53 -05:00
commit e5d99193ab
72 changed files with 1964 additions and 0 deletions

8
.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
build-linux/
build-windows/
saves/
.vscode/
.DS_Store
*.o
*.exe
MorriCraft

27
CMakeLists.txt Normal file
View File

@ -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
)

BIN
MCSTYLE/MCCoalOre.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCIronOre.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCRedCarpet.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCRedStone.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCSign.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCWallSign.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCbirchlog.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCbirchplank.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCbookshelf.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCbricks.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCcake.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCchest.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCcornflower.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCdandelion.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCdiamondblock.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCdiamondore.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCdiamondsword.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCdirt.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCfarm.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCfurnace.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCglass.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCglasspane.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCgoldore.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCgrass.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCgravel.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MClanternGROUND.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MClava.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCleaves.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCoakdoor.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCoaklog.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCoakplank.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCoakstairs.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCobsidian.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCpath.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCpinktulip.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCportal.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCsand.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCsnow.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCsoulsand.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCsugarcane.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCtallgrass.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCtnt.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCtorch.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCwater.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCwheat.scn Normal file

Binary file not shown.

BIN
MCSTYLE/MCworkbench.scn Normal file

Binary file not shown.

BIN
MCSTYLE/cobble.scn Normal file

Binary file not shown.

BIN
MCSTYLE/cobblestairs.scn Normal file

Binary file not shown.

BIN
MCSTYLE/mcrose.scn Normal file

Binary file not shown.

BIN
MCSTYLE/steven.scn Normal file

Binary file not shown.

53
README.md Normal file
View File

@ -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

BIN
assets/Morricraft-day1.mp3 Normal file

Binary file not shown.

BIN
assets/Morricraft-title.mp3 Normal file

Binary file not shown.

BIN
assets/PixelFont.ttf Normal file

Binary file not shown.

BIN
assets/TitleImage.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 MiB

BIN
assets/bedrock.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

BIN
assets/cobblestone.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 KiB

BIN
assets/diamond_ore.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

BIN
assets/dirt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

BIN
assets/grass.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

BIN
assets/grass_top.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 B

BIN
assets/gravel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

BIN
assets/iron_ore.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

BIN
assets/plank.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

BIN
assets/sand.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

BIN
assets/stone.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

View File

@ -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)

1858
src/main.cpp Normal file

File diff suppressed because it is too large Load Diff