Devlog 4
So i decided to really polish it up.
i fixed a ton of bugs with the lower pendulum while its being grabbed.
I also thought that the simulation was a bit confusing so i made a short intro sequence teaching the player the controls and what to do.
I also added a button that applies a random force to the pendulum, a button that slows the pendulum down by increasing friction, and a button that shows the controls on screen.
Furthermore i added some nice quality of life features like the hitbox of the green handle becomes bigger the faster it is making it easier to grab while its spinning fast.
Oh and i added a little color change when grabbing which isnt very noticeable but a nice touch.
And last but not least i used claude to add some of the async stuff required by pygbag to convert it into html to be run on itch.io as a demo without downloading anything.
I also quickly made a nice logo for this in inkscape which i think looks nice.
So hopefully i can release this now!
Devlog 3
added dragging the top pendulum which caused tons of headaches (image 3). it kept spinning insanely fast. but i managed to fix it.
i also added a nice fade out effect for the trails, added a pause button, added a reset button and added increasaing and decreasing the simulation speed.
overall im pretty happy with how it turned out!
Devlog 2
fixed a bug where it would randomly crash because the momentum overflows and cant be stored anymore.
There was also a strange issue where it kept slowing down and losing energy even with friction set to 0.
I fixed this by switching from eulers method to RK4.
I also added a nice trail that follows it around, centered it on the screen and adjusted the screen size.
Next up i need to add grabbing the pendulums so you can move them around and play around with them. And i need to add some text on screen showing all the velocities and stuff.
Devlog 1
setup all the basic formulas and physics. Got it to render the pendulum.
now i need to add grabbing the pendulum and making it prettier.
Devlog 1
I added a function to track how much time the robot spends on each tile. this is needed to “reserve” tiles in the future so other robots dont collide. this gave me a headache as it just would not work!
but so far everything is going good. next step is to add another robot and setup the A* pathfinding.