AE-CAR SIMULATION

An autonomous car simulation on the road with ranging speed. This project is a simple animated program that shows how an autonomous car works.

ae : the combination of the real world and technology.

programming language: p5js

How to use:

  • Enter Start simulation
  • Right-key Speed-up car
  • Left-key Slow-down car/brake

Inspiration

We wanted to create a program that could show or solve real-world problems. With the collaboration of engineering and computer science, we decided to focus on the topic of speed. As the autonomous car has been the most current trend, we decided to make a simulator that shows how an autonomous car work, using a program. Hence, we came up with the idea of creating an animated simulator program that could simply show it.

What it does

The car will move according to its speed that has been set automatically/randomly by ae-car (reminder: not a real simulation!). Users could do interaction using the left and right keys to speed and brake. When the speed is too high, a warning will be given out according to the range of the speed. When the user speeds for too long, the car will automatically slow down.

How we built it

Using javascript/p5js programming language, specifically p5js library. Most drawings are created from shapes, by code. At the same time, the car is drawn digitally and uploaded as a png image. In order to make as if the car continuously move, the background is shifted in x-coordinate in every loop. The amount of shifts depends on the speed of the car that has been set as random. All interaction is declared in the draw function, so the program could be animated.

Challenges we ran into

Making the car slow down after the user speeds the car up above the speed limit, using the right arrow key. The most challenging part is timing the right key pressed in a loop, and changing the speed of the car even if the key is still pressed.

Accomplishments that we're proud of

It was very challenging that we need to create a program/software in 24 hours since it is our first time joining a hackathon and it's our first year in the computing world. There were struggles, especially with debugging and using certain functions. We are proud that we could successfully create a program that could fulfill our goals and increase our experience.

What we learned

we learned the programming language, javascript to an extent. In the process, we are able to improve our skills in coding, enhance collaborative work, and work effectively in a short amount of time.

What's next for AE-CAR SIMULATION

In the future, we would like to not only improve the design but also make the speed transition smoother and add more features to the program. It might also be possible that we could add a simulator from the driver's perspective.

Built With

  • p5js
Share this project:

Updates