Skip to content

Instantly share code, notes, and snippets.

Avatar

Jacob Rosenthal jacobrosenthal

View GitHub Profile
View gist:2df37604784aa3054c3b6ccbdf5dde6a
/**
* Remember, you have access these globals:
* 1. df - Just like the df object in your console.
* 2. ui - For interacting with the game's user interface.
*
* Let's log these to the console when you run your plugin!
*/
console.log(df, ui);
class ArtifactsFinder implements DFPlugin {
View gist:ce6dc70ac34c661d04575a5e11c0fa2c

Developing for Dark Forest

Through the past year of development Dark Forest has found funding for its cutting edge research in Zero Knowledge gameplay through in game hat purchases and Gitcoin sponsors like you! Thank you.

With Ethereum gaming, the closed source server model has been replaced by a few Ethereum contracts. This means you can hack literally every other part of the experience to your liking.

Dark forest publishes npm packages for its types and utilities functions and releases an official subgraph to ease your development workflow.

Plugins Developers

View gist:a39995a3df917cbc79b6b8dd81bbf6c9
class Plugin {
clock;
constructor() {
let clock = setInterval(() => {
const planets = df.getMyPlanets();
View gist:bb3dc76ef4fe58060c1df1fb5aad39b7
class Plugin {
/**
* A constructor can be used to keep track of information.
*/
constructor() {
const planets = df.getMyPlanets();
for (const planet of planets) {
captureArtifacts(planet.locationId, 80);
}
View gist:7c694da79df6c257e4b6b1671c0e9e29
class Plugin {
/**
* A constructor can be used to keep track of information.
*/
constructor() {
const planets = df.getMyPlanets();
for (const planet of planets) {
captureArtifacts(planet.locationId, 80);
}
View global artifact crawl
class Plugin {
/**
* A constructor can be used to keep track of information.
*/
constructor() {
const planets = df.getMyPlanets();
for (const planet of planets) {
captureArtifacts(planet.locationId, 80);
}
View Artifact Taker
class Plugin {
/**
* A constructor can be used to keep track of information.
*/
constructor() {
captureArtifacts(ui.getSelectedPlanet().locationId, 80);
}
}
View gist:c8145648c98d4d14ccdc9928a61666ea
/**
* Remember, you have access these globals:
* 1. df - Just like the df object in your console.
* 2. ui - For interacting with the game's user interface.
* 3. plugin - To register the plugin, plus other helpful things.
*
* Let's log these to the console when you run your plugin!
*/
console.log(df, ui, plugin);
class Plugin {
View artifact crawl
class Plugin {
/**
* A constructor can be used to keep track of information.
*/
constructor() {
captureArtifacts(ui.getSelectedPlanet().locationId, 80);
}
}
View auto withdraw
/**
* Remember, you have access these globals:
* 1. df - Just like the df object in your console.
* 2. ui - For interacting with the game's user interface.
* 3. plugin - To register the plugin, plus other helpful things.
*
* Let's log these to the console when you run your plugin!
*/
console.log(df, ui, plugin);
class Plugin {