During week three I was able to add turnouts to the track. Turnouts serve to redirect trains. To operate turnouts a train must be within a section that is connected to that turnout. If a turnout is active (within one section of a train) and it is clicked, it will rotate its sprite and change the direction that the train will proceed upon exiting a section. For the time being turnouts are free to turn in any direction where there is more track, this means that trains can now turn around and go “backwards” around the track. Because the trains can go in both directions I also added a second signal to each section so that each section is clearer to see and it is obvious why a train is being stopped. During week three I also set up a Github repository for the trains project. There are two branches, master and develop. Master is the stable older version of the project used incase I need to roll back changes. Develop is the under construction version of the project, the one currently being altered. Currently the turnout changes are in the develop branch but will likely be moved to the master branch in week 4. Below is a video of the current state of the project (You may have to zoom in to see the turnout sprites).
Blog: Week 3
by
Tags:
Leave a Reply