Dark Forest v0.6

Overview

darkforest

Dark Forest Game on Blockchain.

To run this project you will need to be on Node 14 OR Node 16.

local development

Install dependencies

  • We use yarn to manage packages. Run yarn at the top level to automatically install all dependencies from subfolders. This will also run the monorepo's prepare script, which compiles things like TypeScript or Solidity code.

Running the project

  • Run yarn workspace eth start which starts the hardhat blockchain and deploys the game contracts.
  • Run yarn workspace client start to load the webclient.
  • Run yarn watch to start a typescript watcher to incrementally rebuild changed dependencies.

You can import the private key of one of the accounts hardhat node created and funded, which are printed when you started the node such as:

Account #2: 0x3097403b64fe672467345bf159f4c9c5464bd89e (100 ETH)
Private Key: 0x67195c963ff445314e667112ab22f4a7404bad7f9746564eb409b9bb8c6aed32

If you wish to restart the game from scratch, you will need to clear local storage. To do this in Chrome or Brave Browser, open the inspector, navigate to the "Application" tab, click "Clear storage" on the left pane, and click "Clear site data" under the circle that appears in the main inspector panel. Then hard refresh the website.

Contract Addresses

Both localhost development and production contract addresses are stored in @darkforest_eth/contracts package. If you deploy contracts locally in a fresh node, this file will never change. If the file does change do not check in this file, as you probably have a hardhat node process running in the background.

Production deploys must check in this file, but those will likely be done from CI and committed on a separate (non-development) branch.

Workspaces & Packages

The Dark Forest monorepo is managed using yarn workspaces. To add a new project to the monorepo, you must add it to the workspaces array inside the root package.json.

Note: We use globs for anything in packages/ so you don't need to update the workspaces for a new package.

The packages/ directory is a place to store workspace packages that should be published to something like the https://npmjs.com registry, which allows players to build plugins, game clients, etc using the same code that Dark Forest itself uses.

To add a new package, create a new directory inside the packages/ directory. The package name for anything in packages/ should be prefixed with @darkforest_eth/ to be published to our scope.

circom and snarkjs

If you are modifying anything SNARK-related, you may be interested in rebuilding circuits / redoing setup. Run yarn workspace eth circom:dev or yarn workspace eth circom:prod respectively to rebuild the wasm and zkey files. Then yarn workspace eth compile as usual will build and refresh the Verifier.sol.

Thegraph

To run a local copy of thegraph make sure docker is installed and running, yarn workspace eth start --subgraph df OR if you already have your contracts deployed and running run yarn workspace eth hardhat:dev subgraph:deploy --name df and find your local hosted explorer at http://localhost:8000/subgraphs/name/df

You might also like...

Dark deno-powered hexadecimal plugin for neovim/Vim8

ddx.vim Dark deno-powered hexadecimal plugin for neovim/Vim8 If you don't want to configure plugins, you don't have to use the plugin. It does not wor

Dec 24, 2022

Dark theme for VSCode with italics support (good for Dank Mono, Operator Mono)

Dark theme for VSCode with italics support (good for Dank Mono, Operator Mono)

Omni Owl for Visual Studio Code Dark theme for Visual Studio Code (with Italics) Install • Team • Imitate Preview • License Install All instructions c

Dec 23, 2022

ZaDark is an open source extension that helps you enable Dark Mode for Zalo on PC and Browser.

ZaDark is an open source extension that helps you enable Dark Mode for Zalo on PC and Browser.

ZaDark – Zalo Dark Mode Table of Contents About Install Roadmap Contributing License Contact Awards Acknowledgments About ZaDark is an open source ext

Dec 22, 2022

Create and Host a dark Web Site (Tor Hidden Service)

Tutorial: Hosting a site on Dark Web (Tor Hidden Service) Introduction Before starting, lets clear some questions that might come up in your mind: Wha

Oct 18, 2022

A drop in replacement for Hacker News with support for dark mode and more.

A drop in replacement for Hacker News with support for dark mode and more.

