Compare commits

...

59 Commits

Author SHA1 Message Date
Michael Howard c09704151c MorriCraft v2.3.7: Redesigned Torches with high-quality pixel art and improved 3D rendering (larger, stable, and better centered) 2026-04-25 17:39:52 -05:00
Michael Howard 0a142d0713 MorriCraft v2.3.6: Dynamic Spawn Plateau centered on actual player location, ensuring Grassland biome consistency in negative coordinates 2026-04-25 17:35:38 -05:00
Michael Howard 3c6acb866a MorriCraft v2.3.5: Fixed terrain generation 'holes' by correcting frustum culling distance and improving chunk center calculations 2026-04-25 17:29:09 -05:00
Michael Howard 28c674c19b MorriCraft v2.3.4: Fixed apple texture format (JPEG to PNG), refined eating logic to prevent block placement, and added UI fallbacks 2026-04-25 15:04:16 -05:00
Michael Howard 4b915379e8 MorriCraft v2.3.3: Fixed jittery progress bar by removing conflicting dynamic pulse logic 2026-04-25 14:59:52 -05:00
Michael Howard 7c001ef8cc MorriCraft v2.3.2: Vivid damage feedback (red flash, knockback, classic hit sound) and cheat menu fixes 2026-04-25 14:56:48 -05:00
Michael Howard f0b8d2f3db MorriCraft v2.3.1: Leaf durability overhaul, Apple drops from leaves, world item collection, and cheat menu fixes 2026-04-25 14:38:50 -05:00
Michael Howard d8781b0211 MorriCraft v2.3.0: Accurate download progress bar based on file size, Major Update release 2026-04-25 14:12:49 -05:00
Michael Howard a16868c8b1 MorriCraft v2.2.29: Fixed texture format issue (JPEGs converted to PNGs), added texture loading fallbacks, and adjusted grass tinting 2026-04-25 14:04:28 -05:00
Michael Howard 3207c2d991 MorriCraft v2.2.28: High-quality grass textures, larger world pre-generation area (25x25), and fixed update progress bar 2026-04-25 14:00:18 -05:00
Michael Howard 87453dcd15 MorriCraft v2.2.27: Hunger System, World Gen Fix, and UI/Packaging overhaul 2026-04-25 13:51:48 -05:00
Michael Howard a9a8d853b8 MorriCraft v2.2.26 (FINAL FIX): Corrected binary name and ZIP structure, updated internal version strings 2026-04-25 13:50:16 -05:00
Michael Howard 8880cf7d4b MorriCraft v2.2.26 (FIXED PACKAGING): ZIPs now have root-level files for correct update extraction 2026-04-25 13:46:03 -05:00
Michael Howard da08a68875 MorriCraft v2.2.26 (FIXED): Hunger System, Apple item, improved Grass Top texture, and World Spawn offset fix 2026-04-25 13:40:07 -05:00
Michael Howard 78ea9a4503 MorriCraft v2.2.26: Hunger System, Apple item, improved Grass Top texture, and World Spawn offset fix 2026-04-25 13:35:30 -05:00
Michael Howard f2875dcdf7 MorriCraft v2.2.25: Grass block rendering fix, Update system overhaul with Restart button, and Biome-stable spawning 2026-04-25 13:15:30 -05:00
Michael Howard d5b58fd2fd v2.2.24 Patch: Fixed grass block held item, Improved update system with restart button and extraction progress, and Optimized spawn points for biome stability. 2026-04-25 13:01:27 -05:00
Michael Howard a2c7bacc94 v2.2.24 - UI Fixes, Command Updates, and Release Packaging 2026-04-25 12:06:38 -05:00
Michael Howard 7c136d758f MorriCraft v2.2.22: Spawn plateau terrain flattening and 4x larger biomes 2026-04-25 11:32:31 -05:00
Michael Howard cbe650009c MorriCraft v2.2.21: Player position save fix and improved updater feedback 2026-04-25 11:19:30 -05:00
Michael Howard d96c97df26 MorriCraft v2.2.20: UI fixes, universal tooltips, and ignore update option 2026-04-25 11:06:25 -05:00
Michael Howard 78bbf35bd3 MorriCraft v2.2.19: ZIP-based auto-updater and consolidated release structure 2026-04-25 10:50:58 -05:00
Michael Howard 90d6b3c6f1 v2.2.9: Final asset synchronization 2026-04-24 20:06:40 -05:00
Michael Howard 0dc7a18aaf v2.2.9: Final binaries and zip 2026-04-24 20:04:03 -05:00
Michael Howard 4e8bc59eeb MorriCraft v2.2.9: Major performance optimizations, viewmodel fixes, and critical bug fixes 2026-04-24 20:01:11 -05:00
Michael Howard 5530a1a58c MorriCraft v2.2.7: Converted tool assets from JPEG to true PNG format 2026-04-24 18:49:29 -05:00
Michael Howard 9c302e4154 MorriCraft v2.2.7: Shift-Click Crafting and E-to-Exit Crafting Fixed 2026-04-24 18:42:42 -05:00
Michael Howard 0278668eab MorriCraft v2.2.7: Fixed Inventory 'E' Bug and Added /test Command 2026-04-24 18:36:36 -05:00
Michael Howard 8d65e549b2 MorriCraft v2.2.7: Revamped Update UI and Asynchronous Downloading 2026-04-24 18:31:04 -05:00
Michael Howard 1d67db9e79 MorriCraft v2.2.7: Added Windows release zip to build folder 2026-04-24 18:26:29 -05:00
Michael Howard b2cadb2aaa MorriCraft v2.2.7: Physics, UI, Chat, and Asset Polish 2026-04-24 18:22:47 -05:00
Michael Howard 091cfab86f MorriCraft v2.2.6: 7AM Spawn, Naming Refinements, and Anti-Stuck Physics 2026-04-24 17:43:12 -05:00
Michael Howard 1a1cf3cc5f v2.1.9: Crafting overhaul, smart inventory, HQ tree textures, updated README 2026-04-24 16:23:31 -05:00
Michael Howard 910e2d6a6e Crafting Overhaul: 20+ recipes, Log->Planks, proper stack/split mechanics - v2.1.9 2026-04-24 16:06:24 -05:00
Michael Howard b200e9e07f Fix: Convert textures to proper 16x16 PNG32, fix leaf tint for new asset - v2.1.8 2026-04-24 15:48:25 -05:00
Michael Howard 63c496d237 Forest Fidelity: Fixed tree log rendering and added HQ leaves - v2.1.8 2026-04-24 15:38:45 -05:00
Michael Howard 236f66aa2a UI: Updated version strings to v2.1.7 in main.cpp 2026-04-24 15:31:12 -05:00
Michael Howard d04256a56c Docs: Overhauled README with professional layout and updated feature list 2026-04-24 15:28:03 -05:00
Michael Howard b2a36a249b Log Realism: Added authentic multi-texture Oak Logs - v2.1.7 2026-04-24 15:25:32 -05:00
Michael Howard 2114e50a9f Inventory Insight: Added mouse-over item tooltips - v2.1.6 2026-04-24 15:15:32 -05:00
Michael Howard 00cbe915d2 Windows Portability: Static linking for C++ runtime - v2.1.5 2026-04-23 20:03:49 -05:00
Michael Howard d91ad97868 Hotfix: Resolve Menu Freeze caused by incorrect brace nesting - v2.1.4 2026-04-23 19:54:46 -05:00
Michael Howard d8f80b9248 Hotfix: Resolve Linux Audio Crash and add procedural sound fallback - v2.1.3 2026-04-23 19:51:45 -05:00
Michael Howard f169322dc0 Combat Update: PvP, Health Hearts, and Spawn Fix - v2.1.2 2026-04-23 19:37:48 -05:00
Michael Howard 2bdfbd9fbc Hotfix: Resolve Skin Editor and Direct Connect Menu Overlap - v2.1.1 2026-04-23 19:06:20 -05:00
Michael Howard 23f941247d Skin Editor, Network Color Sync, and Enhanced World Sync - v2.1.0 2026-04-23 19:02:30 -05:00
Michael Howard ed11185fe3 Identity Update: Humanoid Player Models and Chat Input Isolation - v2.0.9 2026-04-23 18:53:55 -05:00
Michael Howard 8983f05b2a Real Update System, Open to LAN, and Fix Connect Button - v2.0.8 2026-04-23 18:44:59 -05:00
Michael Howard de7c60d9d7 UI Polish, Fresh Start Inventory, and Full System Updater - v2.0.7 2026-04-23 18:38:57 -05:00
Michael Howard be2148a415 Fix SendAll recursion and finalize v2.0.6 2026-04-23 18:23:37 -05:00
Michael Howard 69ba3372f6 Fix volume scope and finalize v2.0.5 2026-04-23 18:12:35 -05:00
Michael Howard 70b417b87c Implement Full Synchronization Milestone - v2.0.4 2026-04-23 18:05:47 -05:00
Michael Howard fbf45cc41c Update README and version for v2.0.3 stability release 2026-04-23 17:39:18 -05:00
Michael Howard 446e9ae771 Finalize Cross-Platform Protocol v2.0.3 2026-04-23 17:36:49 -05:00
Michael Howard 86fc77bfd7 Update README and version for v2.0.2 release 2026-04-23 17:29:54 -05:00
Michael Howard dbb6662538 Finalize Multiplayer v2.0.2 with Chat and Sync fixes 2026-04-23 17:28:26 -05:00
Michael Howard 99e63720fb Implement world state synchronization - v2.0.1 2026-04-23 17:18:16 -05:00
Michael Howard dea13eaf2c Finalize Multiplayer v2.0.0 with CMake ws2_32 fix 2026-04-23 17:11:20 -05:00
Michael Howard acf6d84d7c Implement basic multiplayer foundation - v2.0.0 2026-04-23 17:05:28 -05:00
101 changed files with 2718 additions and 590 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@ build-windows/*
!build-linux/assets/ !build-linux/assets/
!build-windows/MorriCraft.exe !build-windows/MorriCraft.exe
!build-windows/assets/ !build-windows/assets/
!build-windows/MorriCraft-Windows.zip

View File

@ -16,8 +16,12 @@ FetchContent_MakeAvailable(raylib)
# Create executable # Create executable
add_executable(MorriCraft src/main.cpp) add_executable(MorriCraft src/main.cpp)
# Link Raylib # Link Raylib and Networking
target_link_libraries(MorriCraft PRIVATE raylib) target_link_libraries(MorriCraft PRIVATE raylib)
if(WIN32)
target_link_libraries(MorriCraft PRIVATE ws2_32)
target_link_options(MorriCraft PRIVATE -static-libgcc -static-libstdc++ -static)
endif()
# Copy assets to build directory # Copy assets to build directory
add_custom_command(TARGET MorriCraft POST_BUILD add_custom_command(TARGET MorriCraft POST_BUILD

BIN
MorriCraft-Windows.zip Normal file

Binary file not shown.

239
README.md
View File

@ -1,85 +1,192 @@
# MorriCraft # 🟦 MorriCraft
![MorriCraft](assets/TitleImage.png) ![MorriCraft](assets/TitleImage.png)
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. **MorriCraft** is a high-performance, multiplayer-ready voxel engine built from the ground up using **C++** and **Raylib**. Inspired by classic survival games, it features a custom physics engine, real-time world synchronization, and a deep 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 ## 🌟 Key Features
### v1.9.1 - The Connectivity & Polish Update ### ⚔️ Combat & Survival
* **Persistent Configuration**: Added `config.cfg` to save player preferences and identity. - **PvP Combat**: Real-time melee combat with synchronized hit registration, knockback, and audio feedback.
* **Player Identity**: Implemented a required name-entry sequence on first launch. - **Health System**: 8-heart health system with a visual HUD and damage mechanics.
* **Auto-Update System**: Integrated version-checking, update notes viewer, and download progress simulation. - **Survival Mechanics**: Block-breaking progress and material-specific dig times.
* **Multiplayer Preparation**: Added Server Mode toggle and Direct Connect interface foundation.
* **Performance Fixes**: Resolved edge-case frustum culling artifacts.
* **Audio Refinement**: Fixed music transitions between menus and gameplay states.
* **UI Polish**: Optimized layout for the Options and Main Menu screens.
### v1.6.6 (Latest) ### 👥 Multiplayer & LAN
- **Tool Scaling**: Increased the size of held items (Axes/Sticks) in first-person for better visibility. - **P2P Architecture**: Cross-platform networking stack using standard sockets (Windows/Linux).
- **Custom Assets**: Integrated a high-detail community wooden axe asset. - **Instant LAN Hosting**: Host your world with a single click from the pause menu.
- **Visual Polish**: Improved the viewmodel orientation and stability. - **Skin Personalization**: Built-in skin editor to customize your character's shirt and pants, fully synchronized across the network.
- **Global Chat**: Press `Enter` to communicate with other players in real-time.
### v1.6.5 ### 🔨 Crafting & Inventory
- **Audio Optimization**: Implemented a rapid-crossfade system for cleaner day/night music transitions. - **20+ Recipes**: Full crafting tree from logs to tools — wooden & stone tier tools, furnace, chest, doors, fences, ladders, and more.
- **UI Bug Fixes**: Resolved music state issues when entering the Options and Crafting menus. - **Dual Crafting Modes**: 2×2 player inventory grid and 3×3 Workbench with pattern matching.
- **Smart Stacking**: Left-click merges same-type stacks, right-click picks up or places one item at a time.
- **Inventory Tooltips**: Hover over any item to see its name.
### v1.6.4 ### 🌲 World & Visuals
- **Immersive Audio**: Added material-specific digging sounds (Grass, Wood, Stone, Sand). - **Multi-Texture Blocks**: Oak logs render with bark sides and ringed tops/bottoms. Grass has separate top/side/bottom faces.
- **Viewmodel Overhaul**: Held blocks are now rendered as 3D textured cubes instead of white boxes. - **High-Detail Foliage**: Custom leaf textures with natural green tinting.
- **Audio Sync**: Tied digging sounds to mining progress for better tactile feedback. - **Dynamic Lighting**: Full day/night cycle with atmospheric color shifts.
- **Optimized Rendering**: Texture batching, neighbor-chunk caching, and frustum culling for 60+ FPS.
### v1.6.3 ### ⚙️ Technical
- **Dynamic World Gen**: Multi-octave Perlin noise (FBM) with forests, sand beaches, and ore veins.
- **Cross-Platform**: Standalone binaries for Windows and Linux with zero external DLL dependencies.
- **Auto-Update System**: Built-in version checking and download support.
### v1.5.2 ---
- **Stability Fixes**: Resolved texture corruption and state-management bugs with workstations.
- **In-Game Clock**: Added a 12-hour AM/PM HUD clock and day/night status indicator.
- **Lighting Engine**: Implemented a global day/night cycle (300s) with dynamic sun/moon and world tinting.
### v1.4.2 ## 🚀 Getting Started
- **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 ### Prerequisites
- **Texture Fixes**: Corrected leaf and log textures. - **Linux**: `libpulse-dev`, `glfw` development headers.
- **Inventory Stability**: Fixed the double-toggle bug when pressing 'E'. - **Windows**: Download the pre-built zip from Releases, or cross-compile with MinGW-w64.
- **Bug Fixes**: Resolved grass rendering issues and fixed tree generation.
### v1.4.0 ### Build Instructions
- **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 #### 🐧 Linux
- **Physics**: Implemented "Ground-Lock" stabilization. ```bash
- **Inventory**: Added basic drag-and-drop support. mkdir build-linux && cd build-linux
- **Wireframes**: Added real-time block selection highlights. cmake ..
make -j$(nproc)
./MorriCraft
```
## Build Instructions #### 🪟 Windows (Cross-compile)
```bash
mkdir build-windows && cd build-windows
cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain-windows.cmake ..
make -j$(nproc)
```
A pre-built `MorriCraft-Windows.zip` is available in the repository root.
### Linux ---
1. `mkdir build-linux && cd build-linux`
2. `cmake ..`
3. `make -j$(nproc)`
### Windows (Cross-compile from Linux) ## 🎮 Controls
1. `mkdir build-windows && cd build-windows` | Key | Action |
2. `cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain-windows.cmake ..` |-----|--------|
3. `make -j$(nproc)` | **WASD** | Movement |
| **Space** | Jump |
| **Mouse** | Look / Aim |
| **Left Click** | Attack / Destroy Block |
| **Right Click** | Place Block / Use Workbench |
| **E** | Open Inventory |
| **Enter** | Open Chat |
| **1-9** | Hotbar Selection |
| **ESC** | Pause / Menu |
## Controls ---
- **WASD**: Movement
- **Space**: Jump ## 📜 Crafting Recipes
- **Mouse**: Look / Aim
- **Left Click**: Destroy Block ### 2×2 Player Grid
- **Right Click**: Place Block / Use Crafting Table | Input | Output |
- **E**: Toggle Inventory |-------|--------|
- **1-9**: Hotbar Selection | 1 Log | 4 Planks |
- **ESC**: Pause Menu / Close Inventory | 4 Planks (2×2) | 1 Crafting Table |
| 2 Planks (vertical) | 4 Sticks |
### 3×3 Crafting Table
| Recipe | Output | Recipe | Output |
|--------|--------|--------|--------|
| PPP / .S. / .S. | Wooden Pickaxe | CCC / .S. / .S. | Stone Pickaxe |
| PP. / PS. / .S. | Wooden Axe | CC. / CS. / .S. | Stone Axe |
| .P. / .P. / .S. | Wooden Sword | .C. / .C. / .S. | Stone Sword |
| .P. / .S. / .S. | Wooden Shovel | .C. / .S. / .S. | Stone Shovel |
| PP. / .S. / .S. | Wooden Hoe | CC. / .S. / .S. | Stone Hoe |
| CCC / C.C / CCC | Furnace | PPP / P.P / PPP | Chest |
| PP. / PP. / PP. | Door ×3 | PSP / PSP | Fence ×3 |
| S.S / SSS / S.S | Ladder ×3 | ... / ... / CCC | Stone Slab ×6 |
*P = Plank, S = Stick, C = Cobblestone. Mirrored variants supported.*
---
## 📜 Version History
### v2.3.7 - Major Update: High-Quality 3D Torches & Asset Redesign (Current)
- **Hunger System**: Added player hunger bar, starvation mechanics, and health regeneration when full.
- **Apple Item**: Added edible Apple item to restore hunger.
- **Grass Texture**: Improved `grass_top` texture with better pixel art.
- **World Spawn Fix**: Fixed missing terrain chunks behind the player on new world generation.
### v2.2.26 - Hunger & World Gen Patch
- **'E' Key Bug Fix**: Resolved an issue where the inventory overlay would get out of sync with container/cheat GUIs, preventing the menu from staying open or resulting in a missing cursor.
- **/test Command**: Refined the `/test` command to grant exactly 1x Crafting Table and 64x Oak Logs with descriptive feedback.
- **Help Command**: Updated `/help` to include all debug commands (`/test`, `/cheat`, `/fly`, `/seed`).
- **/fly Command**: Added a simple toggle behavior to the `/fly` command.
### v2.2.23 - Persistence & Viewmodel Fixes
### v2.2.22 - World Generation Polish
### v2.2.21 - Save Fix & Updater Polish
### v2.2.20 - UI Polish & Spawn Fixes
### v2.2.19 - Torch & persistence Overhaul
### v2.2.18 - Persistence & UI Fixes
### v2.2.6 - World Management
- **7:00 AM Spawn**: New worlds now start in the morning for immediate daylight.
- **Naming System**: Cleaner sequential naming (`World`, `World 1`, `World 2`) instead of nested parentheses.
- **Anti-Stuck Physics**: Active collision resolution pushes players out of blocks if they overlap.
- **Build Path**: Windows artifacts are now stored in `build-windows/` for easier deployment.
### v2.2.5 - UX & Inventory Polish
- **Shift-Click**: Holding Shift and clicking picks up entire item stacks instantly.
- **Scrollable Menus**: Added scroll bars and mouse-wheel support for the "Load World" menu.
- **UI Padding**: Increased padding across all panels to ensure text never overlaps borders.
### v2.2.4 - Visual & Update Stability
- **X-Ray Fix**: Neighborhood chunk dirtying ensures internal faces are culled immediately.
- **Smart Updates**: Client only prompts for updates if the remote version is strictly higher.
- **15x15 Pre-Gen**: Expanded spawn area pre-generation (225 chunks) to eliminate horizon drop-offs.
### v2.2.3 - Async Generation & Help
- **Loading Screen**: Added a progress bar for asynchronous world generation/loading.
- **Help Command**: Added `/help` to chat to display all available console commands.
- **Spawn Surface**: Guaranteed surface placement after full chunk pre-generation.
### v2.2.1 - World & Seed Polish
- **Cliff Fix**: Resolved issues where new worlds would spawn with missing chunks.
- **Render Distance**: Increased default render distance to 4 for a more expansive view.
- **Auto-Updater**: Platform-aware updates target Windows vs Linux binaries.
### v2.2.0 - Biome & Generation Update
- **Seed Fix**: Proper avalanche-hash for seeds, making every world truly unique.
- **Biomes**: Added Grassland, Desert, and Rocky biomes with sand beaches at sea level.
- **Commands**: Added `/seed` command to view the world seed in chat.
### v2.1.9 - Crafting Overhaul
- **20+ Recipes**: Added Log→Planks and full wooden/stone tool tier crafting.
- **Smart Inventory**: Left-click stacks same items, right-click picks up or places one.
- **Future Item IDs**: Added furnace, chest, ladder, fence, torch, door, and stone slab types.
### v2.1.8 - Forest Fidelity
- **HQ Leaves**: New high-definition leaf texture with proper green tinting.
- **Tree Fix**: Corrected log rendering to use multi-texture bark/ring mapping.
### v2.1.7 - Log Realism
- **Oak Log Textures**: Dedicated bark (side) and ring (top) textures for logs.
### v2.1.6 - Inventory Insight
- **Item Tooltips**: Mouse-over identification for all inventory items.
### v2.1.2 - Combat & Health
- **PvP Melee**: Ray-traced hit detection with knockback and audio feedback.
- **Heart HUD**: 8-heart health system.
### v2.1.0 - Personalization
- **Skin Editor**: Shirt and pants color customization, synced across network.
- **Humanoid Models**: Multi-cube player avatars replacing placeholder blobs.
### v2.0.0 - Multiplayer
- **P2P Networking**: Cross-platform sockets with direct connect and LAN hosting.
- **Chat System**: Real-time text communication between players.
---
*Developed by the MorriCraft Team. Built with Raylib 5.0.*

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 MiB

