Monorail Starter Kit
by S2P · 02/07/2009 (3:52 pm) · 15 comments

MONORAIL STARTER KIT FOR TGEA with downward compatibility to TGE (not yet tested, but in theory should work).
Features;
Call train from a station
Detects if player is onboard and stops at opened stations.
Ignore stations so that Monorail does not stop.
Close a station
Monorail Car with Animated Doors that Open and Close
Stations with Open and Close animations.
This pack has been created using a modified Platforms Players can Ride on Resource and our own scripts that are included in the kit. As the Platforms Players can ride on resource is a public resource, we're not going to take credit for this, but disclose our modifications in a private forum thread for every Torque owner who is familiar with this resource so that as a community you can obtain help from this resource or from our modifications which may help others.
This pack is by no means the complete product, but a starter kit for those of you who are familiar with the Platforms Players can ride on resource. We have spent countless months, days, weeks, hours - I forget how long we have spent in time and money on getting this kit to the point of release, and now it's almost here.
This pack is intended for the Intermediate to Experienced developer. So if you are new to the Torque Engine, right now, this kit is not for you, but we plan to recycle what we make from this pack into further R&D to make this pack better by implementing a monorail track deployment system for the next update as there is quite a bit of manual work and tweaking involved, especially on the track curves. So by making this kit easier to use for future updates, we'll cater for the novice Torque user, and with your help we'll iron out any known bugs and patch them up for the next release.
Full technical documentation will be provided on the structure of the Monorail car, collision areas to stop players falling out of the car, a small list of known bugs that we've not quite got rid of yet - down to our of lack of knowledge (with your input we'll fix them!), and features that we've not quite yet implemented for this release but are included in the kit, so you can always add them or wait for the next release.
Almost forgot to mention... there will be a demo mission included so you can test it out once you have implemented the resource plus modifications to make it run.
Stay tuned ...
About the author
Time saving game tools and gameplay developer. http://www.indiegamedevelopertools.com
#2
DTS shapes for the rails. No Help tool for editing the track in this release, but we plan on creating a GUI system that will enable the deployment configuration of pre-defined track layouts if the up-take is enough for us to take this on board. The curves are at a 30 degree angle, so it would take a few of them to make a round track. You can have multiple tracks, but you'd need to make some modifications to the code. I have thought about adding multiple cars, but not yet looked into how this can be achieved, maybe something further down the line (no pun intended!). At the moment you do need to set the cars path by markers, the car can slip off the tracks if the path is not correctly set, so there will be tweaking involved. Hopefully later addressed. Each of the tracks have mounting points, so there may be a way to set a logic gates system with markers built into the nodes, but again this is a starter kit, you can make modifications to the code or completely avoid the platforms players can ride on resource, which we're thinking of doing for a future release providing there is a solution, we're not trying to re-invent the wheel just yet even though we tried at the start, it just took too long to work out at the time. So we went with the available resource that people are no doubt familiar with, does the job well with a bit of work and we'll re-investigate this again in the near future, if required.
PS. Great Cliffs pack by the way. Bought it the other day.
02/07/2009 (4:30 pm)
Hi KonradDTS shapes for the rails. No Help tool for editing the track in this release, but we plan on creating a GUI system that will enable the deployment configuration of pre-defined track layouts if the up-take is enough for us to take this on board. The curves are at a 30 degree angle, so it would take a few of them to make a round track. You can have multiple tracks, but you'd need to make some modifications to the code. I have thought about adding multiple cars, but not yet looked into how this can be achieved, maybe something further down the line (no pun intended!). At the moment you do need to set the cars path by markers, the car can slip off the tracks if the path is not correctly set, so there will be tweaking involved. Hopefully later addressed. Each of the tracks have mounting points, so there may be a way to set a logic gates system with markers built into the nodes, but again this is a starter kit, you can make modifications to the code or completely avoid the platforms players can ride on resource, which we're thinking of doing for a future release providing there is a solution, we're not trying to re-invent the wheel just yet even though we tried at the start, it just took too long to work out at the time. So we went with the available resource that people are no doubt familiar with, does the job well with a bit of work and we'll re-investigate this again in the near future, if required.
PS. Great Cliffs pack by the way. Bought it the other day.
#3
Monorail - simple track layout
Monorail - Car and Station Animations
The easiest track layout is a straight line. If you are going to setup a track from scratch with two stations, one at the start and one at the end of the route, going across a flat terrain then you can stretch out the markers loop to cover both stations. The car will know when to stop at the stations and will loop travelling through the stations until a player calls the car, then it will stop at each station until a player leaves the car. You can have more than two stations, but need to define these in code, which is detailed in the document. There is also a force field (not implemented) which has been included with an IFL so you can add this to the platform to stop players getting in the way of the track when a car enters the station. We'll be adding this in on the next update, or you can add it now if you know how.
02/07/2009 (4:39 pm)
A couple of videos for youMonorail - simple track layout
Monorail - Car and Station Animations
The easiest track layout is a straight line. If you are going to setup a track from scratch with two stations, one at the start and one at the end of the route, going across a flat terrain then you can stretch out the markers loop to cover both stations. The car will know when to stop at the stations and will loop travelling through the stations until a player calls the car, then it will stop at each station until a player leaves the car. You can have more than two stations, but need to define these in code, which is detailed in the document. There is also a force field (not implemented) which has been included with an IFL so you can add this to the platform to stop players getting in the way of the track when a car enters the station. We'll be adding this in on the next update, or you can add it now if you know how.
#4
02/07/2009 (8:26 pm)
beh, a forcefield to prevent players from jumping in front of the train? Just add the code that send them flying ragdoll style and turns them into a fine mist spray... that will teach them from trying to stop a mighty monorail train.
#5
I second Edward's idea. Let Darwin take care of those players who feel the need to jump in front of the train.
This resource could probably easily be modified to create a tram or other similar form of transportation. Maybe you'll do that next...? ;)
02/07/2009 (9:39 pm)
Looks great. I can see the need to add several maintenance and upkeep people to the kit in order to keep the doors/ramps in tip-top shape. Will the maintenance crew be forthcoming? ;)I second Edward's idea. Let Darwin take care of those players who feel the need to jump in front of the train.
This resource could probably easily be modified to create a tram or other similar form of transportation. Maybe you'll do that next...? ;)
#6
One more question: is there a possibility to create a looping track? With multiple stations, it'd probably be easier to solve the multiple cars issue by making cars wait unless the car ahead has already left the next station.
I need a transportation system in my game that must span great distances. Because of that, waiting for a car to return would take too long. This is why I was planning for a looping / multiple cars / multiple tracks based approach.
Thanks for the responses & the CCK comment! Keep us updated about this!
02/08/2009 (12:50 am)
@Julian: Looks great! The corners sound just fine. And the marker solution fits my game perfectly! I'll be sure to put my hands on a copy!One more question: is there a possibility to create a looping track? With multiple stations, it'd probably be easier to solve the multiple cars issue by making cars wait unless the car ahead has already left the next station.
I need a transportation system in my game that must span great distances. Because of that, waiting for a car to return would take too long. This is why I was planning for a looping / multiple cars / multiple tracks based approach.
Thanks for the responses & the CCK comment! Keep us updated about this!
#7
@Joe - correct, I have a ski ramp with tram already in the works, plus a few other secret ideas that will rock! :)
@Konrad - I've never created a looping track, but each path node in the code increments when in forward motion and decreases backwards. I'm guessing, but you could create a looping track, by making the markers stretch out, maybe 4 markers in a cross formation. It'll be interesting to find out what you do with this. Feedback and help to make it better for everyone will also be a plus. You can adjust the speed of the car, and it's certainly faster than travelling by foot if you have a larger terrain. With a bit of work you could create multiple trains and cars within your game, it will probably just require several instances of the car in code to run on differnt path markers.
02/08/2009 (2:54 am)
@Edward - lol, total carnage! I like your way of thinking. @Joe - correct, I have a ski ramp with tram already in the works, plus a few other secret ideas that will rock! :)
@Konrad - I've never created a looping track, but each path node in the code increments when in forward motion and decreases backwards. I'm guessing, but you could create a looping track, by making the markers stretch out, maybe 4 markers in a cross formation. It'll be interesting to find out what you do with this. Feedback and help to make it better for everyone will also be a plus. You can adjust the speed of the car, and it's certainly faster than travelling by foot if you have a larger terrain. With a bit of work you could create multiple trains and cars within your game, it will probably just require several instances of the car in code to run on differnt path markers.
#8
02/08/2009 (9:05 am)
great news... cool to see it working, congratulations!!!
#9
Ok, update... Track and stations editor almost complete. It's an offline track formations editor. You select which track and how many stations you would like from the visual picture, it will then create the terrain script that you can cut and paste into your terrain file. It will also ask you to set a location of where you want to place the track and also the height map. I'll look into making this update your terrain file automatically by selecting a terrain file from a drop down list and we'll be ready to go on launching this pack.
02/10/2009 (2:53 pm)
Thanks Maxim.Ok, update... Track and stations editor almost complete. It's an offline track formations editor. You select which track and how many stations you would like from the visual picture, it will then create the terrain script that you can cut and paste into your terrain file. It will also ask you to set a location of where you want to place the track and also the height map. I'll look into making this update your terrain file automatically by selecting a terrain file from a drop down list and we'll be ready to go on launching this pack.
#10
02/10/2009 (4:41 pm)
Wow, that sounds like a really useful tool! Thanks for that Julian!
#11
02/11/2009 (12:01 am)
Thanks Konrad. It'll save some time but will not allow custom designs like your Dungeon mapping tool just pre-designs for now. Depending on the up-take of this, I may design a Flash based tool where you drag and drop track components on to a map, which snap together, then you just press create to produce your code, it'll take some thought.
#12
Sounds and looks awesome.
06/29/2009 (12:05 pm)
I would like to get on the list for this kit also.Sounds and looks awesome.
#13
Best
J
06/29/2009 (1:50 pm)
Hi Lee. This pack went on the back burner after I had to get a job during the recession, but I will be looking at resurecting it in the next few weeks.Best
J
#15
08/30/2010 (3:59 pm)
Hi Guys - this pack is going to re-surface again in the coming months ahead. Stay tuned.
Associate Konrad Kiss
Bitgap Games
1. Could you tell me more about how the track is laid down in the editor? DTS shapes, or something else?
2. Is there some help/tool when editing the track?
3. Is it possible to have multiple tracks on a map?
4. Multiple cars on a track?
5. Do I need to set the car's path, or does it follow rails? (one can dream..)
Thanks for the answers in advance!