Worker News A drop in replacement for Hacker News with support for dark mode, quotes in comments, user identicons and submission favicons. What's cool

Dec 31, 2022

chakra-radix-colors provides radix-ui color palettes, automatic dark mode, and acessible colors to chakra-ui applications

chakra-radix-colors chakra-radix-colors provides radix-ui color palettes, automatic dark mode, and acessible colors to chakra-ui applications. About C

Dec 30, 2022

🌗 1 line of code to apply auto dark / light theme and support custom theme for your website. Super fast and lightweight theme library.

themes.js A super lightweight and fast Theme library with auto system color scheme detection in JavaScript. Features Auto detect Dark / Light mode by

Nov 29, 2022

Automatically switch Terminal profile based on dark / light mode

Automatically switch Terminal profile based on dark / light mode

auto-terminal-profile Automatically switch the macOS Terminal profile based on the system-wide dark / light appearance mode Prerequisites Node.js 14-1

Jan 2, 2023

A JavaScript library to apply light-dark theme in web pages with the help of css variables

A JavaScript  library to apply light-dark theme in web pages with the help of css variables

Theme Changer The simplest JavaScript library to apply light - dark theme in your website. First Check Out One Example How to use Files index.html sty

Dec 20, 2022
Owner
null
Danger is near (play to earn game, gamefi on near chain testnet) - user play as a fireknight in a PIXELVERSE world who go to forest and kill monster.

Danger is near (play to earn game, gamefi on near chain testnet) - user play as a fireknight in a PIXELVERSE world who go to forest and kill monster. User can earn $DANGER token and score to compete with others user.

Jason Factor 21 Dec 30, 2022
Idle Game Based on A Dark Room with bits of NGU Idle and others mixed in.

An-Empty-World Main Story: You wake up in a strange place, surrounded by debris. Unaware of how you got there, it becomes immediately aware that you'r

Andre Schoolman 2 Mar 26, 2022
A TailwindCSS variant for class-based dark mode with CSS Modules.

A TailwindCSS variant for class-based dark mode with Svelte's scoped stylesheets and CSS modules. If you've ever tried to use TailwindCSS dark mode wi

Bryan Lee 13 Dec 1, 2022
Perfect SvelteKit dark mode in 2 lines of code. Support System preference and any other theme with no flashing

This library is a port of next-theme for SvelteKit. All credit goes to pacocoursey and all next-themes contributors While usable, this library is stil

null 42 Sep 30, 2022
Force dark mode for all web pages.

Dark Mode [WIP] Force dark mode for all web pages. Instalation Enable Epiphany extension. Optional if not done. Download the latest release from the .

null 17 Dec 2, 2022
DoMe is a ToDo App. you can add, delete and reorder elements of the todo list using drag and drop. You can also toggle between dark&light mode

DO ME Todo App Live Preview : DO ME Built With : - ReactJS - TailwindCSS Make sure you have: - Git - Nodejs version 14 or higher (we recommend using

Medjahdi Islem 5 Nov 18, 2022
Toggle Dark-Mode manually on InStream.de

InStream.de Dark-Mode Umschalter Was es macht Dieses Add-On für Firefox fügt einen Button hinzu, mit dem man websites zwischen "Normal" und "Dark-Mode

InStream.de 2 Feb 7, 2022
Library for Foundry VTT which provides easy access to dark comedy fantasy setting created by Richard Zadmar Woolcock

Library for Foundry VTT which provides easy access to dark comedy fantasy setting created by Richard Zadmar Woolcock. Current inclusions are a bestiary, edges, hindrances, and a journal with setting information, character creation, and more. The Savage Worlds Adventurers Edition Game System is the system this setting is designed for.

KevDog 2 Mar 18, 2022
🌓 Add dark mode/night mode custom elements to your website.

dark-mode A custom element that allows you to easily put a Dark Mode ?? toggle. so you can initially adhere to your users' preferences according to pr

小弟调调™ 12 Oct 20, 2022