Skip to content

Instantly share code, notes, and snippets.

View AndreiRudenko's full-sized avatar

Andrei Rudenko AndreiRudenko

View GitHub Profile
package;
import luxe.Text;
import luxe.Color;
import luxe.Vector;
import luxe.Entity;
import phoenix.Batcher;
class Fps extends Entity {
@AndreiRudenko
AndreiRudenko / SpatialHash.hx
Last active May 13, 2019 19:01
SpatialHash uniform-grid implementation
// SpatialHash uniform-grid implementation
// Broad-phase algorithm for collision detection
// Andrei Rudenko // SpatialHash.hx (24.07.2016)
import luxe.Vector;
import luxe.utils.Maths;
class SpatialHash {
public var min(default, null):Vector;
@AndreiRudenko
AndreiRudenko / FPS.hx
Last active August 29, 2015 14:26 — forked from ruby0x1/FPS.hx
Simple FPS Text instance, modified from @RudenkoArt as an example for http://luxeengine.com
package;
import luxe.Text;
import luxe.Color;
import luxe.Vector;
import luxe.Log.*;
import luxe.options.TextOptions;
class FPS extends Text {
@AndreiRudenko
AndreiRudenko / ParcelSplash.hx
Last active August 29, 2015 14:27
A custom ParcelProgress for Luxe that shows a splashscreen
package;
import luxe.Sprite;
import luxe.Color;
import luxe.Parcel;
import luxe.ParcelProgress;
import luxe.options.ParcelProgressOptions;
@AndreiRudenko
AndreiRudenko / Gradient.hx
Last active August 29, 2015 14:27 — forked from AbelToy/Gradient.hx
Luxe Gradient Component
package;
import luxe.Color;
import luxe.Component;
import luxe.Sprite;
/**
* This will set the color of any Sprite to a gradient.
*
* @author Abel Toy
@AndreiRudenko
AndreiRudenko / lua.sublime-build
Created September 24, 2015 13:54 — forked from rorydriscoll/lua.sublime-build
Sublime Text build system for Lua
{
"cmd": ["lua", "$file"],
"file_regex": "^lua: (...*?):([0-9]*):?([0-9]*)",
"selector": "source.lua"
}
VIDEO LINK: http://www.youtube.com/watch?v=X5D_h2X8LCk
cl /MD /O2 /c /DLUA_BUILD_AS_DLL *.c
This line compiles all files in the directory with the ".c" extension without linking them (/c) with the fastest possible (/O2) multithreaded (/MD) code
NOTICE! IN THE NEXT FEW STEPS X.X MEANS YOUR CURRENT LUA VERSION NUMBER, E.G. 5.2
@AndreiRudenko
AndreiRudenko / 2r.cfg
Created May 5, 2016 15:29
my QuakeLive config
unbindall
// Scripts
bind ] "vstr chat"
set chat vstr chatOFF
set chatOFF "cg_teamchatsonly 1; set chat vstr chatON; print ^7chat ^1OFF"
set chatON "cg_teamchatsonly 0; set chat vstr chatOFF; print ^7chat ^2ON"
bind [ "vstr voice"
@AndreiRudenko
AndreiRudenko / AssetPaths.hx
Created May 20, 2016 08:57 — forked from kevinresol/AssetPaths.hx
Macro to read asset paths
package util;
/**
* ...
* @author Kevin
*/
@:build(util.AssetPathsMacro.build())
class AssetPaths
{
@AndreiRudenko
AndreiRudenko / SpriteAnimation.hx
Last active July 24, 2016 20:19
SpriteRenderer, VisualRenderer, and SpriteAnimation Components for Luxeengine
import luxe.Component;
import luxe.Rectangle;
import luxe.Vector;
// import luxe.Sprite;
import phoenix.Texture;
import luxe.Log.*;