Skip to content

Instantly share code, notes, and snippets.

View interactivenyc's full-sized avatar
💭
Looking for work

Steve Warren interactivenyc

💭
Looking for work
View GitHub Profile
for x in range (1,101):
if (x % 5 == 0) & (x % 3 == 0):
print(str(x) + " = crackle pop")
elif x % 3 == 0:
print(str(x) + " = crackle")
elif x % 5 == 0:
print(str(x) + " = pop")
else:
continue
displayMode(FULLSCREEN)
supportedOrientations(PORTRAIT)
function setup()
rectMode(CENTER)
w1,h1=230,300 -- starting positions for the coins
w2,h2=630,400
w3,h3=530,800
w4,h4=130,700
tab={}
function setup()
LoadImages() --do this first, on its own
sprite();
end
function LoadImages()
imageStatus='Ready' --tells draw it's ok to draw the scene (will be turned off if we have to download images)
output.clear()
function setup()
LoadImages() --do this first, on its own
sprite();
end
function setup2()
print("setup2");
end
function LoadImages()
function setup()
LoadImages() --do this first, on its own
end
function LoadImages()
imageStatus='Ready' --tells draw it's ok to draw the scene (will be turned off if we have to download images)
output.clear()
--pass through Codea name of image and internet url
--not in Codea, will be downloaded and saved
img1=LoadImage('Dropbox:3D-tree',
@interactivenyc
interactivenyc / PhysicsNoob.lua
Last active April 17, 2016 20:54
Physics Noob
function setup()
supportedOrientations(LANDSCAPE_ANY)
-- displayMode(FULLSCREEN_NO_BUTTONS)
top = physics.body(EDGE, vec2(0, HEIGHT), vec2(WIDTH, HEIGHT))
top.type = STATIC
top.restitution = 0
bottom = physics.body(EDGE, vec2(0, 0), vec2(WIDTH, 0))
bottom.type = STATIC
@interactivenyc
interactivenyc / Melee.lua
Created April 17, 2016 01:33
Top Down Melee
displayMode(FULLSCREEN)
function setup()
sx,sy=WIDTH/2,HEIGHT/2
j,m={},{}
end
function draw()
background(40, 40, 50)
for a,b in pairs(j) do
--# Notes
--This project shows to use some basic physics, from bouncing balls and spinning
--rectangles, to the basics of a very simple platform game
--HOW TO USE THIS PROJECT
--There are a number of tabs at the top. Press on a tab to see its code.
--Work through the tabs from left to right, to see the project develop
@interactivenyc
interactivenyc / Asteroids tutorial
Created April 16, 2016 00:17 — forked from Westenburg/Asteroids tutorial
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 = {}
@interactivenyc
interactivenyc / Noob lander
Created April 15, 2016 11:00 — forked from Westenburg/Noob lander
A step by step tutorial on creating a simple lunar lander game in Codea. Contains 13 tabs. Each tab contains one step in the tutorial and successive tabs build on each other. Drag the tab you wish to run to the far right then press the run button
--# Main
-- Noob Lander
-- by West
-- This is a very simple example lunar lander game. It is intended for use as an introduction into creating your first game in codea and is aimed at absolute beginners.
--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
--The game was built using the following steps. Each step is provided in its own tab and builds upon the previous one. For each tab only comments related to that particular step are provided but a fully commented version is provided below.
--1. Place the ship sprite on the screen at a pre-defined position (use one of the pre-loaded sprite packs)