Skip to content

Instantly share code, notes, and snippets.

View grapefrukt's full-sized avatar
💭
🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭

martin jonasson grapefrukt

💭
🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭
View GitHub Profile
@grapefrukt
grapefrukt / taxman_android.py
Created November 21, 2013 17:02
This script takes a Google Play sales report CSV as input and outputs a plain text summary in the same folder. No guarantees for accuracy or validity.
'''
Copyright (c) 2013 Martin Jonasson, grapefrukt games
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@grapefrukt
grapefrukt / mojam-faq.tx
Last active December 14, 2015 02:19
MOJAM streaming FAQ
What is that music?
http://open.spotify.com/user/grapefrukt/playlist/06YVVaZd8fXxmI0E34lGXO
http://open.spotify.com/user/grapefrukt/playlist/6atg4Y6te0MO6FZ7qmx5Ri
http://open.spotify.com/user/grapefrukt/playlist/6aNPNl6MmIsU8NM8MzOdYG
If it's not one of those, the song name is in the streams lower left.
What is that program you're coding in?
Flash Develop
@grapefrukt
grapefrukt / markov-changelog.txt
Created February 6, 2013 18:34
I ran a markov text generator across all of the commit messages for rymdkapsel. I will never need to write one again.
Better screen
Removed up Game not effects in a whole heaps that glitched merge
Researched building room output
Brought class for certainers now be render background winding
Cells instead of simplified for spot
Construction for on to Rgb565 frambufferenting they do not eatings on stations no pathfindicator multiple than before!
Set for task refreshing and Lib
Allows if rooms and volumes
More cells
Got rid cent will looking on Enemies/Minions a separated TaskPicker baked as
# converts avi file to gif animation, call using file name without extension
# the palette from color.png (created manually) will be used for all frames
# tweak framerate using the -delay argument (1x20) means 20 fps
target=resource-spawn
convert -quiet -delay 1x20 $target.avi +dither -map color.png tmp.gif
convert tmp.gif -layers OptimizeTransparency +map $target.gif
@grapefrukt
grapefrukt / gist:1835445
Created February 15, 2012 12:47
Ta bort döda GameObjects ur Vectorn samtidigt som update körs
public function update():void{
// loopa igenom hela vektorn, fast baklänges
for(var i:int = _collection.length - 1; i >= 0 ; i--){
// om vårt GameObject inte lever
if(_collection[i].isAlive == false){
// ta bort det som child
removeChild(_collection[i]);
// och slutligen ta bort ur vektorn
_collection.splice(i, 1);
@grapefrukt
grapefrukt / gist:1835397
Created February 15, 2012 12:34
Rotation från riktning
var aimX:Number = (mouseX - _player.x);
var aimY:Number = (mouseY - _player.y);
_player.rotation = Math.atan2(aimY, aimX) / Math.PI * 180 + 45;
@grapefrukt
grapefrukt / gist:1835393
Created February 15, 2012 12:34
Riktning från rotation
var spinnerDirX:Number = Math.sin(_spinner.rotation / 180 * Math.PI);
var spinnerDirY:Number = Math.cos(_spinner.rotation / 180 * Math.PI);
var bullet:Bullet = new Bullet();
bullet.x = _spinner.x;
bullet.y = _spinner.y;
bullet.velocity.x = spinnerDirX;
bullet.velocity.y = spinnerDirY;
@grapefrukt
grapefrukt / refresher.sh
Last active September 29, 2015 10:47
IGF Main page refresher
#!/bin/bash
delay=180
while [ 1 ]
do
curl --silent --output igf.tmp "http://www.igf.com/"
if [[ -e igf.tmp ]] ;then
if [[ -e igf.tmp.1 ]] ;then
diff igf.tmp igf.tmp.1
@grapefrukt
grapefrukt / beards.txt
Created December 6, 2011 14:11
Bearded game designers
Al Lowe
Raph Koster
Ernest Adams
Alexey Pajitnov
Warren Spector
Allan Alcorn
Richard Garriott (Lord British)
Timothy Cain
Ken Levine
@grapefrukt
grapefrukt / InputManager.as
Created August 10, 2011 23:07
Using closures for fun and profit
public function InputManager(players:GameObjectCollection, keyCodes:Vector.<int>){
_players = players;
_inputs = new Vector.<OneButtonInput>(Settings.NUM_PLAYERS, Settings.NUM_PLAYERS);
for (var i:int = 0; i < Settings.NUM_PLAYERS; i++) {
_inputs[i] = new OneButtonInput(_players.collection[i].stage, keyCodes[i]);
var makeClosure:Function = function(arg:int):Function {
return function(e:Event):void{ handleChange(e, arg)};
}