This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Seeded Perlin Noise | |
// | |
// Based on the original by Ken Perlin: | |
// | |
// http://mrl.nyu.edu/~perlin/noise/ | |
// http://mrl.nyu.edu/~perlin/paper445.pdf | |
// | |
// Seeding function based on code from: | |
// http://techcraft.codeplex.com/discussions/264014 | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
/* | |
A Unity3D class for snapping pixel art to multiples of a whole (design scale) pixel | |
Use in conjunction with an appropriately scaled Otho Camera | |
License: MIT | |
Written by Lee Grey (@mothteeth) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Basic Sprite Shader for aligning pixel art to the same grid, based on the Unity Sprite Shader. | |
Create one Material where you assign the same Pixels Per Unit value you use on your imported Sprites, | |
then reuse this Material on all appropriate Sprite Renderers. | |
(As far as I know there's no possiblity to get this value automatically.) | |
This is not for scaled or rotated artwork. If you need those features, look at low res render textures. | |
Use this however you want. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Diagnostics; | |
using Debug = UnityEngine.Debug; | |
/* | |
USAGE: | |
ProcessTimer.Start("unique_process_id"); | |
// do stuff | |
ProcessTimer.End("unique_process_id", "An optional additional message to display with results"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright Lee Grey, 2014 | |
// License: MIT | |
module lg.tileSystem { | |
import Vector2D = lg.math.geometry.Vector2D; | |
export class FieldInfo { | |
distanceFromTarget: number = -1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TileWorld.as - Lee Grey, November 2011 | |
package com.lgrey.game.tileEngine | |
{ | |
import com.lgrey.vectors.LGVector2D; | |
import flash.display.BitmapData; | |
public class TileWorld | |
{ | |
protected var _worldMap:BitmapData; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* LGVector2D.cpp | |
* | |
* Created by Lee Grey on 11/06/11. | |
* Copyright 2011 Lee Grey. All rights reserved. | |
* | |
*/ | |
#include "LGVector2D.h" | |
#include <iostream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author Lee Grey / Jonathan Hopcroft | |
* | |
* seeded random number generator | |
* based on Rndm by Grant Skinner | |
* https://github.com/gskinner/AS3Libs/blob/master/Rndm/com/gskinner/utils/Rndm.as | |
* | |
* Incorporates implementation of the Park Miller ( 1988 ) "minimal standard" linear | |
* congruential pseudo-random number generator by Michael Baczynski, www.polygonal.de. | |
* ( seed * 16807 ) % 2147483647 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Author: Lee Grey, 2012 | |
License: MIT | |
USAGE: | |
var A = InheritMax.base( { | |
name: 'A', | |
say: function () { | |
console.log( 'A speaks' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SECOND FILE | |
# H1 | |
followed by some text | |
## H2 | |
followed by some text | |
### H3 | |
followed by some text |
NewerOlder