Skip to content

Instantly share code, notes, and snippets.

@steverichey
steverichey / DontMovePreloader
Created December 18, 2013 18:23
Custom Preloader for HaxeFlixel, used in Don't Move
package;
import flash.Lib;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flixel.system.FlxPreloader;
import flash.events.Event;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
@steverichey
steverichey / gist:5100082
Created March 6, 2013 15:28
A copy of the Defaults.XML file.
<?xml version="1.0" encoding="utf-8" ?>
<data>
<display>
<time x="468" y="1" /> <!-- defaults: 474, -1 -->
<splash x="69" y="94" /> <!-- defaults: 69, 94 -->
<about x="4" y="26" okayx="361" okayy="191" /> <!-- defaults: 4, 26, 361, 191 -->
<instructions x="20" y="27" okayx="180" okayy="269" /> <!-- defaults: 20, 27, 180, 269 -->
<setendscore x="75" y="45" okayx="122" okayy="67" cancelx="46" cancely="71" /> <!-- defaults: 75, 45, 122, 67, 46, 71 -->
<scorewarning x="-42" y="13" okayx="248" okayy="29" /> <!-- defaults: -42, 13, 248, 29 -->
<scoreinput x="154" y="28" width="35" height="30" restrict="1234567890" maxchars="3" /> <!-- defaults: 154, 28, 35, 30, 1234567890, 3 -->
@steverichey
steverichey / FlixelProceduralLevelGenAttempt
Last active December 14, 2015 02:39
Very very basic ActionScript code to procedurally generate a Flixel level as an array of ones and zeroes. My first attempt at this sort of thing, turned out much better than expected.
var data:Array = new Array();
var xPosition:uint = 0;
var yPosition:uint = 0;
// Set x and y boundaries
var xHeight:uint = 40;
var yHeight:uint = 30;