How kentywang/agamari works
Main Components
A. Client-Side (Browser)
• React Frontend Components
• Three.js 3D Rendering Engine
• Cannon.js Physics Engine
• Client-side Redux Store
• Socket.IO Client
• Game Logic Components
B. Server-Side
• Node.js Server
• Socket.IO Server
• Server-side Redux Store
• Game Engine
• World Management
[Browser Client] <--Socket.IO--> [Node.js Server]
Client Side Server Side
• React UI | | Game Engine |
• Three.js | | World Manager |
• Cannon.js |<-Socket.->| Physics Sync |
• Redux Store | IO | Redux Store |
• Game Logic | | State Manager |
Data Flow Indicators
Specific data flows:
• Player inputs → Client physics calculations
• Physics updates → Server validation
• Server state changes → Client state updates
• Player interactions → Game state modifications
Key Technical Elements to Highlight
• Socket.IO real-time communication
• Distributed physics calculations
• State synchronization between client and server
• Redux store mirroring
• Three.js and Cannon.js integration
Implementation Notes
• browser/ directory mapping to client-side components
• server/ directory mapping to server-side components
• game/ subdirectories showing shared game logic
• reducers/ showing state management on both ends