09-30-2025, 07:13 PM
Quote:Yes, my prog first checks for boundary overlap, then if those intersect, it compared the bitmask arrays of the overlapping areas for overlapping pixels, comparing 2 precalculated 2D boolean (_BYTE) arrays. It's fast enough on my PC but @Herve was citing some low FPS performance testing on their machine (not sure what hardware Herve is running or how they're measuring FPS, plus they're on Linux & I'm on Windows. How fast or slow is my prog on your computer?)About my setup: Raspberry Pi 500
Operating System: Debian GNU/Linux 12 (bookworm)
Kernel: Linux 6.12.34+rpt-rpi-2712
Architecture: arm64
Window manager: X11
Regarding the FPS measurement, here is how I implemented it.
For information, this does not take into account the midnight correction mentioned in the TIMER(function) documentation.
before the main loop
Code: (Select All)
t = timer(.001)
fps% = 0
frames% = 0Code: (Select All)
frames% = frames% + 1
if timer(.001) >= t + 1 then
fps% = frames%
frames% = 0
t = timer(.001)
end if
color &HFFFFFFFF, &H00000000
_printstring (1,1), "fps:" + right("000"+_tostr$(fps%), 3)Quote:Hmm, so _button doesn't work in Linux for the keyboard? I wonder if that's the case for Mac as well?About the _BUTTON function that does not work with my X11 setup: I don’t know whether it also fails under Wayland or with any other Linux configuration.
Quote:They work for these vector shapes - even irregular shapes, in Herve's case - but how would you use these to detect collisions between the raster characters my program is using? Would each characters need to mapped to an equivalent vector shape?Indeed, converting a bitmap image to a vector shape is not simple; what we care about is obtaining the shape’s contour. That should be achievable using simplified contour-detection and vectorization techniques. It’s probably a topic I’ll look into; my TODO list keeps growing!
And thanks to Steve about _ORELSE and _ANDALSO which I missed. I’ll update my code right away to improve performance a bit more.

