So here's something I've discovered when programming the light system for Wonderflonium. Pretty much, don't fill your entire screen with one color using GPAINT; use GFILL instead. To make the light system work, I am just making the screen dark and lighting up areas around light sources. To make the screen totally black, I used GPAINT at first. But this dropped the speed all the way down to an inconsistent 50 FPS, which caused all sorts of bad things like a BG flicker. But when I switched to GFILL, the program ran at a smooth 60 FPS, which looked so much better (especially since I have weapons animated with SPANIM.) I believe this is because GPAINT uses some sort of algorithm to find pixels of the same color, while GFILL only fills the specified area and doesn't have to check if it's allowed to fill certain pixels.
7 Comment(s)MZ952Intermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthThird YearMy account is over 3 years oldWebsiteReadingI like to read books!HobbiesWait... Some people use GPAINT to clear the screen???
*Visible alarm*randoIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthThird YearMy account is over 3 years oldWebsiteAvatar TabooI didn't change my avatar for 180 daysWebsiteWhat I did was GCLS then use GPAINT to make everything black, which was slow as hecksnail_Power UserQSP Contest 1 Contest ParticipantI participated in the first SmileBASIC Source QSP Contest!HelperReceived for being very helpful around SmileBASIC SourceAchievementsAmazing ContributorSomeone thinks I'm an awesome person who has done so much for the community!AchievementsGCLS color will clear the entire graphic page with the specified color. 12Me21Syntax HighlighterReceived for creating the code syntax highlighter on SBSNight PersonI like the quiet night and sleep late.Express YourselfWell, it's faster to use GFILL if you just need to fill the visible part of the screen
GCLS:GPAINT 0,0,#RED: 70 per second
GCLS #RED: 1200 per second
GFILL 0,0,399,239,#RED: 2900 per second
snail_Power UserQSP Contest 1 Contest ParticipantI participated in the first SmileBASIC Source QSP Contest!HelperReceived for being very helpful around SmileBASIC SourceAchievementsAmazing ContributorSomeone thinks I'm an awesome person who has done so much for the community!AchievementsWhat if you use GCLIP? chickenDeep SleepHiddenWebsiteGCLIP 1,0,0,399,239 lets GCLS match GFILL.randoIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthThird YearMy account is over 3 years oldWebsiteAvatar TabooI didn't change my avatar for 180 daysWebsite12me21 I actually used GCLS anyway
Maybe I should change that...
EDIT: It's changed and it works properly. The way I handle it is pretty much IF DAY THEN GCLS ELSE GFILL