About the Project
Building a Moddable, Server-Authoritative Voxel Engine from Scratch
GitHub Repository: github.com/stanleyzihanfan/A_Game (Stable versions are on
mainbranch. Active development lives on thefeaturebranch. )
I am building a custom game engine to realize my dream sandbox: the infinite exploration of Minecraft, the factory automation of Factorio/Satisfactory, and the galactic scale of Stellaris.
I am a huge enjoyer of modded Minecraft, and while the possibilities with mods are truly endless, many of my favorite mods kill performance so much I simply can't use them together, even with many optimization mods. The Minecraft engine itself also limits performance and what mods can do as well.
My solution? Create my own game! And not just a game, but one where the mod loader IS the game itself.
Let me explain:
The "Core" is literally just a Registry of functions under different event hooks, registered by mods on startup. A main:tick hook is called every game loop, and functions under that can trigger other event hooks based on the game state.
That's it. That's all the engine is.
Now, you might be wondering: "What about that whole space/factory game you described?"
The game I described is just a set of default mods shipped with the core.
This makes the base game highly configurable (mods can be freely enabled/disabled).
Players can remove the base game entirely and import new mods to create a completely different game!
When creating a world, players can choose any imported "scenarios" they have. (essentially, modpacks).
Because I've never seen this done before, and using existing game engines would severely limit my architecture, I am building this entirely from scratch using Python (server), JavaScript/Three.js (client), Flask, and WebSockets, with a thread-per-client, server-authoritative model.
Current Status
Follow the dev logs for more details on my journey!
Refactoring the server-client communications model for the god-knows-howmanyth time because I realized the original will probably cause headaches for later development immediately after finishing it. Now attempting to have all messages be routed to game state and sent from there.
Figuring out how I should have the server talk to each client individually using the above system.
Currently leaning towards creating a per-player storage in game state that each contains a "send to client" section. When a client sends a request to the server, it will include its player name and any functions processing it can then use that to add their response to the correct player data.
Moving player position and display updates to server.
Follow the Journey
This is an active, ongoing project. I am documenting every failure, refactor, and breakthrough in my dev logs.
- Read Dev Log #1: Separating the Client & Server
