Skip to content

Instantly share code, notes, and snippets.

View simsaens's full-sized avatar

Sim Saëns simsaens

  • Two Lives Left
  • Adelaide, Australia
View GitHub Profile
@simsaens
simsaens / gist:1330041
Created November 1, 2011 06:13 — forked from bortels/gist:1329881
Fixed drawchar bug
-- Use this function to perform your initial setup
function setup()
fontinfo={}
fontinfo["#"] = { points=11, width=21, ascii=35,
data={ 11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6 } }
end
-- This function gets called once every frame
function draw()
@simsaens
simsaens / Brickout.lua
Created August 4, 2012 06:44
Brickout Enhanced
--# Ball
----------------
-- Ball Class --
----------------
Ball = class()
function Ball:init()
self.pos = vec2(WIDTH / 2, 41)
@simsaens
simsaens / AppDelegate.mm
Created April 7, 2013 17:22
Example Codea Addon
//
// AppDelegate.mm
// <#MyProjectName#>
//
// Created by <#AuthorName#> on <#CurrentDate#>
// Copyright (c) <#AuthorName#>. All rights reserved.
//
#import "AppDelegate.h"
#import "CodeaViewController.h"
@simsaens
simsaens / Main.lua
Created June 1, 2013 14:19
Juice Library - Codea Project Gist Created with AutoGist
-- Juice
-- Use this function to perform your initial setup
function setup()
r = juice.rect(WIDTH/2,HEIGHT/2,70)
parameter.integer( "ObjType", 1, 4, 1, objChanged )
parameter.action( "Spin", function() r:spin(2) end )
@simsaens
simsaens / Main.lua
Created June 1, 2013 14:20
Juice AutoInstall
--Juice Single Install
--Installer created by @acp edited by @Briarfox
--- This will pull the Juice project into Codea for you
-- Instructions:
-- * Create a new project in Codea named Juice If you chose another name please change the variable Below
--This is case sensitive
ProjectName = "Juice"
-- * Paste this into the Main (not from the raw view, as iSafari will escape special characters)
-- * Run, run again,
@simsaens
simsaens / FPS.lua
Created June 2, 2013 00:47
Codea Project Gist Created with AutoGist
--FPS = class(juice.text)
FPS = class()
function FPS:init()
--juice.text.init(self, "FPS", 0,0)
self.pos = vec2(0,0)
self.fps = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
self.idx = 0
end
@simsaens
simsaens / BoxScene.lua
Created June 3, 2013 17:35
Simple Scene Switching - Put the tabs in the following order: Main, Scene, BoxScene, CircleScene, Button
BoxScene = class(Scene)
function BoxScene:init()
-- We have to initialize our
-- super class
Scene.init(self)
end
function BoxScene:draw()
background(78, 99, 51, 255)
@simsaens
simsaens / Lightsaber.lua
Created December 19, 2015 14:00
Codea Lightsaber Effect
--# Main
-- Lightsaber
function setup()
touches = {}
lightsaber = Saber(300, 15)
lightsaber:setTransform(matrix():translate(WIDTH/2, HEIGHT/2, 0), false)
@simsaens
simsaens / main.lua
Created January 4, 2018 03:44
Hello <Your Name Here> Codea Example
-- Use this function to perform your initial setup
function setup()
parameter.text("name", "Tiff")
end
-- This function gets called once every frame
function draw()
-- This sets a dark background color
background(40, 40, 50)
//
// KeyboardLayout.swift
// Codea
//
// Created by Simeon on 24/7/17.
// Copyright © 2017 Two Lives Left. All rights reserved.
//
import UIKit