Skip to content

Instantly share code, notes, and snippets.

@tariqkhatib
tariqkhatib / main.lua
Created October 26, 2014 05:41
Ten to hundred lines of code to make a very small paint game for kids
currColor = "white"
local function save( )
display.save( allGroup, "group.jpg" )
end
local function loadVars(theSize)
math.randomseed( os.time( ) )
allGroup = display.newGroup()
rectangles = {}
currW = theSize
@tariqkhatib
tariqkhatib / main.lua
Created October 26, 2014 06:07
Simulate Space in less than 30 lines of Code
starCtr = 0
stars = {}
currTransSpeed = 500
displayHeight = display.contentHeight
math.randomseed( os.time() )
local function removeMe() --remove stars after reaching end of screen
for i=1,1100 do
if stars[i] ~= nil then
if stars[i].y >= displayHeight then
math.randomseed( os.time( ) )
a={}
i=0
x1=0
y1=0
function trans2(self,theX,theY)
local xx = self.x
local yy = self.y