GSoC 2023 with Sugar Labs | Week 6 | Music Blocks (v4) project updates

Hi everyone, welcome to the GSoC’23 Blogs, Index 1, with Sugar Labs – the second blog of the series where I am documenting my complete journey as a contributor for Google Summer of Code 2023 under Sugar Labs for the Music Blocks (v4) project. If you haven’t checked out the previous blog yet, then you should definitely go through it here.

In this blog, I would like to share what I have done during the last week and the overall project updates.

Week 6:

This week, I worked on implementing the bounding boxes and coordinates for the args and notches for the bricks. I implemented and fixed the calculations to get the extent and coords values for the args and notches for all the bricks to detect the positions (x, y coordinates) and bounding boxes.

Detecting the height, width, bounding boxes, and the proper coordinates of the attachment points (args and notches) is vital for the project. We’ll be only able to calculate the collisions and the adding and removing of the bricks after these initial calculations. These brick instances will now give us these precomputed values which we can use while detecting collision.

I basically calculated the values using the constant variables values which were already present while generating the path. I carefully measured those values while considering the stroke width and other conditions. Calculating considering the stroke width was one of the hardest challenges because it comes with different values for different positions and directions.

But, finally, I made the Pull Request for all of these calculations and values: #354

We’re also planning to add a flag in the brick components, enabling which draws the bounding boxes (rectangles of different outline colours) over the bricks, to visually verify the calculations are correct. I’ll also add some tests for the file and the methods.

These calculations have unblocked our path to start working on the workspaces, dragging the bricks, detecting collision between the bricks and taking actions (attach or detach) based on the movement and positions.

Also, the midterm evaluation for the Google Summer of Code is going on, and I’m highly excited and hoping for the best results and a longer collaboration with the Sugar community.

In the coming weeks, I look forward to making more progress on the project. So far, I hope you’ve enjoyed reading about my progress. I’ll be back with new updates about my GSoC journey soon.

Also, don’t forget to drop a star on the project GitHub repo! ⭐
Link: https://github.com/sugarlabs/musicblocks-v4

You can connect with me on LinkedIn. Additionally, you can follow me on GitHub and Twitter, it will be appreciated.

Thank you for reading!