Start with a blank Unity project and create the scenario in this youtube video:
Description:
- There are 10 “traffic lights” arranged in a circle of radius 10 centred around the origin (0,0,0).
- Each traffic light cycles through green, yellow and red and then back to green again. Traffic lights stay green for a random time of between 5 and 10 seconds.
- Traffic lights go yellow for exactly 4 seconds always.
- Traffic lights stay red for a random time of between 5 and 10 seconds and then go back to green again.
- When the program starts, each traffic light is set to be red, yellow or green randomly.
- The purple “car” picks a green traffic light to go to at random.
- It should only ever go to a green traffic light.
- When it arrives at a green traffic light it should pick another green traffic light to arrive at.
- If the traffic light it's heading for turns yellow or red when it's on the way, it should pick a different traffic light to go to.
Marking Scheme:
Description Marks
- Implementing the traffic lights 35
- Car movement 25
- Car AI 20
- Polish & flair 20
Marks will be awarded for creative, modular, efficient and reusable solutions that adhere to Unity idioms and coding practices.