Project Egregore
Refusing the False Dilemma of Online Worlds
A revolutionary hybrid network architecture that synthesizes the advantages of centralized authority and distributed peer-to-peer intelligence, creating truly emergent collective systems.
The Vision: A New Frontier in Online Experiences
For decades, the landscape of online gaming and interactive digital experiences has been shaped by a fundamental, often unspoken, dilemma: the seemingly irreconcilable trade-off between security and fairness (typically offered by centralized, authoritative server architectures) and low-latency, real-time responsiveness (the hallmark of peer-to-peer systems). The internet promised us vast, interconnected universes; what we often received were mere lobbies. Artificial Intelligence promised us dynamic, living worlds; what we often got were predictable scripts. Project Egregore asserts that this false dichotomy is not an inherent limitation of technology, but rather a consequence of architectural choices. We declare: The time for choosing is over.
The Centralized Fortress
β Advantages: Maximum security against cheating, guaranteed fairness for all, simplicity of state management.
β Compromises: Inevitable latency, limiting central bottleneck, exponential scaling cost.
The Anarchic Frontier
β Advantages: Minimal latency, cost scalability, distributed resilience.
β Compromises: Massive vulnerability to cheating, complexity of consensus, systemic injustice.
The Broken Paradigm
Why Current Solutions Fall Short
The Latency Trap: The Unseen Barrier to Immersion
Latency, often perceived as mere 'lag', is a multifaceted problem that profoundly impacts the player experience. In traditional client-server models, every significant player action must traverse the network to the server, be processed, and then have its outcome relayed back to all relevant clients.
Traditional Server RTT
Egregore P2P
The Synthesis: Egregore Architecture
Three Symbiotic Layers Working in Harmony
Layer 1: Server of Truth
The authoritative backbone powered by SpacetimeDB, ensuring ultimate fairness and security. Acts as the final arbiter for all critical game state decisions.
Layer 2: P2P Mesh
Direct peer-to-peer communication for real-time interactions. Enables ultra-low latency for immediate feedback and responsive gameplay.
Layer 3: Immune System
Distributed consensus and reputation system that detects anomalies and maintains network health through collective intelligence.
Scenario: Cheater Detection & Isolation
- Detection: Player D attempts to manipulate game state (speed hack)
- Local Consensus: Neighboring nodes (A, B, E) detect anomaly through weighted voting
- Soft Correction: Honest nodes apply local corrections, isolating the cheater
- Escalation: If anomaly persists, escalate to SpacetimeDB for authoritative correction
- Reputation Update: Player D's trust score decreases, reducing their influence in future consensus
The Engine: Distributed Reactive Physics
Transforming the Network into a Distributed GPU
Project Egregore redefines how game physics are computed, transforming the network itself into a distributed GPU through a novel approach to reactive computation. This paradigm shift moves away from the traditional model of a single, authoritative physics host, distributing the computational burden across the entire network of connected players.
Traditional Model: Physics Host Bottleneck
In most online games, a single server or a dedicated physics host is responsible for calculating all critical physics interactions. When a complex event occurs, this host performs all the necessary calculations in a batch.
Problem: A single node suffers a massive load spike, and the network is flooded with data, leading to potential lag for all players.
Egregore Model: Reactive Physics Cascade
Project Egregore adopts a reactive, event-driven approach to physics. Instead of a single host, physics calculations are broken down into granular, independent tasks that are distributed across the P2P network.
Distributed Work Queue System
The practical implementation of reactive physics relies on a Distributed Work Queue System. This system acts as a dynamic marketplace for computational tasks, where nodes pull work on demand.
Live Demonstration: Distributed Physics Load Balancing
The following interactive demonstration showcases how different client machines, with varying hardware capabilities and current workloads, contribute to the overall physics computation without becoming overloaded:
Client 1 (High-End PC)
Client 2 (Mid-Range PC)
Client 3 (Laptop)
Client 4 (Old PC)
Implementation: From Concept to Code
Technology Stack and Development Roadmap
Translating the visionary architecture of Project Egregore into a tangible reality requires a carefully selected technology stack and a phased development roadmap. Our choices prioritize performance, safety, and the ability to manage complexity inherent in distributed systems.
Game Engine: Bevy (Rust)
Bevy is a refreshingly modern, data-driven game engine built in Rust. Its Entity Component System (ECS) architecture provides native parallelism, enabling highly performant and scalable game logic.
Server of Truth: SpacetimeDB
SpacetimeDB serves as the authoritative, low-latency backend for Project Egregore. Its unique ability to combine a database, application server, and game logic in Rust provides a robust foundation.
P2P Network: WebRTC & FlatBuffers
The P2P layer is built upon WebRTC for direct, low-latency peer-to-peer communication and FlatBuffers for efficient, zero-copy data serialization.
Physics Engine: Rapier (Rust)
Rapier is a robust and highly performant 2D and 3D physics engine written in Rust. Its modular design and deterministic nature make it ideal for distributed computation.
Development Roadmap
The development of Project Egregore will proceed in distinct phases, each building upon the previous one, validating core concepts, and progressively adding complexity.
Hybrid Network Proof of Concept (4-6 weeks)
The initial phase focuses on establishing the foundational hybrid network architecture. This PoC will demonstrate the core communication layers and the basic interaction between the authoritative server and the P2P mesh.
Reputation and Consensus System (6-8 weeks)
This phase builds upon the P2P mesh, introducing the Immune System layer. The focus is on implementing the dynamic trust and capability scores and the local consensus mechanisms.
Reactive Distributed Physics (8-12 weeks)
This is the phase where the physics engine is fully integrated into the distributed work queue system, leveraging the P2P mesh and the reputation system for dynamic load balancing.
Distributed AI Integration (10-16 weeks)
The final phase integrates network-enabled NPCs as first-class clients within the Egregore architecture, leveraging the distributed network for AI processing.
Join the Revolution
Be Part of the Future of Online Worlds
Project Egregore represents more than just a technological advancementβit's a paradigm shift that will redefine what's possible in online interactive experiences. We're looking for visionary developers, researchers, and innovators who share our belief that the false dichotomy between security and performance can be transcended.
What We're Building
A revolutionary hybrid network architecture that combines the security of centralized systems with the performance of peer-to-peer networks, creating truly emergent collective intelligence.
Who We Need
Rust developers, network engineers, game developers, distributed systems experts, and visionaries who believe in pushing the boundaries of what's possible in online experiences.
The Impact
Join us in creating technology that will democratize game development, enable truly massive multiplayer experiences, and establish new standards for fairness and performance in online worlds.
Ready to Build the Future?
Project Egregore is more than a technical challengeβit's an opportunity to be part of something transformative. If you're passionate about distributed systems, game development, or simply believe that we can do better than the current state of online experiences, we want to hear from you.