ametel01 / Ogame-Cairo

Ogame implementation written in cairo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ogame-Cairo

⚠️ WARNING

THIS REPO IS DISCONTINUED, NEW REPO HERE https://github.com/ametel01/No-Game Ogame logic implementation written in Cairo for Starknet.

What is ogame

OGame is a browser-based, money-management and space-war themed massively multiplayer online browser game with over two million accounts. OGame was created in 2002 and is produced and maintained by Gameforge. Players can have multiple planet, a fleet and attack each other to steal resources.

Game Docs

Roadmap

  1. Account can create a planet and upgrade mines. Only mines are available. ✔️
  2. Integration of ERC721: planets will be NFTs. ✔️
  3. Integration of ERC20: resources will be tokenized. ✔️
  4. Add energy production requirements for mines. ✔️
  5. Add time constraints for buildings upgrades. ✔️
  6. Implementation of Robot Factory. ✔️ <<
  7. Add research lab. ✔️
  8. Add technologies. ✔️
  9. Add Shipyard. ✔️
  10. Add ships.
  11. Implement logic for space travel between planets.
  12. Implement lagic for ships combat.

  13. Add research lab.
  14. Add technologies.
  15. Allow creation of colonies.
  16. Implement logic for space travel between planets.
  17. Implementation of basic ships:
  • Small Cargo
  • Light Fighter

    origin/v0.1

This will most likely keep me busy for a while. The rest of the roadmap is yet to be decided.

Game Deployment Workflow

  1. Deploy minter contract:
nile deploy erc721_minter --network goerli [owner.contract_address]
  1. Deploy ERC721:
nile deploy --network goerli ERC721 0x4e6f47616d6520 0x4f474d302e31 [minter.contract_address] 54 105 112 102 115 58 47 47 81 109 98 87 78 103 117 89 106 85 115 53 101 50 102 55 88 119 113 65 106 54 121 72 69 119 111 74 109 104 89 78 121 72 78 78 90 122 105 102 56 78 109 56 53 68 47
  1. On minter contract invoke setNftAddress with ERC721 as parameter.

  2. Deploy main game contract:

nile deploy Ogame --network goerli [erc721.contract_address] [owner]
  1. On minter invoke setNftApproval with Ogame.contract_address as operator.

  2. Invoke mint_all function on erc721_minter contract with parameters n = 150 and token_id.low starting from 1. Minting more >= 200 planets in a single transaction triggers MAX NUMBER OF STEPS error from Starknet.

  3. Deploy metal token:

nile deploy ERC20_Mintable --network goerli 0x6f67616d65206d6574616c2076302e31 0x4f674d455476302e31 18 0 0 [game.contract_address] [game.contract_addres]
  1. Deploy crystal token:
nile deploy ERC20_Mintable --network goerli 0x6f67616d65206372797374616c2076302e31 0x4f6743525976302e31 18 0 0 [game.contract_address] [game.contract_addres]
  1. Deploy deuterium token
nile deploy ERC20_Mintable --network goerli 0x6f67616d652064657574657269756d2076302e31 0x4f6744455576302e31 18 0 0 [game.contract_address] [game.contract_addres]
  1. Invoke erc20_addresses on Ogame contract with resources token addresses as params.

About

Ogame implementation written in cairo


Languages

Language:Cairo 75.6%Language:Python 21.8%Language:Jupyter Notebook 2.5%Language:Shell 0.1%