Skip to content

BibliothecaDAO/eternum

Repository files navigation

discord License: MIT

Realms: Eternum

Eternum has been designed to be a foundational game for Realms World. It will freely evolve and grow as the game and world age. Think of it as a living, breathing digital ecosystem, constantly inviting endless exploration. It's both a game and an open platform.

Eternum as a Game

A unique, high-stakes game played over seasons. Players can pursue total victory or freely explore their own path, unconstrained by predetermined objectives.

In Eternum, players forge alliances across an infinite hexagonal procedurally generated map during fully onchain, immutable seasons. They build resource stockpiles, train troops, trade, and strategically cooperate or deceive to achieve victory in this world of diplomacy, resource management, and tactical decision-making.

Entry is via a Season ticket minted off the original Loot Realms NFTs. Using $LORDS, players trade in a free market within the world and on Starknet to gain competitive advantages. The open nature of the design allows players to extend the game world and introduce their own features if they choose.

Eternum as a Platform

Eternum lays a robust scaffold on which to build higher-level structures and games. It establishes key functional systems in the Core layer while introducing fungible resources, serving as a foundation for future development and expansion.

Click to expand

Open World Philosophy

Emphasizing the concept of a truly Autonomous World is pivotal. In our vision, it must embody two key characteristics: radical openness and persistence. But what exactly does this entail? Let's delve into both theoretical and mechanical perspectives.

From a theoretical standpoint, radical openness signifies an inclusive world accessible to everyone. This openness transcends traditional barriers - there are no gatekeepers, no singular entities exerting control. Instead, it's a space where anyone can contribute, build, and actively participate without restrictions.

Mechanically, radical openness is reflected in the flexibility and adaptability of the world's underlying structures. The contracts that define this world are not rigid; they are designed to be extended, forked, and maintained by anyone with the willingness and capability to do so.

Envision Eternum as akin to the original cellular structure in a primordial soup. Over time, this basic form dissolves, giving rise to a more complex organism. Eternum is the genesis, the starting point from which an intricate and expansive world emerges, constantly evolving and reshaping itself in response to the contributions and interactions of its inhabitants.

Project Structure

  • Client - React apps built with Vite
  • Contracts - Cairo/Dojo smart contracts
    • Game contracts
    • Season Pass contracts
    • Season Resources contracts
  • Packages - Shared libraries
    • Core - Eternum SDK
    • React - React hooks and components
  • Config - Configuration and deployment scripts

Prerequisites

Core Dependencies

Setup

  1. Install Dojo:
curl -L https://install.dojoengine.org | bash
  1. Install pnpm:
npm install -g pnpm
  1. Install project dependencies:
pnpm install
  1. Build shared packages:
pnpm run build:packages

Development of Eternum

Development of Eternum is open-source. If you would like to contribute comment on an open issue.

Available Scripts

Development

  • pnpm dev - Start game development server
  • pnpm dev:docs - Start documentation development server
  • pnpm dev:landing - Start landing page development server

Building

  • pnpm build - Build game client
  • pnpm build:docs - Build documentation
  • pnpm build:landing - Build landing page
  • pnpm build:packages - Build shared packages

Testing & Linting

  • pnpm test - Run all tests
  • pnpm lint - Run linting
  • pnpm format - Format code
  • pnpm format:check - Check code formatting

Contract Deployment

Eternum supports multiple deployment environments:

Environment Description
Local For development and testing
Slot Staging environment
Sepolia Public testnet
Mainnet Production environment

Deploying to Local

Before deploying to any environment, confirm that you have a .env.{environment} file in the contracts/common directory, as well as in the client/apps/game directory.

To deploy and run the game locally:

# Start local game contracts
pnpm run contract:start:local

Deploying to Sepolia

To deploy the contracts to Sepolia testnet, run these commands in order:

  1. Deploy game contracts:
pnpm run game:migrate:sepolia
  1. Deploy season pass contracts:
pnpm run seasonpass:deploy:sepolia
  1. Deploy season resources contracts:
pnpm run seasonresources:deploy:sepolia
  1. Update TOML configuration:
pnpm run toml:update:sepolia
  1. Start the indexer:
pnpm run indexer:start:sepolia
  1. Deploy game configuration:
pnpm run config:deploy:sepolia

License

This project is licensed under the MIT License. See the LICENSE file for more information.