Skip to content

Instantly share code, notes, and snippets.

View MatthewMaker's full-sized avatar

Matt "Trip" Maker MatthewMaker

View GitHub Profile
@axemclion
axemclion / screenscraper.user.js
Created July 26, 2009 16:56
Screen Scraper Template
// ==UserScript==
// @name ScreenScraperTemplate
// @namespace http://dy-verse.blogspot.com
// @include http://page.you.wanna.scrape/path?pageName?pageNumber=*
// ==/UserScript==
/**
* This function is responsible for submitting the data
* @param {Object} parsedData
* @param {Object} record
@kch
kch / ftff-events.rb
Created August 3, 2010 13:34
mac: watch home dir via fsevents and set encoding attr and reveal extension for txt and rb files
#!/usr/bin/ruby
# encoding: UTF-8
require 'rubygems'
require 'fsevent'
require 'shellwords'
class Time
def age_in_seconds(now = Time.now)
now - self
@zoon
zoon / gist:700314
Created November 15, 2010 12:53
Unity3D Input: OnGUI vs.Update.
using System.Threading;
using UnityEngine;
// [ExecuteInEditMode]
public class InputTest : MonoBehaviour
{
private float _delay;
private float _fps;
private float _fpsTime;
@bebraw
bebraw / gameengines.md
Created January 6, 2011 18:07
List of JS game engines. You can find a wikified version at https://github.com/bebraw/jswiki/wiki/Game-Engines. Feel free to modify that. I sync it here every once in a while.

IMPORTANT! Remember to check out the wiki page at https://github.com/bebraw/jswiki/wiki/Game-Engines for the most up to date version. There's also a "notes" column in the table but it simply does not fit there... Check out the raw version to see it.

This table contains primarily HTML5 based game engines and frameworks. You might also want to check out the [[Feature Matrix|Game-Engine-Feature-Matrix]], [[Game Resources]] and [[Scene Graphs]].

Name Size (KB) License Type Unit Tests Docs Repository Notes
Akihabara 453 GPL2, MIT Classic Repro no API github Intended for making classic arcade-style games in JS+HTML5
AllBinary Platform Platform Dependent AllBinary 2D/2.5D/3D n
@tracend
tracend / SmoothFollow.js
Created March 30, 2011 00:07
Unity3D: This camera smoothes out rotation around the y-axis and height - Source: http://wiki.dreamsteep.com/Unity_tools
/*
This camera smoothes out rotation around the y-axis and height.
Horizontal Distance to the target is always fixed.
There are many different ways to smooth the rotation but doing it this way gives you a lot of control over how the camera behaves.
For every of those smoothed values we calculate the wanted value and the current value.
Then we smooth it using the Lerp function.
Then we apply the smoothed values to the transform's position.
*/
@tracend
tracend / SmoothLookAt.js
Created March 30, 2011 00:09
Unity3D: Camera script to smoothly look at any direction - Source: http://wiki.dreamsteep.com/Unity_tools
var target : Transform;
var damping = 6.0;
var smooth = true;
@script AddComponentMenu("Camera-Control/Smooth Look At")
function LateUpdate () {
if (target) {
if (smooth)
{
@tracend
tracend / Bounce.js
Created March 30, 2011 00:10
Unity3D: Simple Bouncing movement - Source: http://wiki.dreamsteep.com/Unity_tools
function OnCollisionEnter (collisionInfo : Collision) {
// print (collisionInfo.gameObject.tag) ; //??? HTH DO I TAG?
// print (collisionInfo.gameObject.transform.position) ;
// if (collisionInfo.gameObject.tag=="sphere"){
@tracend
tracend / AvoidObject.js
Created March 30, 2011 00:20
Unity3D: Raycast object avoidance - Source: http://wiki.dreamsteep.com/Unity_ai
var target : Transform;
function Update(){
//the direction vector to target
var dir = (target.position - transform.position).normalized;
var hit :RaycastHit;
if (Physics.Raycast(transform.position,transform.forward,hit ,20)){
//no self collision
if(hit.transform !=transform)
// Category: This is a free-form string used to categorise your events.
// Action: Another free-form string which represents the type of event, ex. “killed” and “game_start”.
// Label: This is an optional string parameter to the action.
// Value: This is an optional fractional number parameter to the action.
Application.ExternalCall("pageTracker._trackEvent", new object[] { category, action, label, value} );
@boctor
boctor / BaseViewController.m
Created May 5, 2011 02:08
A base view controller class that when running on the simulator in debug mode, will auto simulate a memory warning every time the view controller's viewDidAppear is called
//
// BaseViewController.m
//
// Created by Peter Boctor on 5/4/11.
//
// Copyright (c) 2011 Peter Boctor
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights