Skip to content

Instantly share code, notes, and snippets.

View juaxix's full-sized avatar
xixgames

juaxix juaxix

xixgames
View GitHub Profile
@juaxix
juaxix / shivaFileCount.php
Last active August 29, 2015 14:06
Shiva - generate line counts for all AI models
<?php
/*
Example: > c:\php5\php.exe shivaFileCount.php "c:\Stonetrip\ShiVa Editor Basic\Data\Games\7DFPS_13"
*/
/**
* Scan Resources/AIModels for aim files
* @param string $dir
* @return array
*/
function findAllAI ( $dir ){
@juaxix
juaxix / buildaimodels.php
Last active August 29, 2015 14:06
Shiva :: Create S3DAIModels.cpp file list for Android exports
<?php
/*
* Example: php5\php.exe buildaimodels.php "C:\\Games\\YourGame\\build\\Android\\eclipse\\jni\\AIModels"
*/
echo "Generating list...\n";
$dir = $argv[1] or "C:\\Games\\YourGame\\build\\Android\\eclipse\\jni\\AIModels";
$dh = opendir($dir);
$txt = "//File generated by juax\n\n\n";
$n = 0;
while (false !== ($filename = readdir($dh))) {
--# Main
-- Sandbox
supportedOrientations(LANDSCAPE_ANY)
displayMode(FULLSCREEN_NO_BUTTONS)
--displayMode(OVERLAY)
--displayMode(FULLSCREEN)
function setup()
screen=vec2(WIDTH,HEIGHT)
@juaxix
juaxix / Bar.lua
Created November 9, 2011 23:35
Mágica Gems by juaxix for Codea - freesource - iPad
-- Bar class
-- LGPL Juan Belón Pérez
-- videojuegos.ser3d.es
--  2011
Bar = class()
function Bar:init()
    self.bgems = {}
    self.time  = 0
    for i=1,maxGemsRow do
@juaxix
juaxix / Animal.lua
Last active September 28, 2015 00:08
Sprint Animal for Codea
Animal = class()
-- by juaxix / 11/2011 / XIX games
-- http://www.xixgames.com
function Animal:init()
    -- you can accept and set parameters here
    self.position = vec2(0,0)
    self.velocity = vec2(0,0)
    self.model = "Planet Cute:Enemy Bug"
    self.score = 0
end
@juaxix
juaxix / Main.lua
Last active September 28, 2015 00:18
Abduction Game in Lua - Codify / Codea - iPad
-- Main code
-- Copyright LGPL Juan Belón Pérez
-- 11/2011
-- http://www.xixgames.com
-- Use this function to perform your initial setup
function setup()
ships = {}
persons = {}
time = 0
seedSpd = 0.6 -- people generation speed
@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
@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 / 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 / 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