Today I spent all my time on from_scratch.py to really get to understand the physics of it all. Before, I just relied on a few formulas.That’s why I’m going to try and maximize my gains from this project by re-understanding all the logic and trying to write it from scratch, using only my notes and not looking at any AI or code from main.py.It’s going good! I added quite a few functions:- A distance function- A force function- An angle function (all of these take two objects, by the way — I still have the same objs list, which is a list of lists)- A velocity update function called velo_update that takes an object, a force, angle, and mass, and updates the velocities of those objects depending on their forces, angles, and massMaybe I can cut back on mass. I don’t know why I added it, since we can already get it from the objs list with our object parameter. I’ll look into that.I also created the scaffold for an update function, which is going to be the main function. I added screen.ontimer(update, 10) to run it every 10 milliseconds. It’s just the main scaffold for now, but I’m really focusing on the logic of it all.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.