You'd think this would be faster, but NO!!!!!! [Resolved]
#17
(10-14-2022, 07:25 PM)Pete Wrote: Did you run my 2 code examples?

That's why I posted the two code examples in post #14, because by those few lines alone, I can't find it either. We need to include the accompanying animation code. With the accompanying code, there is an estimated 5x speed difference in how fast the alien ships move on the intro screen. Since the only difference in the two code snippets is the two ways shown to use SCREEN(), something involving that function sure seems to be the only thing causing the animation slowdown. 

Pete

Code 1 was definitely faster than code 2. I'm always looking for ways to optimize code (do ... loop instead of for ... next for example). It seems counter-intuitive to have functions called over and over again instead of just once to get faster results. Maybe a section in the Wiki on optimization techniques would be beneficial. When better ways are discovered they can be added to the entry.
Reply


Messages In This Thread
RE: You'd think this would be faster, but NO!!!!!! - by TerryRitchie - 10-14-2022, 08:33 PM



Users browsing this thread: 8 Guest(s)