Skip to content

Instantly share code, notes, and snippets.


Poppy Works PoppyWorks

View GitHub Profile
PoppyWorks / gamepad_color
Created Jul 23, 2018
GML Script for changing the color of a DS4 gamepad. Will likely only function on PS4. Will return true upon completion of the color change.
View gamepad_color
var device = argument0;
var color = argument1;
var time = argument2; //(use something like .01)
if color != global.gpColor
var led = merge_color(global.gpColor,color,global.gpColorFader)
global.gpColorFader += time;
PoppyWorks / setup_language
Last active Aug 16, 2018
GML Script. This should allow the use of any language files to be placed in an ISO639 standard named folder. The game should react accordingly based on the user's OS language. Alternatively, you can change global.language manually to test this feature.
View setup_language
//build fonts
global.fnt_textbox = font0;
//get OS Language
global.language = os_get_language();
//Load appropriate langage table for UI via JSON
PoppyWorks / tileset.scm
Last active Jul 18, 2018 — forked from MobiDevelop/tileset.scm
GIMP script that adds a bleed and margin to an existing tilesheet/spritesheet. Very useful!
View tileset.scm
(define (script-fu-respace-tiles-addMarginSpacing inImage inLayer tileSize)
(let* (
(margin 1)
(spacing 2)
(duplicatePadding TRUE)
(theWidth (car (gimp-drawable-width inLayer)))
(theHeight (car (gimp-drawable-height inLayer)))
(theMarginX (* 2 margin))
(theMarginY (* 2 margin))