Skip to content

Instantly share code, notes, and snippets.

View device_get_id.gml
var generate_uuid = true;
var fname_uuid = "uuid.ini";
ini_open(fname_uuid);
global.uuid = ini_read_string("generated", "uuid", "unknown");
ini_close();
if (global.uuid == noone or global.uuid == "unknown")
{
show_debug_message("no good: " + global.uuid);
@caroparo
caroparo / PhaserUtil.js
Last active Oct 15, 2016
nonsensical Phaser helpers
View PhaserUtil.js
function addSprite(name, x, y)
{
var sprite = game.add.sprite(0, 0, name);
// centered
sprite.pivot.x = sprite.width * 0.5;
sprite.pivot.y = sprite.height * 0.5;
sprite.position.x = x;
sprite.position.y = y;