Skip to content

Instantly share code, notes, and snippets.

@Anuken
Anuken / mindustry-fixed-timestep.md
Created June 26, 2026 15:25
Fixed Timestep in Mindustry

Fixed Timestep Overview

What does 'fixed timestep' even mean?

Currently, Mindustry runs building logic at the same rate as the game updates. If your game is running at 1000 FPS, blocks update 1000 times a second. If you're running at 60 FPS, they update 60 times, etc.

In order to compensate for the vast range of potential FPS values, blocks currently use delta time - the time between updates (frames in this case) - to scale values. For example, a conveyor must move items a certain distance each update. In theory, multiplying this movement distance by the delta time means that items move at the same (real world) speed, regardless of whether you are doing 1 or 100 updates a second.

The issue with this approach is that using delta time is not accurate. Updating a block twice at 60 FPS (1x delta) often gives different results than updating the same block once at 30 FPS (2x delta). There are many examples of this kind of behavior across different blocks, and it's impossible to complete eliminate usi

@BrotherTill
BrotherTill / linux.js
Created June 7, 2026 10:54
stayfree linux patch to add wayland support from https://github.com/samidunimsara (added hyprland support)
import process from 'node:process';
import { promisify } from 'node:util';
import fs from 'node:fs';
import childProcess from 'node:child_process';
import path from 'node:path';
import os from 'node:os';
const execFile = promisify(childProcess.execFile);
const readFile = promisify(fs.readFile);
const readlink = promisify(fs.readlink);
@GarboMuffin
GarboMuffin / games.md
Last active October 6, 2025 23:42
GMTK 2025 all games made using Scratch
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active August 3, 2026 00:56
Conventional Commits Cheatsheet
@dakoctba
dakoctba / gist:7676845
Last active August 27, 2025 08:40
How To Reset Your Github Fork

##How To Reset Your Github Fork

Let’s say I want to contribute to a project on github. The project repository is at wp-cli/wp-cli. First I fork it, and then clone the resulting repository, scribu/wp-cli:

git clone --recursive git@github.com:scribu/wp-cli.git
cd wp-cli

Now, I make some commits to master, push them to my fork and open a pull request. Piece of cake:

git commit -m "awesome new feature"

@simonw
simonw / gist:7000493
Created October 15, 2013 23:53
How to use custom Python JSON serializers and deserializers to automatically roundtrip complex types.
import json, datetime
class RoundTripEncoder(json.JSONEncoder):
DATE_FORMAT = "%Y-%m-%d"
TIME_FORMAT = "%H:%M:%S"
def default(self, obj):
if isinstance(obj, datetime.datetime):
return {
"_type": "datetime",
"value": obj.strftime("%s %s" % (