Joss Posted May 28, 2013 Share Posted May 28, 2013 Hi, I've done the first version of a very basic,simple game. I'm looking for some feedback on how I've built it and utilised pixi.js rather than on the game itself. I'm really new to making HTML5 games, so probably i've gone about it in a wrong way or not used pixi.js properly. Preloading is definetly something I need to look at, the game seems to work best in IE9 and Chrome, bit slow in FF. Also tried it on an iPhone with Safari and Chrome but some of the sounds don't fire, though the graphics seem ok. http://games.allthebeesaredead.com/ The code is all in the page source. Thanks Joss Quote Link to comment Share on other sites More sharing options...
Mat Groves Posted May 28, 2013 Share Posted May 28, 2013 Nice one! Game is great I do plan on writing a tutorial for the assetLoader but until then, hopefully this snippet will show you how it works: // create an array of items you wish to load..var assetsToLoader = [ "myImage.png", "myImage2.png", "myImage3.png"]; // create a new loaderloader = new PIXI.AssetLoader(assetsToLoader); // use a callbackloader.onComplete = onAssetsLoaded //begin loadloader.load();function onAssetsLoaded(){ // start your game var coolCrab = Sprite.fromImage("myImage.png");}hope that helps! Quote Link to comment Share on other sites More sharing options...
Dream Of Sleeping Posted May 29, 2013 Share Posted May 29, 2013 I've noticed how the score text seems to be cut off on the right hand side. Like it's bounding box has not been calculated properly. Quote Link to comment Share on other sites More sharing options...
Joss Posted May 29, 2013 Author Share Posted May 29, 2013 Thanks for the asset loading code, will give it a try today!! I did notice the score being cut off on iPhone Safari/Google Browsers. not sure why! Will have a look at the pixi text documentation bit. Quote Link to comment Share on other sites More sharing options...
Joss Posted May 29, 2013 Author Share Posted May 29, 2013 I've now added preloading with that code, seems to work well, though I tried using onProgress, which I assumed would fire each time an image in the array gets loaded, but it only fired once! Quote Link to comment Share on other sites More sharing options...
Mat Groves Posted May 30, 2013 Share Posted May 30, 2013 interesting! Thanks for the heads up, I will take a look into that for sure! 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.