KnTproject Posted September 9, 2016 Share Posted September 9, 2016 Hello, Yesterday I installed Phaser, but now I have got a big problem (For me it's a big problem). I followed the Phaser tutorial for beginners. The tutorial that explains how to get a star on the screen in the top left corner. For people who don't know what I am talking about, here is a link: http://phaser.io/tutorials/making-your-first-phaser-game/part2. I don't have any knowledge about webservers or things like that, but I got this message: Phaser.min.js:4 Uncaught SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The cross-origin image at ... may not be loaded. I know the problem, I can't export the images to my HTML, because it has something to do with security reasons (CORS, I think). I also saw on the Phaser site that I have to install something like a web server. I looked at node.js, but I didn't understand anything. Can somebody help me please? Link to comment Share on other sites More sharing options...
DegGa Posted September 10, 2016 Share Posted September 10, 2016 You need a webserver to load your game assets, i recommend you Mongoose, it's a really simple program. Just download the free version from this link. Link to comment Share on other sites More sharing options...
nazimboudeffa Posted September 10, 2016 Share Posted September 10, 2016 thx for the question, i have just discovered that tutorial yesterday i have made a pen on codepen.io that looks like it http://codepen.io/featuresmega/pen/WGQEaw it should works with the star In the phaser.io language : the key is : 'tree' the loaded asset is a crossorigin sprite i have uploaded on imgur Just click on the link it will bring it up to you browser, but if you want to bring an index.html page it should look like a standard phaserjs project the background in this pen project is an isometric landscape that needs a boost to be displayed (it's in the //comment) and of course the tree is a part of it Link to comment Share on other sites More sharing options...
mattstyles Posted September 11, 2016 Share Posted September 11, 2016 If you've already got node installed you are just two steps away from several ways to fire up a server npm install -g serve serve path/to/index.html If you aren't comfortable with a CLI then I'd recommend you get comfortable with it, it might be tempting to use something with a gui in the interim but then you wont learn anything drhayes 1 Link to comment Share on other sites More sharing options...
KnTproject Posted September 13, 2016 Author Share Posted September 13, 2016 Thank you very much! It works douglas 1 Link to comment Share on other sites More sharing options...
Recommended Posts