Skip to content

Instantly share code, notes, and snippets.

View spinningD20's full-sized avatar

spinningD20 spinningD20

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="isometric" renderorder="right-down" width="10" height="12" tilewidth="128" tileheight="64" nextobjectid="1">
<tileset firstgid="1" name="basic_ground_tiles" tilewidth="128" tileheight="128" tilecount="56" columns="8">
<image source="basic_ground_tiles.png" width="1024" height="896"/>
</tileset>
<tileset firstgid="57" name="basic_ground_tiles" tilewidth="128" tileheight="128" tilecount="56" columns="8">
<image source="basic_ground_tiles.png" width="1024" height="896"/>
</tileset>
<layer name="Tile Layer 1" width="10" height="12">
<data>
@spinningD20
spinningD20 / main.py
Created January 22, 2017 14:19
tilemap seams with camera movement and scaling
from collections import defaultdict
import tmx
from cymunk.cymunk import Vec2d
from kivent_maps.map_utils import _load_obj_models, _load_tile_map, _load_tile_properties, parse_tmx
from kivent_maps.map_utils import _load_tilesets
from kivy.app import App, platform
from kivy.core.window import Window, Keyboard
from kivy.clock import Clock
from kivy.uix.widget import Widget
@spinningD20
spinningD20 / main.py
Created February 14, 2017 01:18
this is the example 14_tmx_loader modified to try to unload the loaded map and then loading another map (same file).
from kivy.app import App
from kivy.core.window import Window
from kivy.clock import Clock
from kivy.uix.widget import Widget
from kivy.properties import StringProperty
from kivent_core.systems.gamesystem import GameSystem
from kivent_core.managers.resource_managers import texture_manager
from os.path import dirname, join, abspath
from kivent_maps import map_utils
from kivent_maps.map_system import MapSystem
@spinningD20
spinningD20 / AssetPaths.hx
Created April 16, 2017 01:00 — forked from kevinresol/AssetPaths.hx
Macro to read asset paths
package util;
/**
* ...
* @author Kevin
*/
@:build(util.AssetPathsMacro.build())
class AssetPaths
{
@spinningD20
spinningD20 / menu_launcher.py
Created April 17, 2017 12:45 — forked from abishur/menu_launcher.py
A simple menu system using python for the Terminal (Framebufer)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Topmenu and the submenus are based of the example found at this location http://blog.skeltonnetworks.com/2010/03/python-curses-custom-menu/
# The rest of the work was done by Matthew Bennett and he requests you keep these two mentions when you reuse the code :-)
# Basic code refactoring by Andrew Scheller
from time import sleep
import curses, os #curses is the interface for capturing key presses on the menu, os launches the files
screen = curses.initscr() #initializes a new window for capturing key presses
curses.noecho() # Disables automatic echoing of key presses (prevents program from input each key twice)
class Main extends luxe.Game {
override function config(config:luxe.GameConfig) {
config.preload = PreloadAssets.parcel;
return config;
}