Skip to content

Latest commit

 

History

History
135 lines (113 loc) · 3.89 KB

README.md

File metadata and controls

135 lines (113 loc) · 3.89 KB

Practice #1 - Threading

Sources: https://github.com/DanteFanaBadia/threading

overview

Document Purpose

This document has as purpose to define in big scale all project decision and component.

Goals

  • Define the technology stack 
  • Define the solution overview 
  • Document the reason of the technology selection

Audience

  • Professor and monitors: to evaluate and get feedbacks from them.
  • Peers students: to share knowledge and ideas.

Solution Overview

The solution is a traffic light simulation using thread. The main idea behind this is to sync the semaphores, so only one have the green light and the carts avoid collisions.

Domain

Domain

Thread sync

For the thread synchronization process, we use conditional variable to notify when the thread is available, and the other thread can process with the execution also we follow the architecture of shared memory model to sync the thread information.

Components

References

Scope

  • [*] You have the freedom to place the traffic lights at the points where the desired flow is resolved.
  • [*] You have a budget to purchase a maximum of four traffic lights.
  • [*] You must check that there are no collisions in the traffic flow.
  • [*] You must animate your simulator with black arrows or car figures, giving the sensation of a real flow based on the traffic lights (red, green, yellow).
  • [*] You must control the speed of the simulation with three options for the user:
    • Fast Simulation.
    • Intermediate Simulation
    • Slow Simulation.
  • [*] The speed of each option must be parameterizable, and the user can adjust the seconds they want for each option (fast, intermediate or slow).
  • [*] Consider enabling an option to reset the speed to default values.
  • [*] The visual design of your program is free, but it must respond to the flow shown in the previous diagram.

Technology Stack

Here is technology stack benchmark and selection.

Decision Alts Pros Cons
Programming language: Python
  • Java
  • C#
  • Javascript
  • Developer knowledge
  • Native thread support
  • Simplicity
  • Only have open sources game engine and are more complex
Game engine: Pygame
  • Unity
  • Cocos2d
  • Better performance
  • Simplicity
  • Pythonic (is pure python tool)
  • Big community
  • No GUI
  • Have to handle all in code
Level design toolkit: LDtk
  • Tiled
  • Simplicity
  • Big community
  • Open source
  • Unstable tools, still on beta