From: Ron A. <rr...@ro...> - 2008-01-11 22:37:14
|
I made some changes to the VSpace.py Demo I posted earlier. Velocities are now time based instead of frame based, so that things should appear to move at the same speed on different speed computers. The frame rate is limited by adding and removing asteroid objects. So the number of asteroid objects acts as a rough bench mark. On my system I get 220 asteroids at 60 FPS. Your mileage may vary of course. ;-) Rotation of the world is done all at once by rotating the parent "space" frame instead of rotating frames individually. You can zoom in and out of the field of view by pressing both mouse buttons at the same time. This allows you to see how everything moves relative to the view. This was disabled before. The objects, asteroids, sun, stars, ship, are implemented with classes with an "animate" method. This groups related code together in a much nicer way. Enjoy, Ron Adam |