borntofrappe / code

Explore software
0 stars 0 forks source link

Demo — Fireworks #12

Closed borntofrappe closed 3 years ago

borntofrappe commented 3 years ago

Recreate this demo from the coding train website.

borntofrappe commented 3 years ago

The fireworks provide an intriguing visual for a congratulatory message, like that for the victory screen of a game.

borntofrappe commented 3 years ago

I am interested in developing the demo with Lua & Love2D, and there is an interesting situation here: Love2D has a particle system API, and this API is able to create the simulation of the particles with little concern for the physics involved.

Consider crafting two demos, without and with the mentioned API.

borntofrappe commented 3 years ago

The first purpose of the project is to explore the physics described by the lecturer in the vector for the velocity, vector for the acceleration and force of gravity. This is why the demo without the particle system API takes precedence.

borntofrappe commented 3 years ago

A rough sketch for the project:

Bonus points for the following features:

borntofrappe commented 3 years ago

I completed the demo with Lua and Love2D. The implementation is rather different from that of the lecturer, but uses the same foundation in terms of physics.

I'm quite satisfied with the end result (see clip which follows), and especially with the size of the particles, which is reduced until the firework completely disappears. A small touch, which makes a considerable difference.

https://user-images.githubusercontent.com/33316703/103358607-45c56600-4ab6-11eb-8c83-4b1caacdb313.mp4

borntofrappe commented 3 years ago

For the heart-shaped firework there is a coding challenge which might help, but I need to research the topic.

borntofrappe commented 3 years ago

Completed the project. I updated the way the particles move from the point of explosion so that the circles spawn in a circular pattern or following the shape of a heart.

https://user-images.githubusercontent.com/33316703/103384298-36660d00-4af6-11eb-88e7-a4f532b11ac8.mp4