Mage Madness Topic

Hi there! I currently want to expand upon my “Micro Mages Clone” game Micro Platformers. Its code is as we call it la garbage and the game itself showed a lot of promise. The only thing that was holding me back was my limited knowledge of OOP and programming in TypeScript. Besides that I didn’t know makecode arcade very well so I could’ve done some things wrong.

Anyway, back to the point. This will be the topic for my platformer game. I will post bugs/problems I found and that I need help with and I will also post updates. Currently the game only features a scrollable tilemap with a “lighting renderer”. The problem i’m having here is mainly a performance concern. Currently i’m drawing 15 times 20 8x8 tiles on the screen which decreases fps on my hardware to around 5 fps. (last time I checked) The lighting renderer suprisingly doesn’t decrease fps that much.

But how do I optimize this? Perhaps make a screen buffer before it draws that to the screen instead of individually drawing each tile on-screen? I would not know how to implement this. How does the built-in tilemap perform so good performance-wise? If you have any suggestions for optimizations please reply down below.

I’d like to mention my makecode arcade hardware died in the making of this simple demo. I was testing a program which makes a gigantic list to test the limits of its ram and it hasn’t turned on since. If any makecode arcade developer sees this you could perhaps make a kind of mode where the performance is the same as on hardware. (you can choose between different cpu’s) This would make it easier to find and make performance improvements as you are simulating what real hardware would do. You could also make this mode limit RAM to that of the hardware’s, but not make it crash when it reaches its limit. You could instead just make it give an error.

The github repo is public, take a look at it if you want:
The code i’m having problems with is located under renderer.ts at the function drawTiles

1 Like