Skip to content

Instantly share code, notes, and snippets.

@mikelovesrobots
mikelovesrobots / gist:274b40c23d64a09d58c3
Created April 17, 2015 18:41
ParseSafeInitializeBehaviour
using UnityEngine;
using System.Collections;
using Parse;
// Parse stops responding if it gets initialized twice or the original initialization goes away (e.g., you leave the scene)
// so use this instead of the regular ParseInitializeBehaviour, and throw it in every scene that you access Parse from
public class ParseSafeInitializeBehaviour : ParseInitializeBehaviour {
public static bool IsAlreadyAlive;
@mikelovesrobots
mikelovesrobots / gist:60830f18c3422a517b3e
Created April 10, 2015 20:01
Dungeon Highway Level Layout "Miniboss and Friends"
|
|
|
CC |
|
|
CC |
|
|
CC |
@mikelovesrobots
mikelovesrobots / gist:42cfc1938f72a1d44591
Created April 8, 2015 23:13
Dungeon Highway Adventures - Speed Dungeon - Very Hard Level
r
OXO
[N]
$P$
$P$
$$$
$
fff
222
eEe
@mikelovesrobots
mikelovesrobots / gist:e526809506a17b4db65b
Created March 3, 2015 21:15
Bulk Material Creator for Unity3d. Just select your textures, then select from the menu Assets > Bulk Material Creator, assign a shader and hit create. MIT License.
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
public class BulkMaterialCreator : ScriptableWizard
{
public Shader Shader;
@mikelovesrobots
mikelovesrobots / Character.cs
Created March 28, 2014 00:13
Dungeon Highway Character Model
using UnityEngine;
using System.Collections;
[System.Serializable]
public class Character {
public CharacterType CharacterType;
public Sprite DefaultSprite;
public string PortraitSpriteName;
public string WalkAnimationName {
@mikelovesrobots
mikelovesrobots / AccelerometerAdapter.cs
Last active August 29, 2015 13:57
Adapter for Unity that uses the mouse for input if the current device (e.g., the editor) doesn't support acceleration. MIT license, so go nuts.
using UnityEngine;
using System.Collections;
public class AccelerometerAdapter : MonoBehaviour {
public const float TILT_SENSITIVITY = 1.5f;
public Vector3 Input {
get {
if (SystemInfo.supportsAccelerometer) {
return UnityEngine.Input.acceleration * TILT_SENSITIVITY;
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
public class DudeDeathController : MonoBehaviour {
...
public void Die() {
DudeMotionArrester.SlowToStop();
Animator.Play("DudeDie");
@mikelovesrobots
mikelovesrobots / unlit-transparent-flash-fx.shader
Created January 25, 2014 05:24
Unlit/transparent shader that can flash the textures white (pure black is all original texture, white is all white)
Shader "Unlit/TransparentFlashFX" {
Properties {
_Color ("Color Tint", Color) = (1,1,1,1)
_MainTex ("SelfIllum Color (RGB) Alpha (A)", 2D) = "white"
}
Category {
Lighting On
ZWrite Off
Cull Back
Blend SrcAlpha OneMinusSrcAlpha
@mikelovesrobots
mikelovesrobots / gist:5811851
Created June 19, 2013 05:23
Just because Apple/Objective-C wants you to put everything in one goddamn file doesn't mean you actually have to have it all in one file.
//
// MapViewController.m
// placesihavepooped
//
// Created by Michael Judge on 6/16/13.
// Copyright (c) 2013 Michael Judge. All rights reserved.
//
#import "MapViewController.h"

Piggyback Dungeon Ryder is a coop dungeon crawler about an archer that rides on the back of a giant. Player one controls the giant, and player two controls Ryder with the crossbow. Throughout the game, the two players will have to cooperate to overcome the challenges contained in the procedurally-organized dungeon. Traps and monsters await. They'll fight, they'll die and perhaps learn to love one another as a man loves a giant and a giant loves a man.

The story will be told through brief conversations between the two on rare enemy-free levels. Ryder is cursed and can't touch the ground or he'll die, and the giant needs to prove his bravery to be allowed to mate back home. They're on a quest together to break the curse. I'm hoping for a bit of a roadtrip feel, but we'll see how that turns out in days to come.

I'm working on the game by myself, and so far I'm pretty happy with my progress. Today was spent mostly on getting the giant's animations in place, building scenery textures, and working on