rich Posted April 1, 2014 Share Posted April 1, 2014 Hi all, I've just pushed up a new build package for Phaser 2.0.3 which I would really really like you all to test in your current games. You can get the build files from here: https://github.com/photonstorm/phaser/tree/dev/build It contains 2 important changes: 1) Now using Pixi 1.5.2 internally 2) Using a modified State update core loop. The State.update method is now called BEFORE any other sub-system (see this thread here: https://github.com/photonstorm/phaser/issues/661) It's change number 2 that is the most important to test on the widest range of games. So even if your game is finished, so long as it used Phaser 2.x I would really appreciate you dropping the new build file in and testing if the game works ok. If it does then PLEASE post about it here. And of course if it doesn't please post here too! You don't have to explain in detail what breaks, just a short summary will suffice. Thanks everyone. Cheers, Rich Link to comment Share on other sites More sharing options...
Martiny Posted April 1, 2014 Share Posted April 1, 2014 Tested in only one game of mine (the one I'm currently working), and works fine. I'll keep using it (: Link to comment Share on other sites More sharing options...
jyapayne Posted April 1, 2014 Share Posted April 1, 2014 I tried my game CargoBlaster with the new code and it seems to not change the state properly. The preload bar loads all the way and then it just sits there. Maybe I'm not calling something properly, but in Phaser 2.0.2, it worked perfectly. You can view/debug the game here: http://simplypixelated.com/static/CargoBlaster/CargoBlasterPhDev/ There are no errors in the console, so I'm not sure what is wrong. Link to comment Share on other sites More sharing options...
Chupup Games Posted April 1, 2014 Share Posted April 1, 2014 @jyapayne: i think it has to do with your music file, because it stops here: if (this.cache.isSoundDecoded('music') && this.ready == false) try without music or another mp3 file if it works then. Link to comment Share on other sites More sharing options...
Yora Posted April 1, 2014 Share Posted April 1, 2014 My arcade physics stopped working for the most part, although I have it set up in a temporary weird and worrysome way when I was having issues with Arcade physics and groups at a time (though it still worked fine in 2.0.2). It seems like the only physics check still working is relating to enemies which are groups held in an array. Here's my collision code in the update:this.game.physics.arcade.collide(g_wall, g_player, null, null, this); // *****This still works****** for (var i = 0; i < g_enemy.length; i++) { this.game.physics.arcade.collide(g_wall, g_enemy[i], null, null, this); this.game.physics.arcade.overlap(g_player, g_enemy[i], this.entityOverlap, null, this); } //**************************** this.game.physics.arcade.overlap(g_player, g_door, this.door_overlapped, null, this);g_sprite is a group containing all groups/entities (for Z axis sorting).g_player extends Phaser.Group containing multiple sprites.g_enemy also extends Phaser.Group, set like this, where g_enemy is just an array: switch (object_string.slice(0, (object_string.length - 3)) ) { case "enemy": map.obj['p' + pad(i, 2)] = new EnemyCharacter(map.room_data[i][1], i, map.room_data[i][2], map.room_data[i][3]); map.obj['p' + pad(i, 2)].name = object_string; g_enemy[i] = map.obj['p' + pad(i, 2)]; g_sprite.add(g_enemy[i]); break; }Also for some reason my character is running around at double the speed he was before. Here's the movement code: if (game.left_key.isDown && this.entity.body.velocity.x > -this.entity.speed && this.entity.e.allowMovement) { this.entity.body.velocity.x = -this.entity.speed; } Link to comment Share on other sites More sharing options...
rich Posted April 1, 2014 Author Share Posted April 1, 2014 I tried my game CargoBlaster with the new code and it seems to not change the state properly. The preload bar loads all the way and then it just sits there. Maybe I'm not calling something properly, but in Phaser 2.0.2, it worked perfectly. You can view/debug the game here: Can I just confirm - if you swap the phaser.js 2.0.3 file for the 2.0.2 one available from the site, does it work fine? I.e. literally just swapping to 2.0.3 breaks it? It's entirely possible this is the case, I just need to be crystal clear - if enough other people report similar results then I simply can't keep the state change update. Link to comment Share on other sites More sharing options...
LeonardoDigital Posted April 1, 2014 Share Posted April 1, 2014 Tested, my game game didnt even load. Before everything was working fine. I m using the Full Screen Mobile template. Link to comment Share on other sites More sharing options...
qdrj Posted April 1, 2014 Share Posted April 1, 2014 Audio files can't be loaded. Bum. It works perfectly with 2.0.2 Link to comment Share on other sites More sharing options...
jyapayne Posted April 1, 2014 Share Posted April 1, 2014 @rich: Yes, that is correct. You can see it working fine at http://simplypixelated.com/cargoblaster/ with Phaser 2.0.2. Simply dropping in 2.0.3 causes the issue. @Chupup Games: I tried moving the call for switching the state into the create() method, but it hangs before it gets there. Link to comment Share on other sites More sharing options...
rich Posted April 1, 2014 Author Share Posted April 1, 2014 Ahh.. sorry all, I messed up the SoundManager in that build. I've just pushed a brand new one that has audio working again properly. Sorry for being a pain, please could you re-test with this Link to comment Share on other sites More sharing options...
jyapayne Posted April 1, 2014 Share Posted April 1, 2014 @rich, Okay it looks like my game works now I updated my link at http://simplypixelated.com/static/CargoBlaster/CargoBlasterPhDev/ and the game seems to run just like it did on 2.0.2. Link to comment Share on other sites More sharing options...
LeonardoDigital Posted April 1, 2014 Share Posted April 1, 2014 I´m afraid my game doesnt load with this version either. It doesnt have anything to do with sound since I commented all the lines of code sound related. It just doesnt load.With 2.0.2. everything was working fine. These is the error I get: Uncaught SyntaxError: Unexpected token < phaser.min.js:6Uncaught ReferenceError: Phaser is not defined Link to comment Share on other sites More sharing options...
rich Posted April 1, 2014 Author Share Posted April 1, 2014 LeonardoDigital - is your game uploaded anywhere I could see? Would like to see how you've structured your code that makes it fail. Link to comment Share on other sites More sharing options...
LeonardoDigital Posted April 1, 2014 Share Posted April 1, 2014 @rich Sure. Here´s the link: https://dl.dropboxusercontent.com/u/12028110/JereMovil/index.html Link to comment Share on other sites More sharing options...
rich Posted April 1, 2014 Author Share Posted April 1, 2014 Sorry to be a pain but could you share the dropbox folder with me? (send it via PM if you like so I can download it and run it locally. I think the error is happening because phaser.min.js hasn't finished downloading before your anonymous function in index.html has run. If you were to wrap that in a window.onload or a DOMContentLoaded I reckon it'd probably be ok. Link to comment Share on other sites More sharing options...
valueerror Posted April 1, 2014 Share Posted April 1, 2014 testet! works fine! Link to comment Share on other sites More sharing options...
LeonardoDigital Posted April 1, 2014 Share Posted April 1, 2014 @rich Ok.I ve just sent u a message. I have to say that I m a complete newbie so I wouldtnt know how to do the last thing you mentioned. Link to comment Share on other sites More sharing options...
jyapayne Posted April 1, 2014 Share Posted April 1, 2014 @LeonardoDigital: You have a bunch of html in your phaser.min.js file. I'm assuming you copied it wrong or something. Or maybe it has something to do with dropbox. Did you right click the file on github and click save as? Because that doesn't work on github. I've done that a few times myself You have to either clone the repo or open the file completely and then copy and paste the raw output into a file. Link to comment Share on other sites More sharing options...
maf Posted April 1, 2014 Share Posted April 1, 2014 seems all good on the 4 games i'm working on at the mo : ) not using much, if anything in the way of arcade physics. one game using p2 fairly extensively. Link to comment Share on other sites More sharing options...
rich Posted April 1, 2014 Author Share Posted April 1, 2014 Physics doesn't matter for this test - what matters is games using different States (the more the better!) Link to comment Share on other sites More sharing options...
LeonardoDigital Posted April 2, 2014 Share Posted April 2, 2014 @jyapayne: Thats exactly what I did! (right click the file on github and click save as) My mistake, I didnt know. Now I copied the file the right way and everything works just fine!Thank you! Link to comment Share on other sites More sharing options...
jyapayne Posted April 2, 2014 Share Posted April 2, 2014 @LeonardoDigital: No worries! Now you know! Link to comment Share on other sites More sharing options...
qdrj Posted April 2, 2014 Share Posted April 2, 2014 Just tested 2.0.3 on my game. After fixing bug with sound loading everything works perfectly (state management also). Unfortunetely I didn't see any perfomance boost with new Pixi. I was hoped for few extra fps But thats fine. Link to comment Share on other sites More sharing options...
Joldror Posted April 2, 2014 Share Posted April 2, 2014 I just tested in a game with four states. Runs perfectly, just as with 2.0.2. Link to comment Share on other sites More sharing options...
ianmcgregor Posted April 2, 2014 Share Posted April 2, 2014 State transitions appear to work perfectly well. Arcade physics has issues not present in 2.02, namely the hero's jump does not work any more (setting velocity.y to -1000). Link to comment Share on other sites More sharing options...
Recommended Posts