After

Width:  |  Height:  |  Size: 6.9 MiB

BIN
assets/apple.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 291 B

BIN
assets/break.ogg Normal file

Binary file not shown.

BIN
assets/chest.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 748 KiB

BIN
assets/chestclosed.ogg Normal file

Binary file not shown.

BIN
assets/chestopen.ogg Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 B

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 B

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 B

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 329 B

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 298 B

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 296 B

BIN
assets/hit.ogg Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 B

After

Width:  |  Height:  |  Size: 303 B

BIN
assets/leaves.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
assets/oak_log_side.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
assets/oak_log_top.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 B

After

Width:  |  Height:  |  Size: 275 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

After

Width:  |  Height:  |  Size: 226 B

BIN
assets/torch.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 552 KiB

1
assets/version.txt Normal file
View File

@ -0,0 +1 @@
v2.3.7

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 B

After

Width:  |  Height:  |  Size: 390 B

BIN
assets/wooden_hoe.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 KiB

BIN
assets/wooden_pickaxe.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 KiB

BIN
assets/wooden_shovel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 KiB

BIN
assets/wooden_sword.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 MiB

After

Width:  |  Height:  |  Size: 6.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 748 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 B

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 B

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 B

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 329 B

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 298 B

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 296 B

BIN
build-linux/assets/hit.ogg Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 B

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 B

