Skip to content

Instantly share code, notes, and snippets.

--# Main
-- Tiger7b
displayMode(FULLSCREEN)
function setup()
backup("WoT","ver 107b","visibility")
Settings()
end
--# Main
-- Gedmatch
displayMode(FULLSCREEN)
function setup()
ReadData()
maxSeries=25
step=20
charts={image(WIDTH,HEIGHT),image(WIDTH,HEIGHT)}
--# Main
-- StarArcade
displayMode(FULLSCREEN)
function setup()
ReadPictures()
StartMenu()
end
--# Rock
-- Basic rock game
--[[
The game
A rock is falling down the screen.
It is created 50 pixels above the top of the screen, and with a random x value.
--# Start
function setup()
author="Starting code"
displayMode(NORMAL)
end
function draw()
background(0)
displayMode(FULLSCREEN)
function setup()
speed=20 --a bigger number makes it slower and easier
size=20 --size of squares in snake
start=vec2(WIDTH/2//size,HEIGHT/2//size)*size --start in the middle
S={start,start} --table holding snake squares
joyCentre=vec2(WIDTH-140,140) --centre of joystick paddle
@dermotbalson
dermotbalson / gist:e023dbff7b83d3f4340b
Last active December 9, 2015 13:15
Cut the fruit
function setup()
ReadImages()
tp={} --this will store our swipe points so we can draw a line
fruit={} --the items we will cut
AddFruit() --add the first fruit
FPS=60 --speed checker
end
--read in all the images we will use
@dermotbalson
dermotbalson / gist:6f081bc9b4b3da8b1804
Created December 2, 2015 15:19
Tank bot #2 incomplete
--# Main
-- Tiger4
displayMode(FULLSCREEN)
function setup()
backup("WoT","ver 107","visibility")
Settings()
end
@dermotbalson
dermotbalson / gist:87c705706461da988900
Created December 2, 2015 03:59
Tank bot #1 incomplete, untested detection
--# Main
-- Tiger4
displayMode(FULLSCREEN)
function setup()
backup("WoT","ver 107","visibility")
Settings()
end
local abs,cos,sin,tan,acos,asin,atan2,deg,rad,floor,fmod,modf,max,min,pow,sqrt=math.abs,math.cos,
math.sin,math.tan,math.acos,math.asin,math.atan2,math.deg,math.rad,math.floor,math.fmod,
math.modf,math.max,math.min,math.pow,math.sqrt
local fmod,modf,pack=math.fmod,math.modf,table.pack
n=3000000
local a,b,c,d,e,f=math.random()*100,math.random()*100,math.random()*100,
math.random()*100,math.random()*100,math.random()*100
local v1=vec3(math.random()*100,math.random()*100,-math.random()*100)
local v2=vec3(math.random()*100,math.random()*100,math.random()*100)