Skip to content

Instantly share code, notes, and snippets.

@jonbro
jonbro / gist:7372471
Created November 8, 2013 15:18
nanogenmo code version 2
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Text.RegularExpressions;
public class MChain {
public class Node {
public string content;
public List<Node> followers; // just duplicate for each follower, make the random pick easier
public Node(string c){
@jonbro
jonbro / gist:7431874
Created November 12, 2013 14:40
3d tiling system
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class GenerateVoxelLevel : MonoBehaviour {
// not going to do octtrees, just totally straight forward arrays so I can get this done in 25 mins
bool[,,] worldMap;
bool[,,] filled;
int[] digPosition;
int worldSize = 40;
require 'formula'
class Libgdiplus < Formula
homepage 'http://www.mono-project.com/Libgdiplus'
url 'https://github.com/mono/libgdiplus/archive/2.10.tar.gz'
md5 'bc601912ce8154baf5aa85de51e08b77'
depends_on 'gettext'
depends_on 'libtiff'
depends_on 'libexif'
@jonbro
jonbro / gist:7803827
Created December 5, 2013 11:27
SLOW CODE :(
local edges = collectEdgePositions(self.rooms.members, self.fingerBlock)
-- for each edge
for i,v in ipairs(edges) do
self.ghostBlock:setPosition(v.p.x, v.p.y)
-- check for overlaps
self.commitParent = v.r
local fudged = false
-- search through each room
self.rooms:updateSpatialHash()
if not self.rooms:overlap(self.ghostBlock, function(a, b)
#include "bhPlacement.h"
float BHPlacement::cx;
float BHPlacement::cy;
// lua accessible functions
BHPlacement::BHPlacement(lua_State *l)
{
}
int BHPlacement::AddPiece(lua_State *l)
@jonbro
jonbro / readme.txt
Last active January 4, 2016 02:39 — forked from anonymous/readme.txt
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
using UnityEngine;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Globalization;
using ClipperLib;
using TriangleNet.Geometry;
using Polygon = System.Collections.Generic.List<ClipperLib.IntPoint>;
using Polygons = System.Collections.Generic.List<System.Collections.Generic.List<ClipperLib.IntPoint>>;
@jonbro
jonbro / gist:89a21ee4a803339fcc46
Created May 21, 2014 13:15
data model from a wwdiy clone game
BananaData = {
['location'] = Vec2(0,0);
['id'] = 'banana';
['art'] = {
{'banana.png'}
};
['actions'] = {
{
['triggers']={
@jonbro
jonbro / gist:038adc9626d4b20ae302
Created May 21, 2014 13:18
poke the eyeball wwdiy clone game
ActorData = {
['location'] = Vec2(0,0);
['id'] = 'hand';
['art'] = {
{'hand.png'}
};
['actions'] = {
{
['triggers']={
{t="time", d="exactly", td=1};
@jonbro
jonbro / gist:078c9bd121ce9c2d837b
Created July 29, 2014 18:59
what I have done
x tutorial doesn't work
x hide the standalone highscores on mobile
x entering the game while in landscape mode doesn't select the correct screen orientation
x game over screen doesn't work
x highscores might not be saving (can I connect the debug console to the device on android)
x might be related to above
x it seems like the steam stuff is what is causing it to break.
x rotating the screen clockwise into landscape mode doesn't display things correctly
x everything is super fucked on device :/
x it seems like the events on screen change aren't being dispatched