TannerRogalsky / love.js

LÖVE ported to the web using Emscripten
MIT License
491 stars 52 forks source link

Performance issues with only some games #62

Open coltonoscopy opened 6 years ago

coltonoscopy commented 6 years ago

Hello!

In testing ~8 different small games of mine with love.js, most of them work great, but there are a couple (a Super Mario clone and a Pokémon clone) that seem to run very slow in the browser (60 FPS when run native), though it's not obvious to me what the key difference is for these versus the others. Here are the links to the Mario repo and a deployment of the game for testing:

Original repo (mario subfolder): https://github.com/games50/mario Emscripten port: https://github.com/coltonoscopy/mario-love-emscripten Live Emscripten: https://coltonoscopy.github.io/mario-love-emscripten/

This game is really just a very simple platformer on a fairly small level with some creatures that have incredibly simple AI. Any clues or tips would be much appreciated; thank you!

drmargarido commented 5 years ago

Check for sounds with the "streaming" option and try them with the "static" option. It speed up my game, and stopped the audio from breaking sometimes. It will use more memory but at least works well.