This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<map version="1.0" orientation="orthogonal" width="10" height="10" tilewidth="128" tileheight="128"> | |
<tileset firstgid="1" name="road-tiles" tilewidth="128" tileheight="128"> | |
<image source="road-tiles.png" width="640" height="512"/> | |
</tileset> | |
<layer name="map0" width="10" height="10"> | |
<data encoding="base64" compression="zlib"> | |
eJxjZGBgYCaAWYCYDYhZCWA+qDp2IBaEYg4keXYoH6aOE4i5oJgNzRxuMtTxADETFPMiqeOB8vkYSPMHNdUJIIUJLiwMxAAjRgMf | |
</data> | |
</layer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import timeit | |
setup = ( | |
"import cocos.collision_model as cm;" + | |
"import cocos.euclid as eu;" + | |
"rect1 = cm.AARectShape(eu.Vector2(1.0, 1.0), 2.0, 3.0);" + | |
"rect2 = cm.AARectShape(eu.Vector2(3.0, 3.0), 2.0, 3.0)") | |
res = timeit.repeat(stmt="a = rect1.distance(rect2)", setup=setup, repeat=3, number=1000000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''Simplified noisy.py without sound, text or events to diagnose basic problems with sprites, | |
shows ten bouncing balls | |
''' | |
import os | |
import random | |
import sys | |
from pyglet.gl import * | |
import pyglet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""shows the string '--- o ---', screen center shoud be on the 'o' | |
""" | |
from pyglet.gl import * | |
import pyglet | |
from pyglet.window import key | |
window = pyglet.window.Window(640, 480) |