Hi all. Been having some fun (and frustration) working on the roguelike challenge. I’ve got the core gameplay down and I’ve moved onto the graphics. However whenever I move there is often a noticeable and painful flicker. My thoughts on this are that the images have to load each time the screen is redrawn and that’s what’s causing flickering. I feel like it would make more sense to load the images in once, presumably when the screen component mounts, but I’m not sure how to do that so they can be referenced in the update function. Or I could be wrong, I’m not sure.
If you could take a look and tell me how if could do better (obviously don’t click this if you’re prone to seizures, it could be dangerous!) that would be great. The screen component starts on line 138.
https://codepen.io/jsanderson/pen/JLRYBg
(obviously the graphics are placeholders so don’t mind the mess)