You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It would be nice if there was some kind of feature or something to make it easy to stream levels on the fly. It would be cool if a level wanted to change to another one it could supply a URL to melonJS to load the level (the level actually being a JS module) from the specified URL.
Describe the solution you'd like
We're trying to make melonJS support es6 modules better and improve tree shaking atm, and that gives some nice features when used by a browser like you could stream the individual levels of your game. It would be nice if there was a clear and easy way to handle this as a user. Also as a neat bonus you could combine this technique with server side auth so if someone who hasn't met the requirements tries to play it they'll get a 404 error. This level change could also potentially be reflected in the page URL too. It would also be really sweet to be able to signal to melonJS to preload a level before it actually is required (thus making the transitions super smooth, and we can do it at smart times like in game events)
Describe alternatives you've considered
I can't think of any similar solutions atm
The text was updated successfully, but these errors were encountered:
Check out this StackOverflow post for details on how to change the page's url without navigating. If we fetched the page's content then used the History API to change the URL without reloading then we could have levels presented as actual pages (which can also be cold-loaded like a regular webpage from the server) However we can change the page's level without needing to do a full refresh. This would keep melonJS in memory which would would give us the best of both worlds when it comes to navigation and on the fly level loading.
Is your feature request related to a problem? Please describe.
It would be nice if there was some kind of feature or something to make it easy to stream levels on the fly. It would be cool if a level wanted to change to another one it could supply a URL to melonJS to load the level (the level actually being a JS module) from the specified URL.
Describe the solution you'd like
We're trying to make melonJS support es6 modules better and improve tree shaking atm, and that gives some nice features when used by a browser like you could stream the individual levels of your game. It would be nice if there was a clear and easy way to handle this as a user. Also as a neat bonus you could combine this technique with server side auth so if someone who hasn't met the requirements tries to play it they'll get a 404 error. This level change could also potentially be reflected in the page URL too. It would also be really sweet to be able to signal to melonJS to preload a level before it actually is required (thus making the transitions super smooth, and we can do it at smart times like in game events)
Describe alternatives you've considered
I can't think of any similar solutions atm
The text was updated successfully, but these errors were encountered: