Skip to content

Instantly share code, notes, and snippets.

@Westenburg
Westenburg / Lemclone
Last active Sep 20, 2015
Very basic lemmings clone in codea
View Lemclone
--simple lemmings clone with all the basic skills. All images used are shipped with Codea. Not an exact clone, rough and ready in places. No scrolling and no finite state machine control but basics demonstrateed.
--by West
--alternative selection
--use tap or drag to select active men then click on buttons to apply to them. use arrows to indicate selectiom
displayMode(FULLSCREEN)
function setup()
FALL=1
WALK=2
DOWNDIG=3
@Westenburg
Westenburg / Polychopper
Created Jun 26, 2015
A demo of interacting with a polygon - swipe to cut in two
View Polychopper
--# Main
-- Meshchopper
--various goals
--chop without letting fragments on screen go above a certain amount
--get x fragments on screen at once
--use limited number of slashes
@Westenburg
Westenburg / Slashpop
Last active Aug 29, 2015
Slash, pop, spin & Squash
View Slashpop
--Slash, Pop, Spin & Squash
-- by West
-- basic game framework in place. Flick on the screen to slash - create a vertical line slash through the V Slash rectangles, and a horizontal line through the H Slash ones
--Tap inside the rectangle to destroy the Pop ones. Draw a circle (making sure start and end meets) to destroy the spin rectangles. Pinch screen inside rectangle to destry the Pinch ones.
function setup()
displayMode(FULLSCREEN)
READY=1
PLAYING=2
LEVELCOMPLETE=3
GAMEOVER=4
@Westenburg
Westenburg / Main
Created Mar 30, 2015
Simple invaders
View Main
-- Touch based space invaders
-- by West
-- Use this function to perform your initial setup
supportedOrientations(PORTRAIT_ANY)
function setup()
displayMode(FULLSCREEN)
READY=1
GAMEOVER=2
PLAY=3
@Westenburg
Westenburg / People Popcorn
Last active Aug 29, 2015
People Popcorn - Codea Game Jam 2015
View People Popcorn
-- People Popcorn
-- by West
--two space chameleons, Clive and Agnes descend on the unsuspecting planet. Who will gobble up the most people?
supportedOrientations(LANDSCAPE_ANY)
-- Use this function to perform your initial setup
function setup()
displayMode(FULLSCREEN_NO_BUTTONS)
-- displayMode(FULLSCREEN)
WALK=1
@Westenburg
Westenburg / Runner
Created Mar 14, 2015
Simple endless runner
View Runner
-- Mountains
-- Simple endless runner game by West
-- taking inspiration from "Alto's adventure" for the Mountain backdrop and day to night cycle
-- Use this function to perform your initial setup
function setup()
--get rid of the sidebar
displayMode(FULLSCREEN)
-- define 3 the three game states for the finite state machine game engine and initialise gamestate variable
READY=1
GAMEOVER=2
@Westenburg
Westenburg / Main
Created Aug 12, 2014
Missile Command Type game
View Main
-- Missile command type game
-- by West
displayMode(FULLSCREEN)
function setup()
touches={}
tsup={} --tsup contains the supplementary info about the start position of the touch
resetGame()
--starfield setup --credit to Simeon @TLL: http://codea.io/talk/discussion/644/flicker-drawing-large-images-any-advice/p1
local gradSize = 2
@Westenburg
Westenburg / WellFaller
Last active Jan 1, 2016
Codea cook off entry in progress. First release.
View WellFaller
-- Well Racer
-- Codea Cook Off 2013
-- by West
-- v1.0 First release
supportedOrientations(PORTRAIT_ANY)
function draw()
func()
end
@Westenburg
Westenburg / Asteroids tutorial
Last active Apr 17, 2016
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…
View Asteroids tutorial
--# 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 Sep 8, 2013
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
View Snake
--# 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