An online multiplayer competitive strategy game focused on power grid management and electrical infrastructure.
Standard Electric is a strategic bidding game where players manage and expand an electrical power company. The core gameplay revolves around:
- Bidding on power plant rights
- Building and connecting power infrastructure
- Managing power generation and distribution
- Balancing supply and demand across the grid
- Upgrading and optimizing the power network
-
Power Grid Management
- Build power plants (coal, solar, etc.)
- Connect buildings with power lines
- Monitor power flow and capacity
- Handle blackouts and grid failures
-
Building System
- Hex-based grid system
- Various building types (power plants, poles, substations)
- Power line connections between buildings
- Resource management for power generation
-
Economic System
- Resource costs for construction
- Maintenance costs
- Fuel costs
- Power delivery revenue
- Research and upgrades
- UI components:
src/components - Game State Machine (xState, actor-kit):
src/actor - Buildables (power plants, power poles, etc)::
src/lib/buildables/ - Grid System:
src/lib/HexGrid - Power System:
src/lib/power/
- TypeScript
- React
- XState (for state management)
- Three.js (for 3D rendering)
Run the development server (Remix + Cloudflare):
bun run dev- Install dependencies:
bun install- Set up environment variables (modify these as necessary):
cp .dev.vars.example .dev.vars
cp .wrangler.toml.example wrangler.toml- This game is intended to run primarily on mobile, so you may want to accept requests from your phone to your dev machine. To do this, install and run ngrok:
ngrok http --url=your-ngrok-url.ngrok.app 8787You'll also need to update your ACTOR_KIT_HOST env var in dev.vars to your-ngrok-url.ngrok.app.
bun testDeploy your app to Cloudflare Pages:
bun run deploysrc/
├── actor/ # Game state and server logic
├── components/ # React components
├── lib/ # Core game systems
│ ├── buildables/ # Building types and logic
│ └── coordinates/ # Grid coordinate system
When working on this codebase, keep in mind:
- The game uses a hex-based grid system for all building placement
- Power systems are core to gameplay - changes should maintain power mechanics integrity
- The state machine in
game.machine.tscontrols core game flow - Building types are defined in
lib/buildables/and must implement theBuildableinterface
For detailed game design information, refer to the full design document.