Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

115 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My World 🌍

A voxel-based sandbox game engine built in C with 3D rendering capabilities, procedural world generation, and real-time physics simulation.

Developed in just 3 days by a 2-person team as part of an Epitech project, showcasing rapid prototyping and collaborative systems programming skills.


🎮 Overview

My World is a Minecraft-inspired game built from the ground up in C in just 3 days, demonstrating expertise in:

  • 3D Graphics Rendering using rasterization
  • Procedural World Generation with infinite chunk-based terrain
  • Real-time Physics & Collision Detection
  • Event-driven Architecture for scalable game systems
  • Memory Management & Performance Optimization
  • Agile Development under tight time constraints

The project spans ~5,000+ lines of well-structured C code across 50+ modules, completed as part of an Epitech curriculum project.


✨ Key Features

🌎 World System

  • Chunk-based infinite terrain with procedural generation
  • Procedural heightmap generation for varied landscapes
  • Block placement & destruction with real-time updates
  • Tree generation using procedural algorithms
  • Persistent world state saved to disk in chunks

🎥 Camera & Controls

  • First-person camera with smooth movement
  • Physics-based movement with gravity and collision detection
  • FPS-style controls (WASD for movement, mouse for look)
  • Block targeting system with visual highlight
  • Crosshair UI for precise block interaction

🎨 Rendering Engine

  • Optimized 3D rendering using CSFML (C Simple and Fast Multimedia Library)
  • View frustum culling to only render visible chunks
  • Distance-based sorting for proper depth rendering
  • Dynamic texture mapping for block faces

🔨 Item & Registry System

  • Item registry with extensible block types
  • Block properties (bedrock, grass, stone, wood, leaves, saplings, planks)
  • Hand rendering with block placement detection

🎵 Audio System

  • Background music during gameplay
  • Persistent audio state tracking

📱 User Interface

  • Toolbar display for selected items
  • Crosshair reticle for aiming
  • Image rendering for UI elements
  • Quick access to game information

⌨️ Event Handling

  • Robust event system for game interactions
  • Modular event handlers for scalability
  • Real-time input processing

🏗️ Architecture

Modular Design

src/
├── world/              # Terrain system (chunks, blocks, generation)
├── camera/             # First-person camera with physics
├── renderer/           # 3D rendering pipeline
├── game/               # Main game loop and logic
├── ui/                 # User interface elements
├── registry/           # Item/block registry system
├── event_handler/      # Event processing system
├── sounds/             # Audio management
├── utils/              # Utility functions (math, sorting)
└── array/              # Dynamic array data structure

Key Components

  • World: Handles terrain chunks, block placement, procedural generation
  • Renderer: Projects 3D points to 2D screen space, culls invisible chunks
  • Camera: Manages player position, orientation, and physics
  • Registry: Central system for all in-game item definitions
  • Event Handler: Distributed event system for clean separation of concerns

🛠️ Technology Stack

Component Technology
Language C (C99)
Graphics CSFML (C Simple and Fast Multimedia Library)
Platform Linux
Compiler Epiclang
Build System Makefile

Dependencies

libcsfml-graphics  # Graphics rendering
libcsfml-window    # Window management
libcsfml-system    # System utilities
libcsfml-audio     # Audio playback
libm               # Math library

📦 Building & Running

Prerequisites

# Install CSFML and development tools (Ubuntu/Debian)
sudo apt-get install libcsfml-dev build-essential

Build

# Compile the project
make

# Clean build artifacts
make clean

# Full rebuild
make re

Run

./my_world

🎮 Controls

Input Action
Z Move forward
Q Move left
S Move backward
D Move right
SPACE Jump
R Reset camera view
Mouse Movement Look around
Left Click Break/destroy block
Right Click Place block
Mouse Wheel Change toolbar slot
ESC Quit game

📊 Project Statistics

Development Time**: 3 days

  • Team Size: 2 developers
  • **
  • Lines of Code: 5,000+
  • Modules: 50+
  • Supported Blocks: 7 types (bedrock, grass, stone, wood, leaves, saplings, planks)
  • World Chunks: Procedurally generated infinite terrain
  • Build Time: < 5 seconds

🎯 Learning Outcomes

This project demonstrates proficiency in:

Systems Programming

  • Manual memory management and optimization
  • Complex data structure implementation (dynamic arrays, chunk indexing)
  • Low-level performance optimization

Graphics & Game Programming

  • 3D coordinate transformations and projections
  • Real-time rendering and culling algorithms
  • Camera physics and collision detection

Software Architecture

  • Modular component design
  • Event-driven systems
  • Decoupled game logic

C Programming Best Practices

  • Clean code organization
  • Comprehensive error handling
  • Efficient algorithms (quicksort for depth sorting)

🚀 Future Enhancements

  • Dynamic lighting system
  • Advanced procedural biome generation
  • Multi-threaded chunk loading
  • Advanced block mechanics (water, lava)
  • Sound effects for interactions
  • Network multiplayer support
  • Enhanced terrain features (caves, structures)

📄 Project 3 days

Team Size: 2 developers
Institution: Epitech (École Technologique)
Complexity: Advanced systems programming project

This rapid development project showcases the ability to design and implement a complex 3D graphics application under tight time constraints, including architecture planning, collaborative development, and efficient problem-solving in C

This project was developed to showcase comprehensive software development skills including architecture design, performance optimization, and cross-platform C development.


📝 License

This is an educational project developed during an internship at Epitech. s

Development Period: March 2026 (3-day sprint)
Project Type: Epitech Educational

Development Period: 2025-2026
Project Type: Educational / Portfolio Project


📚 Code Quality

  • Modular architecture with clear separation of concerns
  • Well-documented code structure
  • Efficient memory management
  • Performance-optimized rendering pipeline
  • Comprehensive error handling

Built with ❤️ in C for a 6-month internship project

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages