Skip to content
Subhan-HaiderPublic

About

A modular procedural voxel survival game engine for Roblox built natively in Luau. Features infinite chunk streaming, 10-stage block cracking, 2x2/3x3 crafting, swimming & diving physics, wildlife hunting, and hostile night mobs.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Voxel Sandbox Game (Roblox Minecraft Engine)

A high-performance, modular procedural voxel survival game engine built natively for Roblox in Luau. It features procedural terrain generation, infinite chunk streaming, authentic block cracking and placement, 2x2/3x3 crafting, a full survival hunger/health/oxygen system, underwater swimming & diving physics, first-person viewmodels, huntable animals, and hostile night mobs.


🌟 Key Features

1. Procedural Voxel World & Biomes

  • Infinite Terrain Streaming: Dynamic chunk generation and distance-based loading/unloading around the player.
  • Biomes & Natural Formations:
    • Plains, Oak Forests, Birch & Pine Spruce Forests, Rugged Mountains, Deserts, and Oceans.
    • Multi-tier procedural trees (Oak, Birch, Spruce) with lush leaf canopies and wood trunks.
    • Natural subterranean caves and ore veins: Coal, Iron, Gold, and Diamond.
    • Indestructible Bedrock floor at the world bottom.

2. Block Interaction & Mining

  • 10-Stage Minecraft Face Cracking: SurfaceGui fracture overlay realistically breaks across 10 progressive stages as you mine.
  • Tool Tier System: Hardness calculation respecting tool types (Pickaxe, Axe, Shovel) and materials (Wood, Stone, Iron, Diamond).
  • Sensory Audio-Visual Feedback: Dynamic impact flakes, break shatter bursts, and authentic hit/break sound effects.
  • Block Placement: Authentic grid snapping against targeted block faces.

3. Survival, Hunger & Swimming Physics

  • Health & Regeneration: 10 hearts (20 HP) with damage flashes, invulnerability frames, and natural regeneration when well-fed.
  • Hunger & Exhaustion: 10 drumsticks (20 Hunger) depleted by sprinting, jumping, and mining; starvation damage occurs when empty.
  • Water Physics, Swimming & Diving:
    • Fluid buoyancy, submerged drag, and underwater camera fog/tint.
    • Surface treading, upward swimming, diving, and sprint-swimming (dolphin kick).
    • Oxygen bar with 10 popping air bubbles and underwater drowning damage when depleted.
  • Food & Eating: Right-click to consume food items (Apples, Bread, Raw/Cooked Porkchops, Beef, Mutton) with eating audio and hand animations.

4. Hunting, Animals & Hostile Mobs

  • Passive Wildlife:
    • Pigs: Drop Raw Porkchops; panic-sprint when struck.
    • Cows: Drop Raw Beef and Leather; panic-sprint when struck.
    • Sheep: Drop White Wool and Raw Mutton; panic-sprint when struck.
  • Hostile Night Mobs:
    • Zombies: Pursue players in melee range; burn in daylight.
    • Skeletons: Keep tactical distance and shoot projectile arrows; burn in daylight.
    • Creepers: Stalk players, hiss, flash white, swell, and detonate with voxel terrain destruction.
  • Combat Mechanics:
    • Crosshair cylinder targeting (findMobAlongRay) and red combat outline highlight.
    • Knockback physics, critical hit gold/orange spark particles, and hold-to-attack continuous swings.

5. Inventory, UI & Crafting

  • Crafting:
    • 2x2 player inventory crafting grid for basic tools, planks, sticks, and torches.
    • 3x3 dedicated Crafting Table grid for advanced weapons and armor.
  • Hotbar & HUD:
    • 9-slot Hotbar with selection indicators and keybindings (1-9, Scroll Wheel).
    • Isometric 3D ViewportFrame block previews rendered in real-time.
    • Authentic Minecraft HUD layout with centered experience level number.

6. First-Person Viewmodel

  • Held item and block visualization in first person with walking bobbing, mining strike swings, and combat animations.

📁 Project Structure

