Skip to content

r1tsuu/ts-minecraft

Repository files navigation

Minecraft Clone with TypeScript, THREE.js

Implemented:

  • Partial ECS pattern without "components" - they are stored inside entities. New game logic can easily be added with createSystemFactory, example - chunk rendering
  • Client - Server architecture through Event Bus, currently the "server" is executed via a web worker.
  • Infinite world generation with terrain, trees, caves, ores
  • Chunk rendering via chunk mesh generation - very fast.
  • Movement, collission, raycasting/highlighting, block placement / block removal
  • Simple inventory
  • Created worlds are persisted currently to the OPFS

TODO:

  • Much more stuff
  • Possibly support running the game straight up from Bun without a web browser using C/Rust FFI for OpenGL/GLFW

Core Utilities

This project heavily relies on several functional programming utilities:

  • Maybe.ts - Optional value type for null safety, eliminating null/undefined checks.
  • Pipe.ts - Functional composition utility for chaining operations
  • AsyncPipe.ts - Asynchronous version of Pipe for handling promises
  • HashMap.ts - Type-safe hash map implementation with functional methods

Using normal Map, undefined, or null is discouraged in this project.

About

Minecraft Clone with TypeScript / THREE.js

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages