Skip to content

Instantly share code, notes, and snippets.

@TheUnlocked
TheUnlocked / GameMakerSpriteExtractor.py
Last active February 4, 2024 07:00
Extract textures from GameMaker Studio games (including YYC-compiled)
import re
# Requires python 3
# YYC-compiled GameMaker Studio games don't work with most GameMaker Studio asset extractors.
# However, GameMaker Studio just stores textures as raw PNGs, no matter the compilation type.
# This script works by searching for all PNG images in the data file.
# This could be the data.win, .data, or gamename.exe files.
pngs = []
@josefnpat
josefnpat / run.sh
Created June 4, 2016 13:02
Itch.io App Sample Linux Integration (with love binary dependency)
#!/bin/sh
# Copyright (c) 2014 Josef Patorpsty
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for any damages
# arising from the use of this software.
#
# Permission is granted to anyone to use this software for any purpose,
# including commercial applications, and to alter it and redistribute it
@netcell
netcell / VirtualJoystick
Created April 3, 2015 05:10
Phaser Virtual Joystick
var normalize = Phaser.Point.normalize;
var zero = new Phaser.Point(0, 0);
class Joystick extends Phaser.Sprite {
constructor({x, y, holder, pin}) {
super(game, 0, 0, holder);
this.anchor.setTo(0.5, 0.5);
this.fixedToCamera = true;
this.cameraOffset.setTo(x, y);
@marcedwards
marcedwards / high-dpi-media.css
Last active November 19, 2023 12:56
A CSS media query that captures almost all high DPI aware devices.
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */