You are browsing as a guest. Sign up (or log in) to start making projects!

4h 46m 5s logged

Ayy almost 5 hrs today !! :yay:

Changes:

  • Fixed attempt square and attempts not wrapping as expected
  • Fixed color being stuck in chessboard when same square is clicked rapidly
  • Added color menu popup when click color button in sidebar
  • Added time menu popup when user clicks time button in sidebar
  • Added Progress component in sidebar with working score
  • Made timer in progress.jsx functional

Fixing the user attempts in the was pretty easy. I just added a attempts container to wrap the attempts element and then the CSS work as expected.


Fixing the red or green colour being stuck in chessboard when clicked rapidly was a headache to fix. I was trying my best and at last I came up to the decision that I needed a timeline for the animation before the animation was played the progress of the animation should be zero. I tried that and obviously that didn’t work but it seems that I was close to the answer. I used Claude to figure out the answer and Claude used killTweenOf gsap function to remove the animation before the animation was even played. It also added a onInterrupt property to the animation which basically reverted the stuck colour after killing the animation. I didn’t want to use Claude, but I just couldn’t figure it out and I think it was better to use Claude as I have never used those functions and properties of gsap. Also Claude made that portion of my much cleaner. Seeing this now, I will be more focused on the cleanliness of the code because claude showed me that my code was repetitive and how it could be made smaller and easy readable.


I decided to make the colour menu pop-up and time menu pop-up straight by coding instead of designing it first as I should have. As you can see, the result is very terrible. I am sure definitely fixing it in the next devlog. I was force thinking of making a pop-up menu component and using them in both buttons but I found that it was a hassle and not worth it. Only the white and black button in colour pop-up menu work. They just rotate the board and that’s all I still need to add functionality to them.


After learning the lesson that I should definitely design before coding. I started designing the progress component. Although there isn’t much to design there I definitely would have made it as bad as the pop-up menus. While coding this, I also made the score display the total number of correct at attempts which was pretty easy. I just had to add one digit whenever the chose the correct square.


Then, I started working on the timer. The timer would have been really easy if I just used setTimeout every second but I like to torture myself so instead of just doing that, I challenged myself using date constructor. I have done this before but it has been sometime and I remember how it worked. The countdown started from 28 which was frustrating. Now, I have just completed that but the code is really messy. I will definitely fix that tomorrow or today as I might post this devlog tomorrow.


I think that shorter devlogs do better in terms of views. I’ll try that next time. See you in the next devlog 👋.

0
31

Comments 5

@PAPER_01

Awesome!!!!!!!!!!!!!!!!!!!

@Sam

Thanks @PAPER_01 💖 You’re the best 🫶

@PAPER_01

(⁠ ⁠╹⁠▽⁠╹⁠ ⁠)

@arjun_

looking good!

@Sam

Thanks @arjun_ Really appreciate your comment 💖