AquaCapy
- 2 Devlogs
- 3 Total hours
A fun little physics program! This is my first proper Go project! All resources used for learning, debugging, or boilerplate code were referenced at the bottom of the main.go file!
A fun little physics program! This is my first proper Go project! All resources used for learning, debugging, or boilerplate code were referenced at the bottom of the main.go file!
I got it working! I plan to rewrite the entire collision function (the thing I just spent a few hours on lol) because I got kinda lost in the code. Also, it’s still massively buggy! They randomly gain energy, so I’ll try fix that! I want to simplify it, now knowing how it should work! I started writing a README, but I actually don’t know much about how the project will work, so I’ll need to plan it out further! Anyway, getting there!
A fun lil physics app/game! I’m learning Go through it. So, here’s what I did! I first tested a few different ways to display the objects, and found Ebitengine, which I decided to use! Then I make a struct to hold each particle’s data. I then made a system to accelerate them each frame until they reach the bottom of the screen. It sounds simple, but my lack of experience in Go made that quite a challenge! XD Anyway, after I did that, I managed to find a good value for gravity. Then I added some damping and ✨ bounce✨ Then I tried optimising it! I used Gemini AI to learn more about how the library draws objects, then saw in the docs how to position images! I then tried drawing a pixel art image, but - after consulting Gemini again, realised that it’s better to just dynamically render it at the beginning of the program running. (NO AI CODE!!!) After figuring out the options, I managed to get these little pre-rendered balls to work! And REALLY well! It now runs 250,000 objects (M2 MacBook Air) significantly faster than it previously ran 5,000! It’s not much progress for almost 2 hours, but I’m glad that I was able to do this all! (This is my first real Go project, so I’m happy :D)