Skip to content

Instantly share code, notes, and snippets.

View XANOZOID's full-sized avatar
♾️
You can not win.

Xanozoid XANOZOID

♾️
You can not win.
  • The machine
View GitHub Profile
#include <IOShieldOled.h>
const int ledPin = 13;
const int sensorPin = A0;
int BUTTON[] = { 4, 78 };
int SWITCH[] = { 2, 7, 8, 79 };
int accel = 0;
int velocity = 0;
int postLine = 0;
boolean cruiseOn = false;
@XANOZOID
XANOZOID / KinematicPlatformer2d.gd
Last active February 7, 2022 02:59
Godot easy and composable slopes platformer code (DEMO: https://media.giphy.com/media/iPQssOxSZ61Zm/giphy.gif )
# Please credit "Ghouly The Ghost" out of your kind heart! Check my gist page for a license.
# Includes: No slip inclines, variable angle climbing, shape agnostic implementation, slope climb up/down, smooth old school vertical collisions
# WARNING! IMPORTANT!: Relies on " Scene >> Projects Settings >> Physics 2D >> motion_fixed_enabled[x] __ on[x]"
extends KinematicBody2D
const floorCheckVector = Vector2( 0, 1 )
const normalCheckVector = Vector2( 0, -1 )
var angleThreshold = 1.39 setget set_angle_threshold
var slopeScale = tan( angleThreshold )
@XANOZOID
XANOZOID / ShiftedComponent.hx
Created July 19, 2017 02:40
An adaption to normal component paths in Luxe
class ShiftedComponent extends luxe.tween.ComponentPath implements luxe.tween.IComponentPath {
//var _shiftedComp : luxe.tween.ComponentPath;
//public var start(get_start,set_start):Float;
//public var end (get_end, null):Float;
var _shifted: Float;
public function new( path: luxe.tween.ComponentPath, shifted: Float ){
//_shiftedComp = path;
super();
@XANOZOID
XANOZOID / IsometricGrid-misc.hx
Last active July 16, 2017 01:36
Haxe utility class which provides you with some useful isometric functions!
package;
typedef PosArr = Array<Float>;
/**
Isometric translation formulas used and explanations can be found at:
https://yal.cc/understanding-isometric-grids/
- Disclaimer: This code is not associated with yal.cc, simply a Haxe implementation
- See license on https://gist.github.com/forgotten-king
*/
class IsometricGrid{
// Isometric cell width
@XANOZOID
XANOZOID / MIT-License.txt
Created July 15, 2017 06:57
This license applies to all public, or otherwise noted, gists for https://gist.github.com/forgotten-king
All public gists https://gist.github.com/forgotten-king
Copyright 2017, Abrahim Noll
MIT License, http://www.opensource.org/licenses/mit-license.php