Skip to content

Instantly share code, notes, and snippets.

View 01010111's full-sized avatar
πŸ‘½
πŸ•Ή

Will Blanton 01010111

πŸ‘½
πŸ•Ή
View GitHub Profile
@01010111
01010111 / hello.p8
Last active March 9, 2019 11:46
ECS in P8 ✨
pico-8 cartridge // http://www.pico-8.com
version 16
__lua__
--pecs - pico-8 ecs
--01010111
function _init()
local rect = get_id()
add_component(rect, 'position', { x=60, y=60 })
add_component(rect, 'physics', { vx=2, vy=0, ax=0, ay=2, dx=0.9, dy=1.0 })
@01010111
01010111 / Game.hx
Created March 4, 2019 16:13
Very simple heaps example
import h2d.Scene;
import h2d.Graphics;
import hxd.App;
import hxd.Key;
class Game extends App
{
static function main() new Game();
@01010111
01010111 / Shader.hx
Created December 4, 2018 02:41
Color replacement shader
package;
import flixel.system.FlxAssets;
import flixel.util.FlxColor;
class Shader extends FlxShader
{
@:glFragmentSource('
#pragma header
@01010111
01010111 / Stack.hx
Created November 29, 2018 17:40
Stack
package;
import flixel.FlxState;
import flixel.math.FlxPoint;
import flixel.FlxG;
import flixel.FlxCamera;
import flixel.FlxSprite;
import flixel.group.FlxGroup.FlxTypedGroup;
using Math;
@01010111
01010111 / Lottery.hx
Last active November 9, 2018 21:57
Haxe Lottery
class Lottery
{
var entries:Array<{ name:String, chance:Float }> = [];
var lots_total:Float = 0;
public function new() { }
public function add_entry(participant:String, chance:Float = 1)
{
@01010111
01010111 / Animation.hx
Created October 16, 2018 15:43
Heaps Animation
import h2d.Anim;
import h2d.Tile;
class Animation extends Anim
{
var anims:Map<String, AnimData> = new Map();
var tiles:Array<Tile>;
var current_anim:String = '';
@01010111
01010111 / ZSynth.hx
Created August 21, 2018 19:20
Lime + OpenAL + wonky sounds
package zsynth;
import lime.utils.Float32Array;
import lime.media.openal.*;
using Math;
class ZSynth
{
@01010111
01010111 / PlayState.hx
Created August 10, 2018 19:56
Crawler
package;
import flixel.FlxSprite;
import flixel.FlxState;
import flixel.graphics.FlxGraphic;
import flixel.math.FlxPoint;
import flixel.tile.FlxBaseTilemap.FlxTilemapAutoTiling;
import flixel.tile.FlxTilemap;
import flixel.util.FlxPath;
import flixel.util.FlxSpriteUtil;
@01010111
01010111 / Goap.hx
Last active August 8, 2018 18:35
Haxe GOAP
package util;
using util.Goap.Planner;
class Goap {}
class Planner
{
public static function plan(agent:IGoapAgent):Null<GoapTask>
@01010111
01010111 / ogmo_feature_set.md
Last active June 23, 2018 16:12
OGMO Feature Set

OGMO Feature Doc

Menu

Ogmo

  • Preferences
    • Maximize on startup (checkbox)
    • Undo limit (per level) (textfield)
    • Open level limit (textfield)
    • Clear Project History (button)