This came out of nowhere, right? I decided to make a customizable scrolling out of boredom and it turned out pretty good I might say. I got convinced by @MartinArthur to release it, so here it is lol.
This scrolling in general takes only 2 lines of code!
You can simply copy the Camera object and its code, it calculates the window's resolution, so do not worry about changing any values in the code! Although, I recommend using it for 16:9 resolutions.
Only change the Virtual Width of the frame. (Change Virtual Height too if you want Y Scrolling.)
Also, make sure to change these settings for objects that are outside the frame area. It is REALLY needed to be done.
For the Camera object, you can change these 2 values to anything you like!
For newer CF version users, you turn off or on flags in properties.
For older CF version users, you simply turn the flags in the Start of Frame event.
flag 0 being Scroll X and flag 1 being Scroll Y
https://www.mediafire.com/file/n8ytia1qb1s21sb/Customizable_FNAF_Scrolling_Example.mfa/file
Watch for future updates!
Update 1 (May 24th 2022):
Added subpixel precision.
Update 2 (May 25th 2022):
Added Y Scrolling.
Update 3 (June 24th 2022):
Replaced maximum and minimum calculations with range calculations. (Makes no difference in behavior, but makes the code look less messy.)
Added more showcase options.
No credit is needed. Enjoy!
If you encounter any issues or if you're unsure about something, make sure to tell me and I'll answer!
24 comments