Skip to content
/ Foresst Public

Foresst is a high-performance, open-source Minecraft implementation. It aims to provide a free-to-use client that is compatible with official Minecraft servers, while also offering a simple modding API and a custom protocol for an enhanced experience. Please note that a valid Minecraft account is required to use the client.

License

Notifications You must be signed in to change notification settings

mtctx/Foresst

Step 1: core (The Foundation)

Description: This module is the brain of your game. It's the central nervous system that defines the rules, data, and logic without any concern for how it's presented to the user. Its independence is key to creating a robust, testable, and flexible architecture.

Job:

  • Game State Management: Stores and updates the current state of the game world (e.g., player position, inventory, loaded chunks).
  • Data Models: Defines the core data structures for blocks, items, entities, and the world itself.
  • Game Loop: The fundamental logic that processes game ticks, updates entities, and triggers events.
  • Threading and Concurrency: Manages background tasks like world generation or saving using kotlinx.coroutines.

Depends on:

  • Nothing from your other modules. This module is the root dependency.
  • Libraries: kotlinx-coroutines-core, kotlinx-serialization-core.

Valuable Resources:

  • Software Design Patterns: Study patterns like the Entity Component System (ECS) or Observer pattern.
  • Kotlin Coroutines Documentation: Master structured concurrency for your game loop and asynchronous tasks.
  • Minecraft Wiki: A wealth of information on block IDs, game mechanics, and world generation.

Step 2: network (Connecting to the World)

Description: This module is responsible for all client-server communication. By developing this early, you can start testing interactions with a simple server, even before you have a fully functional graphics engine.

Job:

  • Packet Handling: Serializes and deserializes network packets for both the original Minecraft protocol and your new Foresst protocol.
  • Connection Management: Handles the lifecycle of a network connection, from authentication to disconnection.
  • Network Synchronization: Ensures the client's game state remains synchronized with the server's.

Depends on:

  • core (to access the game data models it needs to send/receive).
  • Libraries: Ktor Client (ktor-client-core, ktor-client-cio, ktor-serialization-kotlinx-json).

Valuable Resources:

  • Ktor Documentation: A comprehensive guide to building network clients.
  • Minecraft Protocol Wiki: wiki.vg is the essential resource for understanding the Minecraft server protocol.
  • Network Programming Tutorials: Study concepts like TCP, UDP, and network packet design.

Step 3: graphics & input (Bringing it to Life)

Description: These two modules work in tandem to create the visual and interactive experience of the game. Developing them together is logical, as they are both tied to LWJGL's window management.

Job (Graphics):

  • Render Loop: The main OpenGL rendering logic.
  • Asset Rendering: Renders blocks, entities, and user interface elements.
  • Shader Management: Loads and manages GLSL shaders.
  • GUI System: Draws the in-game UI.

Job (Input):

  • Window Management: Creates and manages the game window using GLFW.
  • Input Polling: Reads keyboard and mouse input.
  • Action Mapping: Translates raw input into game-specific actions (e.g., jump, move).

Depends on:

  • core (to get the data it needs to draw).
  • Libraries: LWJGL (lwjgl, lwjgl-glfw, lwjgl-opengl, etc.).

Valuable Resources:

  • LWJGL Documentation: Official tutorials and documentation.
  • OpenGL Tutorials: LearnOpenGL is an excellent resource for mastering the concepts behind your rendering engine.
  • GLFW Documentation: For managing windows and input.

Step 4: modding-api (Extensibility and Community)

Description: This module provides the public-facing API for your modding system. It's developed last because it needs the core module to be stable and well-defined.

Job:

  • DSL (Domain-Specific Language): Defines and processes the DSL for your mods.
  • Public Interfaces: Exposes a clear, stable, and simple set of interfaces for third-party developers to interact with the game.
  • Mod Loading: Manages the loading, execution, and lifecycle of mods.

Depends on:

  • core (to expose game logic to mods).

Valuable Resources:

  • Domain-Specific Language (DSL) Design Patterns: Learn how to create an intuitive and powerful DSL in Kotlin.
  • API Design Principles: Study what makes an API easy to use, and backward-compatible.
  • Existing Game Modding APIs: Look at the APIs for games like Minecraft (Forge, Fabric) or others to see what works and what doesn't.

About

Foresst is a high-performance, open-source Minecraft implementation. It aims to provide a free-to-use client that is compatible with official Minecraft servers, while also offering a simple modding API and a custom protocol for an enhanced experience. Please note that a valid Minecraft account is required to use the client.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Contributors 2

  •  
  •