delueg

Members
  • Content Count

    10
  • Joined

  • Last visited

About delueg

  • Rank
    Member

Recent Profile Visitors

850 profile views
  1. Hello, i recognized on my own project where i want to add this filter that in firefox and safari this filter does not work the first time when you visit the page.. after it cached the .frag file mean on reload it works.. i also tried to cache the file first with jQuery.get but with no success. any help? Firefox: 46.0.1 Macbook Pro. EDIT: Really nobody? I mean this also happens on the example-page of Phaser, not only on my project.
  2. Look for the shutdown integrated function.. http://www.html5gamedevs.com/topic/1372-phaser-function-order-reserved-names-and-special-uses/
  3. 1. You can do an domelement outside the game and add the event to it. this would work, but sometimes you don´t want any dom elements, so.. 2. my suggestion is, that you create a pause variable and handle your pause by yourself. i relied on the integrated pause mode and had to do it by my own afterwards.
  4. Hello, i have a problem on IOS iPad with CocoonJS and Phaser. What i do is: In the create function i add an listener to the game like so. this.game.input.onTap.add(function(e){ if(window.app.runtime_vars.player_dead != true && that.pause == false){ if( e.x < window.app.half_w ){ that.jump(0); } if( e.x >= window.app.half_w ){ that.jump(1); } } });so after my player dies i have an self constucted restart to avoid some problems on low end devices like blackscreen and avoid loading times etc. i can´t really show code here because that would be too much.. what i do is just remove and readd sprites and resetting variables and so.... But what happens on IOS iPad is that the onTap Event doesn´t work like before: 1. It is not as sensible like before 2. tapping the left and the right side at the "same" time ( for sure not the exactly same time im millisec - just human fingers ) doesn´t work anymore, means before my restart i can tap the left side on the screen and the right side.. and the player is doing both actions. After my restart this is not working anymore.. the action which is triggered slightly before the other will prevent the second. 3.EDIT: It is only happening after opening and closing a webview Does anyone has an idea why this is happening? Thanks Jack
  5. Hello folks, First awesome community! I want to share my experience with the "Images not displaying right under cocoonjs". Prolog: One test-device of our little company is an Huawai where we always had the most problems. (Black-Screen after Restart etc. etc.) So yesterday i saw this post http://likeadev.com/show/6-tips-to-make-your-phaser-game-work-with-cocoonjs.html where he mention that CANVAS Mode should be taken to avoid things like that. So i switched to Canvas Mode. But then i had the Black-Screen-Issue always after App-Start. What i never recognized before was that i was still with 1. Phaser v1.1.5 and that this Issue is known under this Version and has been fixed later. So i updated to Version v2.0.5. After some refactoring it was quite nice - excepted that the pause handling was not the same. No Problem i thought because i am on it at the moment anyway. I created my own pause handling - perfect. After compiling with the Cloud Service from Ludei Version (2.0.1.) i had this Issue that not all images where rendered correctly. ( I always used Phaser.AUTO in the beginning ) So after some testing i can say: 1. With Phaser Version v1.1.5 i had no image rendering Issues at all ( only SVG didn´t work properly ) 2. the trick with var fake = this.game.add.sprite(0,0,'');was working as excepted but not all the images where fixed. In my project i could fix it by just using a second empty Image so my code var fake = this.game.add.sprite(0,0,'');var fake2 = this.game.add.sprite(0,0,'');what is important is that it is at the end of the create function, otherwise no effect at all. my code to recognice why 2 images : i am not sure about that but i think it has to do something that the images are placed in a seperate context ( inside a second function ). //last image in main context where not rendered and produced strange behavior when clicking on the space where it should be : means -> appears after tabbing on the empty space : -> but not the howto_screenthis.howto = this.game.add.sprite(window.app.half_w - window.app.w / 40, window.app.h - window.app.scale_ratio.highscore_btn.h * 2.2, "howto");this.howto.scale.setTo(window.app.scale_ratio.self,window.app.scale_ratio.self);var that = this;this.howto.inputEnabled = true;this.howto.input.pointerOver.id = 4;this.howto.events.onInputDown.add(function(){//was not rendered at all in the beginning only after setting a second fake imagethat.howto_screen = that.game.add.sprite(window.app.scale_bg_factor.x, window.app.scale_bg_factor.y, "howto_screen");that.howto_screen.scale.setTo(window.app.scale_bg_factor.s,window.app.scale_bg_factor.s);that.howto_screen.inputEnabled = true;that.howto_screen.input.pointerOver.id = 5;that.howto_screen.events.onInputDown.add(function(){that.howto_screen.kill();});}); so after i placed one fake image the last image in main context were displayed but the "howto_screen" wasn´t. So after i set 2 fake images everything looked like it should. Also Phaser.AUTO was no Problem. Couldn´t test on Huawai until now but NEXUS 4 is running good again. Also didn´t delete the line of Phaser.Device like mentioned in this thread. Maybe i have to do it when it comes to the Huawai EDIT: i had to do this because on Ipad it was not working properly like mentioned above. Hope i could help someone. Giving love to the HTML5 Game Dev Community
  6. same here.. ..cannot call method reset of null any help? or could you solve your problem?
  7. Hi, are you sure that you initialize time? you have to referense to the game somelike this. timer = this.game.time.create(false);or you have to initialize a time object first this.time = new Time(game)hope this helps...
  8. Hello, i wonder if this is the right section to ask: i am doing a game with phaser and wrap it up for android with cocoonjs. Now when i close the game with the home-botton, the game doesn´t change in pause mode.. seems the visibitliychange event doesn´t fire here and this cause the game to crash. When you open up the app again the screen is frozen but you can see that the game logic didn´t paused. Any ideas how i can workaround here? Thanks Sven
  9. i could solve my problem.. it was a problem with my json file, i just change the trimmed-property to false "boss10000":{ "frame": {"x":10,"y":10,"w":200,"h":256}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":587,"y":26,"w":902,"h":397}, "sourceSize": {"w":902,"h":397}},
  10. Hello, currently i am working on my first Phaser Game and running into a collision detection Problem when i use spritreanimations. For me it seems that my player ( normal sprite ) get hit by the enemy ( sprite animation ) aldready when the "big sprite" behind the animation collide with my player. Means that the player gets hit WAY before a collision is visually recongized Could this be true? Here is some of my code. //load the sprite -> only using atlas causing error: Uncaught TypeError: Cannot read property 'sourceSizeW' of null this.game.load.atlasJSONHash("enemy_1", "assets/enemy_1.png","assets/enemy_1.json");//Create the group with the enemies -> no difference between using setRectangle an immovable = true or not this.fast_obstacle = game.add.group(); for (var i = 0; i < 10; i++) { // They are evenly spaced out on the X coordinate, with a random Y coordinate sprite = this.fast_obstacle.create(app.w, game.rnd.integerInRange(0, app.h), 'enemy_1', 'boss10000',false); /*sprite.body.setRectangle(100, 50, 50, 25); sprite.body.immovable = true;*/ } // These are the frame names for the octopus animation. We use the generateFrames function to help create the array. var frameNames = Phaser.Animation.generateFrameNames('boss1', 0, 37, '', 4); console.log(frameNames); this.fast_obstacle.callAll('animations.add', 'animations', 'swim',frameNames, 20, true, false); this.fast_obstacle.callAll('play', null, 'swim');//check for collision -> no difference between using collide or overlap this.game.physics.collide(this.player, this.fast_obstacle, this.player_death, null, this);//add to stage // Get the first dead obstacle of our group var fast_obstacle = this.fast_obstacle.getFirstDead(); // Set the new position of the obstacle fast_obstacle.reset(x, y); app.counter = 0; fast_obstacle.body.velocity.x = app.speed * 2; fast_obstacle.outOfBoundsKill = true;any help would be very nice thanks