Compare commits

2 Commits

Author SHA1 Message Date
c1f240dd32 windows build script, runtime impl 2026-04-15 10:54:58 +03:30
ae7d82a542 readme update 2026-04-15 10:54:08 +03:30
3 changed files with 19 additions and 11 deletions

View File

@@ -63,7 +63,7 @@ then embed with
The engine generates a voxel world using chunk columns. The engine generates a voxel world using chunk columns.
The suspiciouslysimple pipeline: The surprisingly simple pipeline:
1. `SurfaceGenerator` decides if a voxel is solid. 1. `SurfaceGenerator` decides if a voxel is solid.
2. `ChunkColumn` stacks chunks vertically. 2. `ChunkColumn` stacks chunks vertically.
@@ -123,7 +123,7 @@ bit = (row >> x) & 1
``` ```
Since we use 1 bit instead of a whole struct, one could argu the memory usage is ~32× lower. Since we use 1 bit instead of a whole struct, one could argu the memory usage is ~32× lower.
Important, because RAM now costs $800 for 16 GB. that's like fifty bucks per gigabyte, and I'm not emotionally prepared for that. Important, because RAM now costs $800 for 16 GB. that's like fifty bucks per gigabyte.
Materials are handled at the meshing/registry layer, not in voxel storage. Materials are handled at the meshing/registry layer, not in voxel storage.

View File

@@ -4,25 +4,25 @@
set -e set -e
# Configuration # Configuration
GODOT_PROJECT="../minekoloft" # relative path to Godot project GODOT_PROJECT="../minekoloft"
LIB_NAME="fastvoxel" # your library name LIB_NAME="fastvoxel"
DEST_LINUX="$GODOT_PROJECT/addons/fastvoxel/bin/linux" DEST_LINUX="$GODOT_PROJECT/addons/fastvoxel/bin/linux"
DEST_WINDOWS="$GODOT_PROJECT/addons/fastvoxel/bin/windows" DEST_WINDOWS="$GODOT_PROJECT/addons/fastvoxel/bin/windows"
# Build for Linux (native) # Build for Linux (native)
echo "Building for Linux (native)..." echo "Building for Linux (native)..."
cargo build --release cargo build --release --target x86_64-unknown-linux-gnu
# Copy the shared library # Copy the shared library
TMP="$DEST_LINUX/lib${LIB_NAME}.so.tmp" TMP="$DEST_LINUX/lib${LIB_NAME}.so.tmp"
cp "target/release/lib${LIB_NAME}.so" "$TMP" cp "target/x86_64-unknown-linux-gnu/release/lib${LIB_NAME}.so" "$TMP"
mv "$TMP" "$DEST_LINUX/lib${LIB_NAME}.so" mv "$TMP" "$DEST_LINUX/lib${LIB_NAME}.so"
# Optional: Cross compile for Windows (if needed) # Optional: Cross compile for Windows (if needed)
# Uncomment the following lines if you have the Windows target installed # Uncomment the following lines if you have the Windows target installed
# echo "Building for Windows (cross-compile)..." echo "Building for Windows (cross-compile)..."
# cargo build --release --target x86_64-pc-windows-gnu cargo build --release --target x86_64-pc-windows-gnu
# mkdir -p "$DEST_WINDOWS" mkdir -p "$DEST_WINDOWS"
# cp "target/x86_64-pc-windows-gnu/release/${LIB_NAME}.dll" "$DEST_WINDOWS/" cp "target/x86_64-pc-windows-gnu/release/${LIB_NAME}.dll" "$DEST_WINDOWS/"
# echo "Copied to $DEST_WINDOWS" echo "Copied to $DEST_WINDOWS"
echo "Done." echo "Done."

View File

@@ -2,6 +2,14 @@ use std::collections::HashMap;
use crate::{chunk::Chunk, runtime::types::WorldConfig}; use crate::{chunk::Chunk, runtime::types::WorldConfig};
pub enum RuntimeState {
Idle,
ReadingStorage,
Generating,
Meshing,
SavingToStorage,
}
pub struct Runtime { pub struct Runtime {
chunks: HashMap<(i32, i32), Chunk>, chunks: HashMap<(i32, i32), Chunk>,
// renderer: Renderer, // renderer: Renderer,