This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- 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 ) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| --[[ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --# Main | |
| supportedOrientations(LANDSCAPE_ANY) | |
| myimage = image(WIDTH,HEIGHT) | |
| setContext(myimage) | |
| function setup() | |
| --backingMode(RETAINED) | |
| toolbox = ToolBox() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --# 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --# 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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- 4 play | |
| -- Use this function to perform your initial setup | |
| function setup() | |
| displayMode(FULLSCREEN) | |
| createPitchTable() | |
| parameter.integer("X", 1,10,1,play) | |
| song = { |