I reworked the project structure a bit so i can have a desktop (canvas) and a bangle version to build automatically. Had to write my own packaging algorithm since the webpack wrapper code didn't play well with the espruino interpreter.
I also added minification using unglifyJS which replaces all the function names and variables by single letters. With an exclusion list for the Bangle. and g. functions
Even with all that it seems the Bangle goes out of memory when i start the game.
How can i inspect what is eating memory in my app?
I tried with the chrome dev tools on the desktop version to look at the heap size, but i think too much stuff is loading to support to the canvas rendering, that i won't translate well to the heap inside the Bangle.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Yes that worked
I reworked the project structure a bit so i can have a desktop (canvas) and a bangle version to build automatically. Had to write my own packaging algorithm since the webpack wrapper code didn't play well with the espruino interpreter.
I also added minification using unglifyJS which replaces all the function names and variables by single letters. With an exclusion list for the Bangle. and g. functions
Even with all that it seems the Bangle goes out of memory when i start the game.
How can i inspect what is eating memory in my app?
I tried with the chrome dev tools on the desktop version to look at the heap size, but i think too much stuff is loading to support to the canvas rendering, that i won't translate well to the heap inside the Bangle.
If you want to try and run it, i've included the built file in the repository:
minified: https://github.com/bertyhell/nodewatch-mazerunner/blob/master/dist/bangle.min.js
non-minified: https://github.com/bertyhell/nodewatch-mazerunner/blob/master/dist/bangle.js
Repo: https://github.com/bertyhell/nodewatch-mazerunner
1 Attachment