MorriCraft v2.2.7: Physics, UI, Chat, and Asset Polish

This commit is contained in:
Michael Howard 2026-04-24 18:22:47 -05:00
parent 091cfab86f
commit b2cadb2aaa
19 changed files with 32 additions and 19 deletions

View File

@ -106,7 +106,12 @@ A pre-built `MorriCraft-Windows.zip` is available in the repository root.
## 📜 Version History
### v2.2.6 - Physics & World Management (Current)
### v2.2.7 - Performance & Assets (Current)
- **Lag Fix**: Reverted render distance to 4 and optimized frustum culling to restore high FPS.
- **New Icons**: Added high-quality textures for the Wooden Shovel, Pickaxe, Sword, and Hoe.
- **Physics**: Refined anti-stuck resolution for smoother jumping and landing.
### 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.

BIN
assets/wooden_hoe.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

BIN
assets/wooden_pickaxe.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 KiB

BIN
assets/wooden_shovel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 KiB

BIN
assets/wooden_sword.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 KiB

Binary file not shown.

View File

@ -1 +1 @@
v2.2.6
v2.2.7

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 KiB

Binary file not shown.

View File

@ -1 +1 @@
v2.2.6
v2.2.7

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 KiB

View File

@ -636,8 +636,8 @@ void GenerateChunk(int cx, int cz) {
bool CheckPlayerCollision(Vector3 pos) {
BoundingBox playerBox = {
(Vector3){ pos.x - 0.26f, pos.y - 1.45f, pos.z - 0.26f },
(Vector3){ pos.x + 0.26f, pos.y + 0.05f, pos.z + 0.26f }
(Vector3){ pos.x - 0.25f, pos.y - 1.45f, pos.z - 0.25f },
(Vector3){ pos.x + 0.25f, pos.y + 0.05f, pos.z + 0.25f }
};
int minX = (int)floorf(playerBox.min.x + 0.5f);
@ -899,7 +899,7 @@ int main(void)
// By default, windows have minimize, maximize, and close buttons on the top bar.
SetConfigFlags(FLAG_WINDOW_RESIZABLE | FLAG_VSYNC_HINT);
InitWindow(screenWidth, screenHeight, "MorriCraft v2.2.6");
InitWindow(screenWidth, screenHeight, "MorriCraft v2.2.7");
LoadConfig();
SetExitKey(KEY_NULL); // Prevent ESC from closing the window
@ -1047,6 +1047,10 @@ int main(void)
blockTextures[STICK] = LoadTexture("assets/stick.png");
blockTextures[WOOD_AXE] = LoadTexture("assets/wooden_axe.png");
blockTextures[WOOD_PICKAXE] = LoadTexture("assets/wooden_pickaxe.png");
blockTextures[WOOD_SWORD] = LoadTexture("assets/wooden_sword.png");
blockTextures[WOOD_SHOVEL] = LoadTexture("assets/wooden_shovel.png");
blockTextures[WOOD_HOE] = LoadTexture("assets/wooden_hoe.png");
// Explicitly check for successful load and print warning if fail
if (blockTextures[STICK].id == 0) TraceLog(LOG_WARNING, "FAILED TO LOAD STICK TEXTURE");
@ -1629,7 +1633,12 @@ int main(void)
// Handle chat input
if (IsKeyPressed(KEY_ENTER)) {
if (isChatting) {
if (!isChatting) {
isChatting = true;
chatInput[0] = '\0';
while (GetCharPressed() != 0); // Clear buffer
EnableCursor();
} else {
if (strlen(chatInput) > 0) {
if (chatInput[0] == '/') {
// Command processing - never sent to network
@ -1675,9 +1684,6 @@ int main(void)
}
isChatting = false;
DisableCursor();
} else {
isChatting = true;
EnableCursor();
}
}
@ -1784,9 +1790,11 @@ int main(void)
}
}
// Resolve any lingering overlap to prevent getting stuck
if (!isFlying && CheckPlayerCollision(camera3D.position)) {
camera3D.position.y += 0.05f;
// Resolve any lingering overlap to prevent getting stuck (Iterative push-out)
if (!isFlying) {
for (int i = 0; i < 5 && CheckPlayerCollision(camera3D.position); i++) {
camera3D.position.y += 0.05f;
}
}
// Final Camera state
@ -2329,8 +2337,8 @@ int main(void)
DrawTexturePro(titleTexture, sourceRec, destRec, origin, 0.0f, WHITE);
EndMode2D();
// Show Version Number (v2.2.6) in Red
DrawTextEx(customFont, "v2.2.6", (Vector2){ (float)currentWidth - 140, (float)currentHeight - 40 }, 22, 1.0f, RED);
// Show Version Number (v2.2.7) in Red
DrawTextEx(customFont, "v2.2.7", (Vector2){ (float)currentWidth - 140, (float)currentHeight - 40 }, 22, 1.0f, RED);
// --- PLAYER NAME POPUP (IF MISSING) ---
if (playerName == "") {
@ -2888,7 +2896,7 @@ int main(void)
Vector3 chunkCenter = { (float)(cx * CHUNK_SIZE + 8), 32.0f, (float)(cz * CHUNK_SIZE + 8) };
Vector3 toChunk = Vector3Normalize(Vector3Subtract(chunkCenter, camera3D.position));
if (Vector3Length(Vector3Subtract(chunkCenter, camera3D.position)) > 24.0f &&
Vector3DotProduct(toChunk, camForward) < -0.2f) continue;
Vector3DotProduct(toChunk, camForward) < -0.3f) continue;
auto it = worldChunks.find({cx, cz});
if (it == worldChunks.end()) continue;
@ -3305,7 +3313,7 @@ int main(void)
// Close hint
DrawTextEx(customFont, "Press E or ESC to close", (Vector2){ (float)(invPanelX + 12), (float)(invPanelY + invPanelH - 22) }, 14, 1.0f, (Color){160, 160, 160, 200});
if (IsKeyPressed(KEY_ESCAPE)) {
if (IsKeyPressed(KEY_ESCAPE) || IsKeyPressed(KEY_E)) {
inventoryOpen = false;
DisableCursor();
}
@ -3335,7 +3343,7 @@ int main(void)
drawInvGrid(guiX + 16, tableStartY + 3*(invSlotSize+invGap) + 40);
if (IsKeyPressed(KEY_ESCAPE)) {
if (IsKeyPressed(KEY_ESCAPE) || IsKeyPressed(KEY_E)) {
currentState = GAMEPLAY;
DisableCursor();
}

View File

@ -1 +1 @@
v2.2.6
v2.2.7