Skip to content

Instantly share code, notes, and snippets.

View darkoverlordofdata's full-sized avatar

Bruce Davidson darkoverlordofdata

View GitHub Profile
@darkoverlordofdata
darkoverlordofdata / SignalTest
Created February 16, 2015 21:27
FlxSignal issue
package ;
import flixel.util.FlxSignal;
class SignalTest {
var signal0:FlxSignal;
function callbackEmpty1() {}
public function new() {
@darkoverlordofdata
darkoverlordofdata / Main.coffee
Created March 19, 2015 03:46
Box2D MouseJoint
###
* Set up the environment
###
do ->
###
* Polyfil the requestAnimationFrame method
###
unless window.requestAnimationFrame
window.requestAnimationFrame = do ->
window.webkitRequestAnimationFrame or window.mozRequestAnimationFrame or window.oRequestAnimationFrame or window.msRequestAnimationFrame or (callback) ->
@darkoverlordofdata
darkoverlordofdata / test.js
Last active August 29, 2015 14:17
Phaser performance
// Generated by CoffeeScript 1.9.1
// Stats: https://github.com/mrdoob/stats.js
// Phaser 2.2.2 - avg 49 FPS
// Phaser 2.1.3 - avg 59 FPS
/*
* Boot the game
*/
(function() {
@darkoverlordofdata
darkoverlordofdata / Demo.coffee
Last active August 29, 2015 14:19
Ash + Phaser
#
# Ash Components
#
Components = do ->
Collector: class Collector
player : null
object : null
listener : null
constructor: (@player, @object, @listener) ->
Collision: class Collision
@darkoverlordofdata
darkoverlordofdata / MY_Loader.php
Created April 16, 2015 04:17
CodeIgniter - Custom Loader using layouts
<?php
/**
* CodeIgniter - Custom Loader using layouts
*
* @author darkoverlordofdata
*/
class MY_Loader extends CI_Loader {
var $layout = '';
const EXT = '.phtml';
###*
@see http://bish.nu/2014/exposing-firebase-as-ORM-in-nodejs/
###
Firebase = require("firebase")
_ = require("underscore")
###*
Initialize the db (acting as ORM):
orm = require('./firebase-orm')
/****************************************************************************
Copyright (c) 2008-2010 Ricardo Quesada
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2011 Zynga Inc.
Copyright (c) 2013-2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@darkoverlordofdata
darkoverlordofdata / settings.json
Created November 19, 2015 05:57
VS.Code Settings for Unity
// Place your settings in this file to overwrite the default settings
{
"files.exclude": {
// start unity files
"policy.mdpolicy": true,
"Assets/Libraries": true,
"Assets/Plugins": true,
"Assets/Resources": true,
"ProjectSettings/": true,
"Temp/": true,
@darkoverlordofdata
darkoverlordofdata / JSON2.cs
Created December 3, 2015 19:35
JSON2 port to csharp
using System;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections.Generic;
/**
* Port of https://github.com/douglascrockford/JSON-js to CSharp/Unity5
*
*/
namespace Bosco.Json {
@darkoverlordofdata
darkoverlordofdata / database.ml
Created December 13, 2015 19:05 — forked from atavener/database.ml
OCaml in-memory "database" -- I use this for component-based game-objects.
(* Database provides key-generation and table-instantiation,
* so that a key can be associated to various properties.
*)
(* This is for a fully-controlled specification...
*
* module Db = Database.Make (Database.IntKey)
* module Prop = Db.MultiInherit
* module PropHash = Prop.Table(Database.Hash)
* module Size = (val PropHash.create ~default:0 () : Db.Sig with type t = int)