I'm developing a platformer heavily inspired by Super Mario Bros 3. Progress has been smooth overall, but performance is a major issue. Even on my mid-high-end desktop, I'm only getting 7-15 frames per second, which is almost unplayable.
The project runs on a single forever loop that broadcasts all the code, and I'm at a roadblock about how to optimize the code any further. (Unless I resorted to using JavaScript).
The project constantly checks and changes several lists for tile and enemy data, which I suspect is causing the majority of the lag.
I've heard that converting sizable portions of code dealing with lists and complex operations to JavaScript can significantly improve performance. However, I lack experience with JavaScript and prefer not to delve into the source code.
If it were easy to learn the [ JavaScript function () {} ] block solely for just manipulating and reading lists, I'd be willing to tackle that. However, I find it extremely difficult to find online forums that tell you how to do this except for "just read the source code", but integrating the source code into my project and understanding how the JavaScript block aligns with it is unfamiliar territory for me.
How have you tackled performance optimization challenges in your projects, especially when dealing with extensive list manipulation? Any tips or strategies would be greatly appreciated!
(For the time being, I'm keeping my project private as I plan to release it only once it's completed.)