After

Width:  |  Height:  |  Size: 275 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 552 KiB

View File

@ -1 +1 @@
v1.9.1 v2.3.7

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 B

After

Width:  |  Height:  |  Size: 390 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 MiB

After

Width:  |  Height:  |  Size: 6.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 748 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 B

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 B

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 B

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 329 B

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 298 B

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 B

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 B

After

Width:  |  Height:  |  Size: 275 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 552 KiB

View File

@ -1 +1 @@
v1.9.1 v2.3.7

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 B

After

Width:  |  Height:  |  Size: 390 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 KiB

Binary file not shown.

Binary file not shown.

1
release/version.txt Normal file
View File

@ -0,0 +1 @@
v2.3.7

File diff suppressed because it is too large Load Diff

129
src/network.h Normal file
View File

@ -0,0 +1,129 @@
#ifndef NETWORK_H
#define NETWORK_H
#include <string>
#include <vector>
#include <cstdint>
#ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#ifndef NOGDI
#define NOGDI
#endif
#ifndef NOUSER
#define NOUSER
#endif
// Rename conflicting functions before including windows/winsock
#define CloseWindow CloseWindow_Win
#define ShowCursor ShowCursor_Win
#define DrawTextEx DrawTextEx_Win
#define PlaySound PlaySound_Win
#include <winsock2.h>
#include <ws2tcpip.h>
#undef CloseWindow
#undef ShowCursor
#undef DrawTextEx
#undef PlaySound
#undef near
#undef far
#pragma comment(lib, "ws2_32.lib")
typedef SOCKET Socket;
#define INVALID_SOCKET_VAL INVALID_SOCKET
#define SOCKET_ERROR_VAL SOCKET_ERROR
#else
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <fcntl.h>
typedef int Socket;
#define INVALID_SOCKET_VAL -1
#define SOCKET_ERROR_VAL -1
#define closesocket close
#endif
enum PacketType {
PACKET_HANDSHAKE = 0,
PACKET_PLAYER_UPDATE = 1,
PACKET_BLOCK_CHANGE = 2,
PACKET_TIME_SYNC = 3,
PACKET_SEED_SYNC = 4,
PACKET_CHAT = 5,
PACKET_DISCONNECT = 6,
PACKET_PLAYER_HIT = 7
};
struct PacketPlayerHit {
uint32_t targetID;
float damage;
float attackerX, attackerZ;
};
struct PacketHeader {
uint8_t type;
uint32_t size;
};
struct PacketHandshake {
char name[32];
uint8_t shirtR, shirtG, shirtB;
uint8_t pantsR, pantsG, pantsB;
};
struct PacketPlayerUpdate {
float x, y, z;
float yaw;
uint32_t playerID; // Assigned by server
};
struct PacketBlockChange {
int x, y, z;
int blockType;
};
struct PacketTimeSync {
float gameTime;
};
struct PacketSeedSync {
int seed;
};
struct PacketChat {
char name[32];
char message[128];
};
// Cross-platform socket initialization
inline bool InitNetworking() {
#ifdef _WIN32
WSADATA wsaData;
return WSAStartup(MAKEWORD(2, 2), &wsaData) == 0;
#else
return true;
#endif
}
inline void ShutdownNetworking() {
#ifdef _WIN32
WSACleanup();
#endif
}
inline bool SetNonBlocking(Socket s) {
#ifdef _WIN32
unsigned long mode = 1;
return ioctlsocket(s, FIONBIO, &mode) == 0;
#else
int flags = fcntl(s, F_GETFL, 0);
if (flags == -1) return false;
return fcntl(s, F_SETFL, flags | O_NONBLOCK) == 0;
#endif
}
#endif

Some files were not shown because too many files have changed in this diff Show More