Skip to content

Instantly share code, notes, and snippets.

View jacobrosenthal's full-sized avatar

Jacob Rosenthal jacobrosenthal

View GitHub Profile
# 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]
/**
* 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

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
class Plugin {
clock;
constructor() {
let clock = setInterval(() => {
const planets = df.getMyPlanets();
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);
}
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);
}
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);
}
class Plugin {
/**
* A constructor can be used to keep track of information.
*/
constructor() {
captureArtifacts(ui.getSelectedPlanet().locationId, 80);
}
}
/**
* 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 {
class Plugin {
/**
* A constructor can be used to keep track of information.
*/
constructor() {
captureArtifacts(ui.getSelectedPlanet().locationId, 80);
}
}