Skip to content

Instantly share code, notes, and snippets.

View juaxix's full-sized avatar
xixgames

juaxix juaxix

xixgames
View GitHub Profile
@juaxix
juaxix / Game.lua
Last active January 1, 2016 17:39
Hombert Castle Fall
--# Main
-- hombert Castle Fall
displayMode(FULLSCREEN)
supportedOrientations(LANDSCAPE_ANY)
-- Use this function to perform your initial setup
function setup()
w = WIDTH/1024
h = HEIGHT/768
useMusic = true
@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 / infinite_links.php
Created April 26, 2017 21:55
Hacker rank - infinite links - Capture the Flag contest - April 2017
@juaxix
juaxix / kdtree_with_example.cpp
Last active March 9, 2022 19:38
C++ KD Tree with Vector3 and a condition flag
#include <iostream>
#include <memory>
#include <math.h>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;
void padTo(string &str, const size_t num, const char paddingChar = ' ')
{
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using AutomationTool;
using UnrealBuildTool;
using Microsoft.Win32;
using System.Diagnostics;
@juaxix
juaxix / Game.cs
Created August 12, 2018 23:17
OutOfSpace- LudumDare 42
using System;
using UnityEngine;
using System.Collections.Generic;
using System.Linq;
using DG.Tweening;
using UnityEngine.Events;
using Random = UnityEngine.Random;
public class Game : MonoBehaviour
{
@juaxix
juaxix / unfollow-not-follow-back.js
Created August 24, 2018 16:26
Unfollow not-following back accounts from your profile, using twitter web interface and chrome JS
//Step using a browser
//1) Login into your account. Go to your profile following, example https://twitter.com/xixgames/following
//2) Go all the way to bottom to get all the parts of the accounts you follow (the new API only allow get chunks)
// --> you can do that with a scrollTo jQuery script or just keep pressed the AvPage key of your keyboard.
//3) Open developer console and copy paste this code, and change confirm_unfollow to true if you want to execute the unfollow
//Get all follows data:
var follows = $(".FollowStatus");
//Remove data from accounts who are following back:
for(var i=0;i<follows.length;i++)
{
@juaxix
juaxix / NetworkView.cs
Created October 16, 2018 14:46
Gamesparks - a network view approximation (w.i.p.)
using GameSparks.RT;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NetworkView : MonoBehaviour
{
public int viewID = 0;
public enum ViewSynchModes