Skip to content

Instantly share code, notes, and snippets.

View leb2's full-sized avatar

Brendan Le leb2

View GitHub Profile
@leb2
leb2 / 2026-03-11-building-graph-economy-design.md
Last active March 11, 2026 07:20
Shattered Dominion: Building Graph Economy System Design

Building Graph Economy System

Overview

Replace the abstract settlement building-slot system with a spatial economy where all buildings exist on hex tiles and are connected via a player-configured supply graph. Workers physically carry resources along graph edges. The Town Hall is the central storage node; all other buildings are independent map structures linked to it directly or through processing chains.

Core Concepts

Buildings on the Map

@leb2
leb2 / .slate.js
Last active March 6, 2018 20:03
My Slate Config
var MARGIN = 28;
// Fullscreen
slate.bind('f:cmd,alt', function(win) {
// ±4 to account for hidden Dock on left of screen.
win.doOperation(S.op('move', {
'x': 'screenOriginX - 4 + ' + MARGIN,
'y': 'screenOriginY + ' + MARGIN,
import random
time_chances = [
(0, 0.10),
(1, 0.15),
(2, 0.10),
(3, 0.35),
(4, 0.25),
(5, 0.05)
var gulp = require('gulp');
var shell = require('gulp-shell');
gulp.task('latex', function() {
return gulp.src('*.tex')
.pipe(shell(["pdflatex -interaction=nonstopmode <%= file.path %>"]).on('error', function(){}))
.pipe(gulp.dest('./'))
});
gulp.task('watch', function() {