pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
pyTile - Bezier railway track demo

pyTile - Bezier railway track demo - 0.1.0

Timothy Baldock (entropy)

Tags:

Description

See here for more details of pyTile:

http://www.pygame.org/project/871/

Controls:

Right-click + drag: move the world
Left-click: select a red dot, first click selects the start point, second click selects the end point
A - Select track building mode
D - Select track deletion mode

You can only draw tracks within one tile, I've yet to implement the final UI for track construction (this will likely use A* pathfinding to draw tracks over multiple tiles).

The system is based on the concept of square tiles with 8 entry/exit points (edges and vertices). Each entry/exit point has three paths through it, and the tracks join up these entry/exit points. Constraints are placed on the configuration of the tracks inside each tile. This gives a nice balance of flexibility vs. simplicity.

This uses the 2D vector class from the cookbook, and a modified version of the bezier curve demo from the same. My thanks go to the author of both of these since they saved me some time :)

Links

Home Page: http://entropy.me.uk/pytile/
Source: svn://entropy.me.uk/timothy/bezier/tags/0.1.0

Screenshot


click to view original size

Releases

pyTile - Bezier railway track demo - 0.1.0 - Jun 17, 2009

Pygame.org account Comments

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

June 17, 2009 3:10pm - Joey Marshall - nickname: (joey101)
Fascinating.
June 17, 2009 2:26pm - Ian Mallett - nickname: (geometrian)
UI a bit clunky and buggy at times (I managed to crash it with D) but otherwise most excellent.
spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
Apr 19, 2014

Apr 16, 2014


Apr 13, 2014

Apr 9, 2014

Mar 18, 2014


Mar 15, 2014


Mar 14, 2014

Mar 13, 2014

Mar 11, 2014

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