Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:40 23 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MMBasic: Knightmare game, sprite artifacts and xinput

Author Message
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 537
Posted: 04:51pm 25 Feb 2024
Copy link to clipboard 
Print this post

Peter, maybe you can help me to understand this issue.

I think I found the problem that generated artifacts while playing the game. It only happens if I am playing it with the gamepad. On pressing A to fire, I was creating the shot sprite from inside the handler, the sub called by the "gamepad on" command, which I think was creating the artifacts. The artifacts issues disappeared after moving the sprite creation to the game's main loop, now being the handler only responsible for setting a variable that indicates to the main loop to create the sprite.

Could it be caused by a race condition between two threads in the MMBasic interpreter? Does it make sense to you?

 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025