Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Does your pathfinding need to update when the terrain moves? If so, it will require a lot of computation to recalculate each body's path every frame. You could make it so whenever something hits a wall it regenerates the node graph and makes a new path.
How much micro-management do you want the player to have? Does the player build everything in the city, or could you have a governor (like in Civ) manage the city for the player according to a growth curve.
I do not understand why the impulse I apply to my object does not cancel its lateral velocity. I'm looking for an overview of my code, to help me see if I misplaced a variable. If code help belongs on StackOverflow only, I'll gladly ask it there.
I do not have a desired velocity. I have the heading an object is pointing, and it's current velocity. I could not just rotate the velocityvector to match the heading, that would not be physically accurate. ---- While the heading could be a vector, I think it is easier to keep it as an angle, then convert it to a normalized vector on demand. If I do not use angles, how would you suggest I rotate the heading of an object 45 degrees? How would I calculate how much force to apply to each axis as a result of engine thrust?
That was an interesting problem. I thought pygame would take floats (it does for blit, but not draw). What I did was put the int() around the newx inside the draw.circle method, so that while draw.circle received an int, newx was still a float. Have edited into my answer above.