Create a gist now

Instantly share code, notes, and snippets.

@zeroeth /tmx.html
Last active Aug 29, 2015

What would you like to do?
tmx starter game
<script src=''></script>
canvas { background-color: #5e81a2; }
// This game uses spritesheet.png from:
var Q = Quintus()
.include("Sprites, Scenes, Anim, Input, 2D, Touch, UI, TMX")
.setup({maximize: true})
// Give us a player from the same tilesheet
init: function(properties)
// Same name as in the tiled editor
properties.sheet = "Tiles_32x32";
// Square in the tile set
properties.frame = 51;
// Load TMX File as a scene
Q.scene("level1", function(stage)
Q.stageTMX("level1data.tmx", stage);
var player = Q("Player").first();
// Load assets and launch the first scene to start the game
Q.loadTMX("level1data.tmx" , function()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment