Skip to content

Instantly share code, notes, and snippets.

@Techdojo
Techdojo / Alien.lua
Last active August 29, 2015 14:13 — forked from juaxix/Alien.lua
-- multiplatform Game made for Ludum Dare using Stonetrip ShiVa 3D Engine
-- More info: http://www.ludumdare.com/compo/ludum-dare-25/?action=preview&uid=10960
-- Support developer from XIXGAMES: http://www.xixgames.com @juaxix
--------------------------------------------------------------------------------
function alien.onInit ( )
--------------------------------------------------------------------------------
sensor.setActiveAt ( this.getObject ( ),0,false )
@Techdojo
Techdojo / Main.lua
Last active August 29, 2015 14:13 — forked from juaxix/Main.lua
--# Emitter
Emitter = class()
function Emitter:init(args)
self.particleMesh = mesh()
self.particleMesh.texture = args.tex
self.minLife = args.minLife or 1
self.maxLife = args.maxLife or 1
self.spread = args.spread or 360
@Techdojo
Techdojo / Fish.lua
Last active August 29, 2015 14:13 — forked from juaxix/Fish.lua
Boid = class()
-- constructor used by fish
function Boid:init( _location, _maxSpeed, _maxForce)
self.velocity = vec2( math.random( -maxSpeed, maxSpeed ), math.random( -maxSpeed, maxSpeed ) )
self:createBoid(_location, _maxSpeed, _maxForce)
end
-- constructor used by bubbles
--[[
@Techdojo
Techdojo / Main.lua
Last active August 29, 2015 14:13 — forked from juaxix/Main.lua
-- destructable
-- Use this function to perform your initial setup
function setup()
    parameter.boolean("addWater",false)
    defaultGravity = physics.gravity()
    parameter.boolean("useGravity",false, function(v)
       if v then 
        physics.gravity(Gravity)
       else
@Techdojo
Techdojo / Harmony.lua
Last active August 29, 2015 14:11 — forked from juaxix/Harmony.lua
--# Main
supportedOrientations(LANDSCAPE_ANY)
myimage = image(WIDTH,HEIGHT)
setContext(myimage)
function setup()
--backingMode(RETAINED)
toolbox = ToolBox()
-- Class EnemyHorde
-- Speed Shooting Earth
-- A freesource game project using Codea and Google Maps
-- More games: xixgames.com
-- by @juaxix
-- 6/6/2012
ENEMY_SPAWN_EASY = 0
ENEMY_SPAWN_HARD = 1
@Techdojo
Techdojo / Terrain.lua
Last active August 29, 2015 14:11 — forked from tnlogy/Terrain.lua
--# Main
-- Terrain
function setup()
displayMode(FULLSCREEN)
forward, right, up = vec3(0,0,1), vec3(-1,0,0), vec3(0,1,0)
t = Terrain()
A = 0
end
--# Notes
--[[
ROTATION WITH QUATERNIONS AND FLYING
This project demonstrates the use of quaternions to rotate objects and fly them
The Main tab only contains code to help you choose from a number of demo projects. You will not need it in
your own projects.
--# Main
-- 2 Face
function parseObjFormat(data)
local avs, ans, auvs = {},{},{}
local f = "%s(\-?%d*[\.]%d+)"
for x,y,z in string.gmatch(data, "v" .. f .. f .. f) do
table.insert(avs,
-- 4 play
-- Use this function to perform your initial setup
function setup()
displayMode(FULLSCREEN)
createPitchTable()
parameter.integer("X", 1,10,1,play)
song = {