I'm Making a Small RPG and I Need Feedback Regarding Performance
This past month, I’ve been working secretly on a small RPG game.
While the game is not ready at all and I didn’t plan on talking about it, I’m now kind of forced to.
I’ve been using JavaScript + the KAPLAY game library to make this game but I’ve been experiencing performance issues. However, it seems that others aren’t experiencing them so now I wonder, is it just my machine?
I’m using a Macbook Air M3 with 16GB of RAM. Normally, things should be smooth and they are when playing the game in the browser via Firefox.
However, since I’m making this game with Steam in mind, it’s especially important that the game performs well when wrapped as a desktop app.
For this reason, I decided to reach out to you, my audience, for feedback. I have included a build of the unfinished game for Windows, Mac and Linux. It would be very nice if you could try it out on your machine. Additionally, recording gameplay and sharing the link in the comment section of this post would be greatly appreciated.
Here is the link to the game in its unfinished current form : https://jslegend.itch.io/small-rpg-performance-playtest
Below is a gameplay video to give you an idea of how the game is supposed to be played. You can move around with arrow keys and enter battle by overlapping with a star in the overworld.
Performance issues, if any, occur mostly during battles.
Thanks in advance!
UPDATE 7/11/2025 : It seems that this post was shared on Hacker News and is getting more attention than usual! If you’re new to my Substack and are potentially interested in updates regarding this project, I recommend subscribing.
In the meantime, you can read some of my previous posts!
Export Web Games for Desktop in One Click
In a previous post, I tackled the various options one could use to make their web games playable offline as installable desktop apps. This would enable using web technologies to make games that could be sold on a platform like Steam.
You Can Now Make PS2 Games in JavaScript
I recently discovered that you could make PS2 games in JavaScript. I’m not even kidding, it’s actually possible. I was working on a project and had my phone near my desk when I received a notification. Upon further inspection, it came from itch.io which was a platform where I usually published most of my web games.





I love the battle mechanic.
I could reproduce the performance issues, they just appeared after a while, even without walking around. Causing (temporary) frame drops, for example by resizing/minimizing, seems to speed up reproduction.
Digging deeper, I narrowed the slowdown I observed down to this logic in the Kaplay library:
https://github.com/kaplayjs/kaplay/blob/master/src/app/app.ts#L373
fixedUpdate is getting called in a loop there, but under normal circumstances should run about once per frame (every 1/50 secs). If frames are drawn <50fps, it will be called a few times to catch-up, say 2 or 3 times. However, when reproducing the slow down, it was getting called hundreds of times per frame, and again each subsequent frame.
The problem is that `fixedAccumulatedDt` keeps increasing over time. It's not properly reset after doing the catch-up, so on the next frame it's going to do all the same catch-up again. The offending line is this, I think:
https://github.com/kaplayjs/kaplay/blob/master/src/app/app.ts#L385
`accumulatedDt` decremented a (small) fixed amount, regardless of the catch-up done. Next frame the remainder is added to fixedAccumulatedDt again, growing it indefinitely:
https://github.com/kaplayjs/kaplay/blob/master/src/app/app.ts#L370