Simulates simple gravity of objects floating in space. Whole program is written in python tkinter. It supports dynamic addition, deletion and modification of bodies, also with copying them.
PS. the recorded time is quite high, because I spent a lot of time testing and correcting different errors, because I wanted to make it without AI.
No followers yet
Once you ship this you can't edit the description of the project, but you'll be able to add more devlogs and re-ship it as you add new features!
Tested different ways to render objects on canvas, and stick with the one that worked the best. Also in readme in repository added tutorial to compile python file into executable. And removed those 4 static objects from simulation.
Added modification of already placed object, now if already placed object is clicked, the menu will pop up and show that info about it. Also added option to change center in pop up menu. And lastly, now it is possible to copy selected objects by pressing c key.
Added info menu in top right corner of canvas. It displays the scale of simulation, and if it is running or paused.
I split the code into different files, also removed simulation toggle button and binded space bar to toggle simulation.
Added dynamic addition of bodies. When canvas is left clicked, new body is 'created' and its attributes can be changed, to see change to take action you need to press Enter key, and to create the body, so it will be simulated along with other bodies, you need to press left Alt. Also by pressing right mouse button you can delete the previewed body. Following attributes can be changed: mass, radius, color, x component of velocity vector, y component of velocity vector.
Added gravitation pull between objects. Also encountered bug with tags in tkinter canvas, and spent around hour fixing it. Currently you can add objects only from code statically, not by clicking mouse.
Now I am able to add objects into the game, they are simple structures with mass, radius, color, center and velocity data members. Velocity is not implemented yet. And radius and center of object have to be scaled by 1e10, because that is default scale of the game, this is done for better accuracy.
Set up game screen and basic game loop alongside with option to leave by pressing Esc key.