├── src/
│   ├── ReplicatedStorage/
│   │   └── VoxelEngine/
│   │       ├── BlockTypes.luau           # Block definitions, IDs, hardness, textures
│   │       ├── BlockVisuals.luau         # Colors, materials, and visuals for blocks
│   │       ├── ChunkUtils.luau           # Coordinate math (World <-> Chunk <-> Local)
│   │       ├── Config.luau               # Game constants (chunk size, reach, speeds)
│   │       ├── CraftingRecipes.luau      # 2x2 and 3x3 recipe registries
│   │       ├── Items.luau                # Items, tools, food values, attack stats
│   │       ├── NetworkEvents.luau        # RemoteEvent definitions & getters
│   │       ├── TerrainGenerator.luau     # Procedural 3D noise terrain & trees
│   │       └── VoxelGuiBuilder.luau      # UI construction helper
│   ├── ServerScriptService/
│   │   └── VoxelServer/
│   │       ├── BlockService.luau         # Server-side mining validation, drops, TNT
│   │       ├── CraftingService.luau      # Server recipe crafting validation
│   │       ├── MobService.luau           # Animal/mob spawning, AI, combat, panic
│   │       ├── ServerController.luau     # Server initialization & lifecycle
│   │       ├── SurvivalService.luau      # Server health, hunger, and damage sync
│   │       └── WorldManager.luau         # Chunk lifecycle and terrain storage
│   ├── StarterGui/
│   │   └── VoxelGuiBuilder.luau          # Client ScreenGui builder (Hotbar, Hearts, Bubbles)
│   └── StarterPlayer/
│       └── StarterPlayerScripts/
│           └── VoxelClient/
│               ├── AudioVisualEffects.luau       # Sound effects and particle bursts
│               ├── BlockInteractionController.luau# Client raycast, mining, placement, combat
│               ├── ChunkRenderer.luau             # Client chunk meshing & rendering
│               ├── ClientController.luau           # Client entrypoint
│               ├── HotbarInventoryController.luau # Hotbar selection & inventory keys
│               ├── SwimmingController.luau        # Water physics, diving, oxygen bubbles
│               └── ViewmodelController.luau       # First-person held item viewmodel
├── assets/                               # Textures and reference models
├── default.project.json                  # Rojo project configuration
├── BUILD_ALL_IN_STUDIO.luau              # Self-contained 1-click Studio Command Bar installer
├── build_pristine_rbxlx.py               # Generates Roblox place file (.rbxlx) from src
├── generate_studio_installer.py          # Builds BUILD_ALL_IN_STUDIO.luau from src
└── VoxelSandboxGame.rbxlx                # Complete playable Roblox Studio place file

🚀 How to Play & Install

Method 1: Open the Roblox Place File Directly (Recommended)

  1. Open Roblox Studio.
  2. Click File -> Open from File... and select VoxelSandboxGame.rbxlx.
  3. Press F5 (or click Play) to start playing immediately.

Method 2: 1-Click Studio Command Bar Installer

If you are working in any empty or existing Roblox place:

  1. Open your place in Roblox Studio.
  2. Open the Command Bar (View -> Command Bar).
  3. Open BUILD_ALL_IN_STUDIO.luau, copy its entire content, paste it into the Command Bar, and press Enter.
  4. The installer will automatically write and configure all folders, scripts, and remote events across ReplicatedStorage, ServerScriptService, StarterGui, and StarterPlayer.
  5. Press Play!

Method 3: Using Rojo

If you have Rojo installed:

# Start the Rojo server
rojo serve default.project.json

Then connect to localhost:34872 inside the Roblox Studio Rojo plugin.


🌐 Publishing to Roblox

For full instructions on how to publish the game live to the public Roblox platform, configure devices, and set permissions, see the Roblox Publishing Guide.


🎮 Controls

Action PC (Keyboard & Mouse) Mobile (Touch) Console (Gamepad)
Move W, A, S, D On-Screen Thumbstick Left Thumbstick
Jump / Surface Space Jump Button ButtonA
Dive Underwater Left Control / C Dive Button ButtonB
Sprint / Dolphin Kick Left Shift Double-tap / Sprint Left Thumbstick Click
Mine / Attack / Hunt Left Click (Hold or Click) Tap / Hold on target ButtonR2
Place Block / Eat Right Click Tap with item ButtonL2
Hotbar Selection 1 - 9 or Mouse Scroll Tap slot ButtonL1 / ButtonR1
Open Inventory E Inventory Button ButtonY
Lock/Free Mouse Click anywhere — —

🛠 Rebuilding & Development Tools

To update or re-bundle the project after modifying files in src/:

# 1. Regenerate the Studio 1-click Command Bar installer
python generate_studio_installer.py

# 2. Rebuild the complete .rbxlx place file
python build_pristine_rbxlx.py

# 3. Create a fresh distribution zip archive
powershell -Command "Compress-Archive -Path 'src', 'VoxelSandboxGame.rbxlx', 'BUILD_ALL_IN_STUDIO.luau', 'README.md' -DestinationPath 'VoxelSandbox_Complete_AllStages.zip' -Force"

📜 License

MIT License. Feel free to use, modify, and expand for your own Roblox creations!

About

A modular procedural voxel survival game engine for Roblox built natively in Luau. Features infinite chunk streaming, 10-stage block cracking, 2x2/3x3 crafting, swimming & diving physics, wildlife hunting, and hostile night mobs.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages