08-16-2023, 02:24 AM
I would think that it would be sufficient to check that sounds, images and fonts load correctly at startup. Once they're there, they're there and can be used until they're freed. As for bogging down, I'm generally less concerned about memory usage than I am with CPU load. As long as your memory isn't steadily ticking up, or doing so at specific points in the program, you should be OK.
Using hardware images should help with CPU usage, if you have a lot of images that move around but don't change frequently. That helped me with my billiards program, where the balls moved about the table, but didn't roll.
Move as much of the math as possible outside of loops, and stick to integers and longs if you don't need the precision.
If you're drawing large and/or complex graphics that move beyond the display, you should use algorithms that skip such drawing when a feature is out of the display bounds. That was a big issue with my space flight simulator that took me months to figure out.
Using hardware images should help with CPU usage, if you have a lot of images that move around but don't change frequently. That helped me with my billiards program, where the balls moved about the table, but didn't roll.
Move as much of the math as possible outside of loops, and stick to integers and longs if you don't need the precision.
If you're drawing large and/or complex graphics that move beyond the display, you should use algorithms that skip such drawing when a feature is out of the display bounds. That was a big issue with my space flight simulator that took me months to figure out.
DO: LOOP: DO: LOOP
sha_na_na_na_na_na_na_na_na_na:
sha_na_na_na_na_na_na_na_na_na: