Skip to content

Instantly share code, notes, and snippets.

View juaxix's full-sized avatar
xixgames

juaxix juaxix

xixgames
View GitHub Profile
@juaxix
juaxix / Car.lua
Created July 21, 2012 13:54
2D physic puzzle / sandbox game made in Codea
Car = class()
-- 2D Physics game made in Codea by @juaxix
-- More games: xixgames.com
-- 21/07/2012
-- inspired by Codea Physics tutorial and Crayon Physics :)
function Car:init(x,y) 
    local car = physics.body(POLYGON, vec2(-50,10), vec2(-50,-10), vec2(50,-10), vec2(50,10), vec2(30,10),vec2(25,25),vec2(-25,25),vec2(-30,10))
    car.position = vec2(x, y)
    debugDraw:addBody(car)
    car.density = 2.0
@juaxix
juaxix / Main.lua
Created July 16, 2012 15:57
Wavespark from Processing to Lua (Codea - iPad)
-- 
-- xixgames.com
-- LGPL
-- basis
width  = WIDTH
height = HEIGHT
-- images
buffer   = image(width,height)
snapshot = image(width,height)
-- arrays
@juaxix
juaxix / BezierCurve.lua
Created July 14, 2012 13:01
Fat Duck :: bezier paths - Lua [Codea]
BezierCurve = class()
function BezierCurve:init()
    self:generate_new_bezier()
end
function BezierCurve:draw()
    for i=1,(#self.curve)-1 do
        line(self.curve[i].x,self.curve[i].y,self.curve[i+1].x,self.curve[i+1].y)
@juaxix
juaxix / aGameCenter_Codea.h
Created June 16, 2012 19:12
Objective C - connection with Game Center and highscores board
//
// aGameCenter_Codea.h
//
// Created by Juan Belón on 28/05/12
// Games -> http://www.xixgames.com
// LGPL - @juaxix - Codea connection!
//
#import <Foundation/Foundation.h>
#import <GameKit/GameKit.h>
@juaxix
juaxix / EnemyHorde.lua
Created June 9, 2012 09:38
Speed Shooter Earth - Lua Game
-- 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
@juaxix
juaxix / tornado_window.mel
Created April 14, 2012 09:52
Maya window: Tornado
/**
Video: http://www.youtube.com/watch?v=gk8VQnXiyog
*/
global proc moveEach()
{
int $inc[]=
{
18,
44,
74
@juaxix
juaxix / Boss.lua
Created February 17, 2012 19:57
Space Puzzle 8
Boss = class()
-- Bosses
BOSS_MAIN = 1
BOSS_ALT  = 2
-- Boss states
BOSS_DEAD    = 1
BOSS_ALIVE   = 2
BOSS_DAMAGED = 3
function Boss:init(_position,_type,limit_position,_velocity)
    self.position  = _position
@juaxix
juaxix / Bubble.lua
Created February 2, 2012 20:09
Magic Puzzle Bubble in Lua by juaxix ( xixgames )
Bubble = class()
-- Magic Puzzle Bubble by @juaxix - LGPL
-- 11/11/11
-- http://xixgames.com
-- video: http://www.youtube.com/watch?v=rD0fQVSj_7w
-- Bubble states
BUBBLE_EMPTY    = 0
BUBBLE_CREATED  = 1
BUBBLE_FLYING   = 2
BUBBLE_ATTACHED = 3
@juaxix
juaxix / Fire.lua
Last active September 28, 2015 01:28
Towers versus Zombies by @juaxix -- LGPL - 11/2011 - Codea
Fire = class()
-- Towers versus Zombies by @juaxix
-- LGPL - 11/2011 
-- http://www.xixgames.com
-- it is a pleasure to gift this to the world 
-- thanks from heart to all the 2lifesleft team
function Fire:init(attackpower,position,model)
    self.attackpower = attackpower
    self.position    = position
    self.parent      = model
@juaxix
juaxix / Alien.lua
Last active September 28, 2015 00:18
Asteroides for Codea - Free Game - XixGames
Alien = class()
-- Free game by juaxix
-- http://www.xixgames.com
-- Copyright LGPL - 11/2011
function Alien:init(avoidy)
self.position = vec2(0,math.max(math.abs(math.random(HEIGHT)-avoidy)),66)
self.angle = math.pi
self.points= 500
end