Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:32 26 Nov 2024 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: 479
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.

© JAQ Software 2024