pygame is
Simple DirectMedia Layer is
Site Swing
pyTile Iso depth sorting

pyTile Iso depth sorting

Timothy Baldock (entropy)



This is going to be a testing demonstration of a sprite depth sorting system I'm working on. Currently it takes a coordinate in 3D space and draws a bounding box around it based on a projection.

The idea is that objects will be represented in 3D based on a coordinate, 3 dimensions, a rotation and a tilt (to allow for tilting up/down for going up/down hills).

The sorting works by finding how close each object is to a plane passing through the 3D space origin, such that a viewing ray from the camera is a normal to that plane. This is used to compare objects and determine if one is in front of another. A simple heap-sort is then used to keep all the sprites in order. Eventually all of this behaviour will be implemented in a sprite group class and used in my game project pyTile.

Q/D - position in X
A/E - position in Y
W/S - position in Z
U/L - size in X
O/J - size in Y
I/K - size in Z
Z/X - rotation
UP/DOWN/LEFT/RIGHT - Move origin in 2D
T/Y - toggle origin/coordinate display


Home Page: account Comments

If you wish to leave a comment with your account, please sign in first.

No user comments have been submitted.

our projects welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
recent releases
May 22, 2016

May 21, 2016

May 18, 2016

May 1, 2016

Mar 27, 2016

Mar 26, 2016

Mar 22, 2016

Mar 19, 2016

Mar 17, 2016

... more!
for pygame related questions, comments, and suggestions, please see help (lists, irc)