Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error doing image collision detection with _MemGet
#35
Wow man, amazing work! Redefining the characters must have taken you a long time — I’m impressed!

My Linux setup doesn’t recognize the _button instruction to read the keyboard, so I couldn’t move the player or make them shoot.
Everything else works well: rendering, robot movement, and collision detection are fine.

To gauge performance I added an FPS counter. All tests were done with the default size 3 for the player and robots. I also varied the resolution to see the performance impact (the higher the resolution, the fewer collisions). Results:
  • 127 robots and 0 large robots: 38 FPS at 640×480.
  • 42 FPS at 1024×768.
  • Lowering to 320×240, it’s impossible to run with 127 robots — the initial placement algorithm loops because it can’t find non-colliding spots for all robots; at that resolution a placement of 100 robots succeeds and gives 40 FPS.
  • With 0 robots and 100 large robots, performance drops — at 1024×768 we fall to 12 FPS.
Finally, to confirm performance depended on the pixel-overlap detection technique, I disabled it and kept only bounding-box detection: at 1024×768 with 127 robots we get 47 FPS, and with 127 large robots 20 FPS. Pixel-perfect detection has a significant cost. It’s fun to dig into, but if your goal is a game with many sprites you should prefer other, more performant techniques.
Reply


Messages In This Thread
RE: error doing image collision detection with _MemGet - by Herve - 09-27-2025, 09:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Collision Detection NakedApe 12 332 02-26-2026, 01:01 AM
Last Post: NakedApe
  Mac debugger not connecting, a user error! BlameTroi 0 101 02-07-2026, 06:18 PM
Last Post: BlameTroi
  ERROR MESSAGES COLORS ? aurel 5 393 01-02-2026, 11:26 AM
Last Post: aurel
  Using CONST & _RGB used together seem to error... Dav 12 706 12-12-2025, 12:29 AM
Last Post: Dav
Photo from png tile, create symmetrical screen image hsiangch_ong 11 954 08-23-2025, 01:23 AM
Last Post: bplus

Forum Jump:


Users browsing this thread: 2 Guest(s)