Skip to main content

pyTile - Bezier railway track demo - 0.1.0

A demonstration of the track image composition system that will be used in a transport game based off the pyTile isometric engine


Timothy Baldock
(entropy)
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 :)

Changes

Links

Home Page
https://github.com/tbentropy/pytile
Source
svn://entropy.me.uk/timothy/bezier/tags/0.1.0

Releases

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

Pygame.org account Comments