Memory Use Guidelines
#4
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.
DO: LOOP: DO: LOOP
sha_na_na_na_na_na_na_na_na_na:
Reply


Messages In This Thread
Memory Use Guidelines - by NakedApe - 08-15-2023, 09:22 PM
RE: Memory Use Guidelines - by mnrvovrfc - 08-15-2023, 10:18 PM
RE: Memory Use Guidelines - by NakedApe - 08-15-2023, 10:58 PM
RE: Memory Use Guidelines - by OldMoses - 08-16-2023, 02:24 AM
RE: Memory Use Guidelines - by SMcNeill - 08-16-2023, 05:40 AM
RE: Memory Use Guidelines - by NakedApe - 08-16-2023, 06:57 PM



Users browsing this thread: 2 Guest(s)