Skip to content

rr-adam/ether-empires

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

EtherEmpires

This is a simple strategy game where each player colony is a separate smart contract on the network. The goal is to build a prospering space colony that has a lot of resources and military units.

All art in this game was generated by Stable Diffusion.

Features

  • Creating new colonies and loading existing ones
  • Time based resource management
  • Upgrading and managing buildings
  • Training offensive and defensive units
  • PvP colony fights
  • AI generated art

Todo

  • Frontend could use more polishing and responsiveness
  • Add colony attack feature to the frontend
  • Rework colony attack/defense mechanism to make it more interesting

Gallery

image

image

image

Running the project locally

The project can be launched on localhost by utilizing local hardhat network.

1. Hardhat setup

In the hardhat folder:

# install dependencies
npm run install

# start local hardhat node (keep the process running in the background)
npm run hardhat

# deploy the contracts on the local hardhat network
npm run deploy-localhost

The deployment script will print addresses of main EtherEmpires contract and a Multicall contract, save them.

2. Frontend setup

In the frontend folder:

You need to set the etherEmpiresAddress and multicallAddress constants with values you saved in the previous step. Go to frontend/src/util/constants.js and set the values.

Now you can launch the frontend:

# install dependencies
npm run install

# start local server
npm run dev

3. Wallet setup

To launch the project locally you need a EVM compatible wallet, like Metamask, where you can add custom networks. You can learn more about the local hardhat network here: https://hardhat.org/hardhat-network/docs/overview

Add this local network:

Import Hardhat development account

Use one of the default Hardhat accounts to test the project, when launching the local node Hardhat will display list of accounts that have their addresses and private keys shown. The accounts are topped up with 10000 ETH and can be used to interact with the locally deployed game.

Additional info

Colonies have a lot of resources in the beginning but this can be adjusted in the Colony.sol constructor.

About

A web3 strategy game with AI generated art.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published