Skip to content

Instantly share code, notes, and snippets.

View tyler6699's full-sized avatar
🖥️
Work

Ryan Tyler tyler6699

🖥️
Work
View GitHub Profile
#ifdef GL_ES
#define LOWP lowp
precision mediump float;
#else
#define LOWP
#endif
varying LOWP vec4 vColor;
varying vec2 vTexCoord;
@tyler6699
tyler6699 / vagrant.rb
Created February 20, 2020 15:42
Vagrant Cask
cask 'vagrant' do
version '1.9.8'
sha256 '45472731bde1df0bf2e0e0cf1ee460e2851c920d8b7b8af939e41156515cf49c'
# hashicorp.com/vagrant was verified as official when first introduced to the cask
url "https://releases.hashicorp.com/vagrant/#{version}/vagrant_#{version}_x86_64.dmg"
appcast 'https://github.com/hashicorp/vagrant/releases.atom'
name 'Vagrant'
homepage 'https://www.vagrantup.com/'
@tyler6699
tyler6699 / Gruntfile.js
Created August 17, 2019 22:21
Grunt file and NPM package file for compressing and obfuscating JS13KB Game
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
mangle: {
toplevel: true,
eval: true,
keep_fnames: false,
@tyler6699
tyler6699 / audio.js
Created August 15, 2019 18:55
Simple audio clips for JS13K Game Jam
// NOISES
var NOISEFX=0;
var COINFX=1;
var JUMPFX=2;
var FALLFX=3;
// Sound
// https://xem.github.io/MiniSoundEditor/
var context = new AudioContext();
var o = null
@Carelesslabs
A simple Grunt setup for JS13kGames
This gruntfile will take all javascript files in source folder "assets/js/*.js" and compress them into
a single file "dst/game.min.js". Storing you minified HTML file and images in the dst folder also allows you
to compress this one dst folder for submission.
If you want individual files then change "expand: false," to " expand: true,". The "ext: '.min.js'" setting will tag min.js onto
all of the separate files.
╔═════════════════════╗
║ @CarelessLabs ║
╚═════════════════════╝
╔══════════╦══════════╗
║ ║ ║
╠══════════╩══════════╣
║ ║
╠══════════╦══════════╣
║ ║ ║
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title> Dans Maze </title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
SELECT j.name JobName
, h.step_name StepName
, CAST(STR(h.run_date, 8, 0) AS DATETIME)
+ CAST(STUFF(STUFF(RIGHT('000000' + CAST (h.run_time AS VARCHAR(6)), 6),
5, 0, ':'), 3, 0, ':') AS DATETIME) AS StartDatetime
, DATEADD(SECOND,
( ( h.run_duration / 1000000 ) * 86400 )
+ ( ( ( h.run_duration - ( ( h.run_duration / 1000000 )
* 1000000 ) ) / 10000 ) * 3600 )
+ ( ( ( h.run_duration - ( ( h.run_duration / 10000 ) * 10000 ) )
// SOURCE
// http://techblog.orangepixel.net/2015/07/shine-a-light-on-it/
// http://www.java-gaming.org/topics/2d-nuclear-throne-style-lighting-libgdx/38314/view.html
// VARS
FrameBuffer lightBuffer;
TextureRegion lightBufferRegion;
SpriteBatch light_batch;
// RENDER LOOP
@tyler6699
tyler6699 / gist:88e832e60a5dd27b3c9e9fdb33438a59
Created July 11, 2017 22:49
Calculate a vector relative to an objects postion and angle
public Vector2 calculatePosition(float angle, float distance, Vector2 centre) {
float radians = (float) Math.toRadians(angle);
float x = (float) ((Math.cos(radians) * distance) + centre.x);
float y = (float) ((Math.sin(radians) * distance) + centre.y);
return new Vector2(x, y);
}