Skip to content

Instantly share code, notes, and snippets.

@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:60830f18c3422a517b3e
Created April 10, 2015 20:01
Dungeon Highway Level Layout "Miniboss and Friends"
|
|
|
CC |
|
|
CC |
|
|
CC |
@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:f8aeb8cc5ccb1b97bc61
Created April 17, 2015 18:42
ParseSafeInitializeBehaviour
using UnityEngine;
using System.Collections;
using Parse;
// Parse for Unity3d 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 need to talk to Parse in
public class ParseSafeInitializeBehaviour : ParseInitializeBehaviour {
using UnityEngine;
using System;
using System.Collections;
public class CheatActivator : MonoBehaviour {
private DateTime ClickedAt;
private const int MIN_SECONDS = 5;
private const string CHEAT_SCENE = "Cheats";
public void OnPress(bool isDown) {
class MikeBlindBot < RTanque::Bot::Brain
NAME = 'MikeBlindBot'
include RTanque::Bot::BrainHelper
def tick!
## main logic goes here
@direction_degrees ||= 0
if self.sensors.position.on_top_wall?
@direction_degrees = -180
elsif self.sensors.position.on_bottom_wall?
@mikelovesrobots
mikelovesrobots / MikeBlindBot.rb
Created December 2, 2016 00:58
Rtanque Bot 2 - no longer so blind
class MikeBlindBot < RTanque::Bot::Brain
NAME = 'MikeBlindBot2'
include RTanque::Bot::BrainHelper
TURRET_FIRE_RANGE = RTanque::Heading::ONE_DEGREE * 1.0
def tick!
## main logic goes here
@direction_degrees ||= 0
if self.sensors.position.on_top_wall?
@mikelovesrobots
mikelovesrobots / gist:abaf9e651652f480facf39a16395ea4a
Last active March 7, 2017 01:02
How Substantial keeps things going smoothly [outline]
Organizational Tools:
* Trello for prioritizing the most important thing to be working on next
(typically divided into backlog, doing, review and done columns)
* Github pull requests before merging code to master
(not just programmers: artists and other interested parties have a say too)
Regular Meetings:
* Morning team standups
import { sample } from 'lodash'
export default class TitleGenerator {
static generate() {
return sample(this.phrases())
}
static phrases() {
return [
`${sample(this.gibberish())} the ${sample(this.adjectives())} aspect ${sample(this.rises())}. ${sample(this.gibberish())} ${sample(this.interrogations())}`,
@mikelovesrobots
mikelovesrobots / drone.yml
Created July 25, 2017 23:30
one way of using yaml features to DRY up drone.yml
invalidate-cloudfront-common: &invalidate-cloudfront-common
image: cgswong/aws:aws
commands:
- aws configure set preview.cloudfront true
- aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths "/*"
secrets: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY]
pipeline:
invalidate-cloudfront-dev:
<<: *invalidate-cloudfront-common