Skip to content

Instantly share code, notes, and snippets.

Avatar

Jacob Rosenthal jacobrosenthal

View GitHub Profile
View gist:0a834bc77576a40dc90de5de833f788a
# cargo make first
[tasks.first]
dependencies = ["erase", "flash-softdevice", "flash-bootloader", "reset"]
# cargo make --env APP=1 flash
[tasks.flash]
dependencies = ["flash-application", "reset"]
# cargo make --env APP=1 pkg
[tasks.pkg]
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 {
@jacobrosenthal
jacobrosenthal / gist:ce6dc70ac34c661d04575a5e11c0fa2c
Last active August 25, 2021 00:43
Developing for Dark Forest
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

@jacobrosenthal
jacobrosenthal / gist:a39995a3df917cbc79b6b8dd81bbf6c9
Created January 5, 2021 04:26
global artifact crawl on 10 min timer
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);
}
}