Skip to content

Instantly share code, notes, and snippets.

@devilstower
devilstower / CiderControls7
Created January 26, 2014 03:12
Cider Controls 7.1
--# Main
-- Cider Controls 7.1
-- =====================
-- Designed for use with the Cider interface designer
-- Use this file to test and demostrate controls in the library
-- =====================
function setup()
displayMode(FULLSCREEN)
@dermotbalson
dermotbalson / gist:7590746
Last active December 29, 2015 01:09
Codea users world map
--# Main
--The name of the project must match your Codea project name if dependencies are used.
--Project: Place Project Name Here
--Version: Alpha 1.0
--Comments:
--by ignatz
--November 2013
--This map shows light/dark in real time
--It knows your time, but it needs your longitude, so BEFORE RUNNING THE CODE
@barisdokudur
barisdokudur / Platform Game Codea
Last active September 20, 2016 11:29
Platform Game
--# Barier
Barier = class()
function Barier:init(x)
bariers={}
barierno=1
for i=1, 5 do
Barier:CreateBarier()
end
end
@Westenburg
Westenburg / Asteroids tutorial
Last active March 18, 2023 17:46
A step by step tutorial for Asteroids written in Codea aimed at beginners. I would recommend looking at the Noob Lander and Snake tutorial before this one if you haven't done any coding before. In fact, this tutorial builds on the first few steps of the Snake tutorial. Also there is more involved in each step and the comments are less line by li…
--# Main
--Main
--This code manages which Code tab is run
--it remembers your last choice, and if you select a different one, it runs that instead
local tabs = {}
local fnames = {"setup","draw","touched","collide","orientationChanged","close","restart","keyboard","cleanup"}
local fns = {}
@Westenburg
Westenburg / Snake
Created September 8, 2013 18:58
A step by step tutorial for a Snake game in Codea. Aimed at absolute beginners (though would recommend starting with the Noob Lander tutorial first). Each step is commented and in its own separate tab- move the tab you wish to run to the far right
--# Main
-- Snake tutorial
-- by West
--Graphics used are those supplied with Codea, particularly those of Kenney.nl and twolivesleft.com
-- This is a very simple example snake game. It is intended for use as an introduction into creating your second game in codea and is aimed at absolute beginners. Try the lander tutorial before this one
--ONLY THE FURTHEST RIGHT HAND TAB WILL BE EXECUTED. DRAG THE TAB FOR THE STEP YOU WISH TO RUN TO THE FAR RIGHT THEN PRESS RUN
anonymous
anonymous / Album.lua
Created June 13, 2013 05:43
Album = class()
function Album:init()
self.title = ""
self.comment = ""
self.firstPhoto = "Documents:Frame"
self.photos = {}
self.x = 0
self.y = 0
@dermotbalson
dermotbalson / gist:5632997
Last active December 17, 2015 15:39
terrain!
--# Main
function setup()
LoadImages()
end
function setup2()
parameter.integer("Viewpoint",-2000,2000,20)
speed,angle=0,0
ds,da=0,0
@dermotbalson
dermotbalson / gist:5632838
Last active December 17, 2015 15:39
imageloader
function setup()
LoadImages() --do this first, on its own
end
--put your setup code in here
function setup2()
print("Doing the rest of the setup....")
end
--this loads the images
--# Notes
--# ReadMe
--[[
First, don't be put off by all this text. This utility is extremely simple to use.
It creates code that reproduces images so you don't need to include them separately with your projects. It uses RLE, a well known compression technique. Essentially, it runs through all the pixels, and every time the color changes, it stores the last color and the number of pixels it applied to.
FUNCTIONALITY
@dermotbalson
dermotbalson / gist:5606877
Last active December 17, 2015 11:59
3D text
function setup()
parameter.integer("Viewpoint",-2000,2000,20)
local i=CreateImage()
local f=readImage("SpaceCute:Background") --NEW
speed,angle=0,0
ds,da=0,0
posX,posY,posZ=-20,0,10 --starting position
rad=math.pi/180
meshTable={}
AddFourWalls(0,0,400,150,200,40,i)