Skip to content

Instantly share code, notes, and snippets.

Steve steverichey

Block or report user

Report or block steverichey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@steverichey
steverichey / Splat.hx
Last active Aug 29, 2015
Dissolving pixels per frame.
View Splat.hx
package;
import flash.display.BitmapData;
import flash.geom.Point;
import flixel.FlxG;
import flixel.FlxSprite;
import flixel.util.FlxColor;
import flixel.util.FlxColorUtil;
import flixel.util.FlxRandom;
import openfl.Assets;
@steverichey
steverichey / RenderTilemapToSprite
Last active Aug 29, 2015
Drawing a FlxTilemap to a FlxSprite
View RenderTilemapToSprite
import flixel.FlxCamera;
import flixel.FlxSprite;
import flixel.tile.FlxTilemap;
class Util
{
static public function renderTileMapToSprite(Tiles:FlxTilemap, Sprite:FlxSprite):Void
{
var tempCam:FlxCamera = new FlxCamera(0, 0, Std.int(Tiles.width), Std.int(Tiles.height));
Sprite.makeGraphic(Std.int(Tiles.width), Std.int(Tiles.height), 0);
@steverichey
steverichey / Don't Move Preloader
Created Jun 12, 2014
The preloader for Don't Move, uses HaxeFlixel 4.0.0-dev
View Don't Move Preloader
package states;
import flash.Lib;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flixel.system.FlxBasePreloader;
class Preloader extends FlxBasePreloader
{
private var _progressBar:Bitmap;
@steverichey
steverichey / Localization Strings
Created Aug 7, 2014
Localization strings for Don't Move
View Localization Strings
Here's a list of the strings in the game (SPOILERS kinda):
A game by
Powered by
Press left or right to start
Release left and right
to start
to erase
Touch left or right side to start
Release both sides
View Localization Strings
Here's a list of the strings in the game (SPOILERS kinda):
A game by: Et spil af
Powered by: Kører på
Press left or right to start: Tryk venstre eller højre for at starte
Release left and right: Slip venstre og højre
to start: for at starte
to erase: for at slette
Touch left or right side to start: Tryk venstre eller højre side for at starte
Release both sides: Slip begge sider
@steverichey
steverichey / AndroidManifest-Common
Created Jan 28, 2015
Just some AndroidManifest values. I forget these a lot I guess.
View AndroidManifest-Common
<!-- Camera -->
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<!-- GPS -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
@steverichey
steverichey / execfix
Created Apr 29, 2015
Fix for OSX Yosemite "can't be opened" bug
View execfix
#!/bin/sh
# Fixes "*.app can't be opened" errors
# Run `chmod +x` on this file and then
# move it to /usr/bin/ to make it GLOBAL
if [ $# -eq 0 ]
then
echo "No arguments supplied! Expected a path to a .app file"
elif [ -z "$1" ]
@steverichey
steverichey / icns.sh
Created Aug 25, 2015
A shell script to convert a single image of arbitrary size to an ICNS file in OS X.
View icns.sh
#!/bin/sh
# exit on error
set -e
if [ "$#" -ne 1 ]; then
echo "Usage: icns myicon.png"
exit 0
fi
@steverichey
steverichey / install.sh
Last active Oct 27, 2015
Shell script to install HaxeFlixel and dependencies on a Wercker instance
View install.sh
#!/bin/bash
# Install script for application setup on Wercker boxes
# Exit script on error
set -e
echo "Updating apt-get"
# Without updating, apt-get won't find curl
apt-get update
@steverichey
steverichey / FlixelProceduralLevelGenAttempt
Last active Dec 14, 2015
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.
View FlixelProceduralLevelGenAttempt
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;
You can’t perform that action at this time.