Skip to content

Instantly share code, notes, and snippets.

@msg555
msg555 / apples.txt
Last active August 29, 2015 14:24
Apple+Any% rules and route
Apple+Any% on dustkid.com
Rules
* This is NG+ (all levels are unlocked already)
* You must start on downhill and may not use tomes.
* You must hit every apple in the stage: the apple counts are listed below. You may use a super to hit an apple.
* You only need to complete stages with apples.
* You must complete the stage after hitting all apples.
* You may die/and or deathwarp. It doesn't matter if you die immediately after hitting an apple.
* You may enable/disable checkpoints at will (though all levels are possible with checkpoints always on).
<?php
/* Create an array and populate some values. */
$arr = array();
for ($i = 0; $i < 100000; $i++) {
$arr[$i] = $i;
}
$foo = &$arr; // comment out me
for ($i = 0; $i < 100000; $i++) {
$bar = $arr; // or comment out me
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <cstring>
using namespace std;
#define MAXN 1010
@msg555
msg555 / hitboxes.txt
Last active April 15, 2016 01:34
Dustforce Hitbox Sizes and Offsets
ah_ = attack heavy
al_ = attack light
_f = front
_u = up
_b = back
_ah = aerial front
_au = aerial up
_ad = aerial down
_of = offset relative to bottom center of character
from dustmaker import *
import sys
import math
import os.path
import glob
for fname in glob.glob("/home/msg555/Dustforce/content/levels2_orig/*"):
with open(fname, "rb") as f:
map = read_map(f.read())
@msg555
msg555 / splay.cpp
Created May 28, 2017 23:49
Optimized splay tree implementation
template<class T> struct splnode {
typedef splnode<T> node_t;
splnode() : P(NULL) {
C[0] = C[1] = NULL;
pull();
}
/* Add extra state here. */
@msg555
msg555 / samplevalidator.cpp
Last active June 16, 2017 15:04
Example validator used on Build-A-Cow
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <map>
#include <cstring>
#include <algorithm>
#include <set>
#include <fstream>
#include <sstream>
@msg555
msg555 / dustapi.as
Last active September 19, 2021 22:19
The DF API definitions
This has been replaced by https://dustapi.readthedocs.io/
@msg555
msg555 / entities.txt
Last active July 28, 2017 01:33
List of Dustforce entities
AI_controller
ambience_trigger
camera_node
check_point
dust_girl
dust_kid
dust_man
dustmod_entity_tool
dust_worth
dust_wraith
@msg555
msg555 / proptest.cpp
Created July 28, 2017 22:59
Create a prop and move it 1 unit per frame.
class script {
/* We don't actually use the scene object in this script, but most will. */
scene@ g;
prop@ p;
int frame;
int frame_cp;
script() {
@g = get_scene();