Sounds like reflow problems. And like OP is slowly discovering the 200% Problem.
I'm curious about actual metrics with regard to Chrome / Safari's garbage collector overhead. You still don't have a lot of "objects" in the video; when V8 is used server side it handles significantly more objects. (IE, assuming each sword is 1-5 objects.)
Are these engines canvas based, or are they generating HTML? Assuming they are generating HTML, are the elements removed from the screen when you are done with them?
In a lot of garbage collected environments, you still need to call some kind of close / remove method when you are done with some kinds of objects. (In C#, it's "Dispose.")
Only if you don't want to get your hands dirty with the layers you're using.
The trade-off with an abstraction layer is that every layer introduces bugs/decisions which may be a concern. But you can always (if it's open source) tweak the layer(s) below.
Moreover, why not finish the game and make your next project in something new.
The main down side is poor performance if you’re not targeting Safari and Chrome.
kg•2h ago