Skip to content

Instantly share code, notes, and snippets.

<html>
<head>
<title>License</title>
<style type="text/css">
body {
text-align:center;
padding-top:25%;
background:#ddd;
font-family:"sans-serif";
}
function Physics(args) {
var pixelsPerMeter=args.ptm;
function px(x){
return x*pixelsPerMeter;
}
function meters(x){
return x/pixelsPerMeter;
}
function Body(args) {
var self = Class({
--# Main
function setup()
displayMode(FULLSCREEN)
backingMode(RETAINED)
spawns={}
for i=0, 200 do
table.insert(spawns,Spawn(math.random(WIDTH),math.random(HEIGHT)))
end
lineCapMode(PROJECT)
@Synvox
Synvox / Snow.lua
Created October 5, 2012 18:17
Snow
--# Main
-- Snow
function setup()
displayMode(FULLSCREEN)
instances={}
currentIndex=0
table.insert(instances,SnowMaker(0,1))
end
@Synvox
Synvox / Boss.lua
Created October 5, 2012 18:18
Boss
--# Main
World = class()
function World:init()
self.instances={}
self.width=1024
self.height=768
self.index=0
end
@Synvox
Synvox / NeonDefender.lua
Created October 5, 2012 18:19
Neon Defender
--# Main
function setup()
displayMode(FULLSCREEN)
instances={}
currentIndex=0
cannon=Cannon()
table.insert(instances,cannon)
touchDown=false
shooting=false
@Synvox
Synvox / Evade.lua
Created October 5, 2012 18:19
Evade
--# Main
function setup()
displayMode(FULLSCREEN)
instances={}
for i=0,20 do
spawn(Star())
end
ship=Ship(WIDTH/2,HEIGHT/2)
spawn(ship)
@Synvox
Synvox / crider.js
Created October 17, 2012 22:17
Canvas Rider Track
(function(){
scriptElement = document.body.appendChild(document.createElement('script'));
scriptElement.type='text/javascript';
scriptElement.src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js';
scriptElement.onload = function(){
(function($){

These instructions work for the Raspberry Pi running Raspbian (hard float) and create a hardware optimized version of NodeJS for the Raspberry PI, (and include a working install and NPM!!!):

  1. Install Raspbian - http://www.raspberrypi.org/downloads

  2. Install the necessary dependecies:

sudo apt-get install git-core build-essential

(If you just installed git then you need to administer your git identity first, else adding the patches below will fail!!!)

@Synvox
Synvox / .lua
Created October 19, 2012 20:34
Lunar Lander
--# Main
-- Lunar Lander
function setup()
displayMode(FULLSCREEN)
instances = {}
ship = Ship(WIDTH/2,HEIGHT/2)
table.insert(instances,ship)
leftbutton = Button(100,200,"left")
table.insert(instances,leftbutton)