demiculus Posted May 21, 2020 Share Posted May 21, 2020 What I want is a way to develop my game like Notch does in this video: or what playcanvas offers What is a way for me to do this? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 21, 2020 Share Posted May 21, 2020 (edited) Learn how those code reload things work, then make your own - put pixi app in part that is not hot-reloaded. Of course PixiJS wasnt made with hot reload in mind, it could cost a lot of architecture changes to take it into account, so you have to modify all the resource management accordingly. Edited May 21, 2020 by ivan.popelyshev Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 21, 2020 Share Posted May 21, 2020 naive approach - If you are working with hotswap editor like in codesandbox - you have to destroy pixi app on reload or all those applications will leave in memory. That's one of the problems to solve if you want a real hot swap try { if (module.hot) { module.hot.dispose(function() { console.log("destroyed"); app.destroy(); }); } } catch (e) {} Quote Link to comment Share on other sites More sharing options...
demiculus Posted May 23, 2020 Author Share Posted May 23, 2020 Damn seems like a lot of work, thanks for the info though. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.