was8bit 2021-09-27 07:31 (Edited)
Testing extreme scrolling...
Buggy and such... but that i was half asleep when i coded this, and it kinda works, is a small miracle!
-SkyLock24- 2021-09-27 11:50
This is SO awesome! 😱🤯🤩 Little buggy tho
was8bit 2021-09-27 13:01
Thanks..... and ya, VERY buggy.... i just threw the code together very quickly...
... i was really testing the scrolling concept... it has a tiny pause every update, so not really the best approach...
SP4CEBAR 2021-09-27 21:37 (Edited)
You could make it chunk-based
In my adventure engine I used chunks that are 8 cells wide so that they can be refreshed inside the 32-20=12 blocks of hidden background space
was8bit 2021-09-28 01:04
Yours runs very smoothly... i will have to study your code to see your "tricks" :)
SP4CEBAR 2021-09-28 06:42 (Edited)
Thanks! It took a while to get it working, basically what it does is it has one variable that stores the number of the leftmost loaded chunk, the next 4 chunks are loaded,
If the current scroll value\64 is more than the stored chunk value then we need to call the chunkloader on the right, if the scroll value\64 is less than the stored chunk value then we need to call the chunkloader on the left
In either case the stored chunk value will be set to the scroll value\64
When the screen scrolling goes negative, everything mirrors (because thats how mod works) so I used variable which is one when it's negative and zero when it's not
was8bit 2021-09-28 12:15
Your code is highly sophsticated :) but i was having abit of trouble pulling it apart (sleepy brains).. so i decided to try to blend Timo's code in with mine... his has great sprite to cell detection along with scrolling and also i have worked with his code before....
SP4CEBAR 2021-09-28 13:22