Frogger Posted October 6, 2020 Share Posted October 6, 2020 Hi there, I've installed the MelonJS Platform tutorial exactly as described, and unfortunately it is not working. at first it needs a bunch of grunt files installed, so I've done that now I just get a black screen (and melonJS won't load) on localhost:8000 the only error is see when running npm run serve is "Local Npm module "grunt-asar" not found. Is it installed?" can anyone help me? It's really unfortunate to see the MelonJS Platform broken like this. I did install it a few years ago successfully, but something now is so wrong! Can anyone help me figure out what I'm doing wrong? Thanks! Quote Link to comment Share on other sites More sharing options...
obiot Posted October 7, 2020 Share Posted October 7, 2020 Hi, Again with this error ! (facepalm) are you using the latest version of the boilerplate ? this was addressed in the latest commits (https://github.com/melonjs/boilerplate/commits/master) see as well here : https://github.com/melonjs/boilerplate/issues/34 but yes the boilerplate really/definitely needs a big update (remove grunt) and switch to either webpack or rollup Quote Link to comment Share on other sites More sharing options...
obiot Posted October 7, 2020 Share Posted October 7, 2020 just added this too : https://github.com/mbolis/melonjs-resources-webpack-plugin#readme Quote Link to comment Share on other sites More sharing options...
Frogger Posted October 7, 2020 Author Share Posted October 7, 2020 Yes, even if you download the lastest boilerplate, it still comes up with (on npm install) npm ERR! errno ENOENT npm ERR! enoent Error while executing: npm ERR! enoent undefined ls-remote -h -t ssh://[email protected]/bwin/grunt-asar.git npm ERR! enoent npm ERR! enoent npm ERR! enoent spawn git ENOENT npm ERR! enoent This is related to npm not being able to find a file. I tried reading the link you posted above. still doesn't work. (I followed the steps exactly) Really would like to be able to play with melon.js but man, is this difficult when nothing works!!!! Can you not just post a working MelonJS platform tutorial? Or post one without the grunt-asar that actually works? Thanks in advance for your help, I think melonjs is awesome as I used it years ago (also that one installed easy back then) so surprised I can't even get the MelonJS Platform tutorial to work at all!!!! Quote Link to comment Share on other sites More sharing options...
obiot Posted October 8, 2020 Share Posted October 8, 2020 (edited) just to be clear though, the build process in the boilerplate is to actually build a one file minified version of the game, and additionally automatically generate the asset file. nothing prevent from actually using the boilerplate "manually" by running the provided index html file, without building the whole thing (or even just not using the boilerplate, it's not mandatory) and manually building the resources file yourself : https://github.com/melonjs/tutorial-platformer/blob/gh-pages/tutorial_step9/js/resources.js Edited October 8, 2020 by obiot Quote Link to comment Share on other sites More sharing options...
Frogger Posted October 9, 2020 Author Share Posted October 9, 2020 Ok making a bit of progress... I can get the maincharacter to appear (but falls right off the screen) -- -so now I'm trying to put in a collision layer - but when I edit the map file and put a rectangular collision as you see in the screenshot melonjs won't load my character won't appear and melonjs won't load (it crashes) (but doesn't throw any errors) obviously an issue with the tiled file - can anyone see why the collision layer at the bottom would prevent MelonJS from loading at all? That collision layer in picture below works with the top two collision rectangles but not when I try and add the bottom one. Any idea why? Quote Link to comment Share on other sites More sharing options...
Frogger Posted October 9, 2020 Author Share Posted October 9, 2020 Ok figured that issue out... is was me... not Melonjs LOL looks like if you change the map file in the data folder you need to manually copy it over to the data folder in the build folder yourself and then melonjs is happy Regards, Quote Link to comment Share on other sites More sharing options...
Frogger Posted November 4, 2020 Author Share Posted November 4, 2020 Ok new issue now, I can't get the background and foreground to show when running the tutorial. Is there not somewhere where working source code for the platform tutorial can be downloaded? This is so frustrating! I think melonJS is great but spending countless hours just trying to get the tutorial to even run is ridiculous! Quote Link to comment Share on other sites More sharing options...
Frogger Posted November 4, 2020 Author Share Posted November 4, 2020 Also noticed it has the .png for the tilemap is not a POT texture and it also throws the error: Computed tilecount (160) does not match expected tilecount (140) These two errors are probably the reason foreground and background won't show up. Also in good news, the maincharacter does work and is displayed! Quote Link to comment Share on other sites More sharing options...
obiot Posted November 5, 2020 Share Posted November 5, 2020 in the Tiled screenshot here above, your foreground layer is marked as hidden (see the closed eye), are you sure this is not a setting "issue" in tiled ? the error you mentioned is just actually a warning, but it does not prevent the the texture from being used. We display warning about non-POT texture as it impacts performances with WebGL, but does not prevent the game from working. also, if you are on the latest 8.x version, you can actually enable WebGL2 that now accepts non-POT, by setting the preferWebGL1 flag to false : http://melonjs.github.io/melonJS/docs/me.video.html#.init Else the whole tutorial source code is available on GitHub : https://github.com/melonjs/tutorial-platformer/tree/gh-pages/tutorial_step9 I understand your frustration, but the tutorial is not only about melonJS, it's also about the 3rd party tools (like Tiled), and yes it's easy to make a mistake, and yes it's definitely a learning process. keep us updated on your progress, and do come back here if you need more help 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.