* NOTICE *
The OTT3D project, which is discussed here, is DISCONTINUED.
However, the proposed track-system is implemented in OgreRails project.
----------------------------------------------------------------------------------------------------
Hello.
In this thread I'd like to discuss implementation of tracks in the ott3d branch.
The chosen method is to use pre-designed track sections (separate meshes) which would snap to each other. This is a simple and effective method IMO. However, there are still many unresolved issues.
Firstly, there are no rules regarding sizes and shapes of track sections. This could make it impossible to connect two ens of track because no piece fits there.
Secondly, the track pieces can be laid absolutely freely, which may cause the previously mentioned problem even if all track sections are standartised - the player can simply start two tracks separately in such relative positions that no set of sections can join them.
My suggestion adressing both above problems is outlined in the attached pdf.
Finally, a track section management system needs to be developed. Currently, the sections are hard-coded, which works for a temporary solution, but it's unacceptable as a final solution. For one thing, nobody else but lonwolf can create new track pieces ( and I'd like to make some ).
My suggestion:
- Create an abstract representation of a track section, i.e.:
Code: Select all
struct TrackSection{ Ogre::Entity* mTrack; Ogre::SceneNode* mCheckpointA; Ogre::SceneNode* mCheckpointB; Ogre::SceneNode* build(unsigned x, unsigned y, unsigned z, unsigned direction); }
- Create a track-description file which will link checkpoint data to ogre resources, thus making it possible to add sections dynamically. For example:
Code: Select all
<xml> <section mesh_name="StraightTrack.mesh"> <checkpoint name="A" x="1" y="2" z="3"></checkpoint> <checkpoint name="B" x="3" y="2" z="1"></checkpoint> </sections> </xml>
EDIT: Added the "DISCONTINUED" notice.