Skip to content

Instantly share code, notes, and snippets.

@marcusmoller
marcusmoller / sightandlight.py
Last active March 25, 2016 11:03
SIGHT & LIGHT demo in Python/PyGame
'''
SIGHT & LIGHT by ncase (https://github.com/ncase/sight-and-light)
Ported to Python/PyGame by Marcus Møller (https://github.com/marcusmoller)
'''
import pygame
import pygame.gfxdraw
import math
class SightAndLight():
@marcusmoller
marcusmoller / ice.py
Last active December 24, 2015 16:19
ice.py with Steam-is-running check.
#!/usr/bin/env python
import sys
import os
import inspect
from ice.error.config_error import ConfigError
from ice.steam_shortcut_manager import SteamShortcutManager
@marcusmoller
marcusmoller / gist:6622766
Last active November 17, 2019 15:58
A small sprite combiner written in shell. Used on: http://opengameart.org/content/700-sprites
#!/bin/sh
for f in *.gif
do
short=${f:0:4}
if ls $short".png" &> /dev/null; then
echo "file exists"
else
montage -tile x1 -geometry +0+0 -background none $short*.gif $short.png
convert $short.png -transparent white $short.png