Skip to main content
Yos233's user avatar
Yos233's user avatar
Yos233's user avatar
Yos233
  • Member for 11 years, 10 months
  • Last seen more than a month ago
  • West Lafayette, IN
Loading…
comment
Pathfinding avoid a list of polygon
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.
comment
Representing realistic population
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.
revised
Ice sliding physics
Expanded on physics answer, grammar
Loading…
answered
Loading…
revised
Loading…
Loading…
awarded
comment
Lateral Friction Phisics
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.
comment
Lateral Friction Phisics
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?
comment
Lateral Friction Phisics
The heading is independent of the velocity. The entity could be pointing north, but moving north-east.
asked
Loading…
awarded
revised
smooth movement pygame
added 5 characters in body
Loading…
comment
smooth movement pygame
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.
awarded
answered
Loading…