• Content Count

  • Joined

  • Last visited

Reputation Activity

  1. Like
    Nikow reacted to stupot in phaser.WEBGL or .Canvas render mode ?   
    Test game.renderType, it will be equal to one of these:
  2. Like
    Nikow reacted to Nikow in phaser.WEBGL or .Canvas render mode ?   
    It's return 1 for canvas ans 2 for webgl , it s looks like perfect
  3. Like
    Nikow got a reaction from jdnichollsc in phaser.WEBGL or .Canvas render mode ?   
    It's return 1 for canvas ans 2 for webgl , it s looks like perfect
  4. Like
    Nikow reacted to substandardgaussian in 'Speed' of spriteSheet Animations ?   
    You're trying to set the "speed" property for the AnimationManager, not the animation itself. AnimationManager doesn't have a "speed" property, it won't do anything with it.
    You can access your pedale animation through
    bike.animations._anims['pedale'] or
    bike.animations._anims.pedale You should be able to set the speed there.
    You can set your frameRate when you call add, if you know the speed you want to play it at in advance.
  5. Like
    Nikow reacted to ZoomBox in Unknow Phaser error ..?!   
    I think your problem comes from the multiple .destroy() functions.
    You should be able to use .kill() only, even if your game doesn't works as good as previously, see if it still crashes.
    If it doesn't crash anymore, you know where the problem is...
  6. Like
    Nikow got a reaction from przemoo83 in Move to pointer issue   
    Have you changed the anchor point of your object ?
  7. Like
    Nikow got a reaction from sombriks in Canvas resize, how to always make entire game visible   
    Hi !
    Try with : = Phaser.ScaleManager.SHOW_ALL;;window.addEventListener('resize', function () {;});;
  8. Like
    Nikow reacted to ForgeableSum in Load an Isometric tilemap   
    Hello Nikow, I'd be glad to help as I am currently developing an isometric game in Phaser. I recommend that you do not use Phaser's native tilemap system. It's just too constrained and will hinder you from writing succinct code for tiling in ISO. Instead, create a group of Phaser.Images placed underneath your game objects to be used as tiles. 
    There's a couple different methods you can use to tile your images. 
    1) 2D tiling. a simple nested for loop will allow you to tile in an isometric view IF your tiles are modular (square or rectangular). There are ways to convert textures into isometric perspective while still maintaining modular dimensions. 
    2) The "zig-zag" method. Must start out with isometric artwork (example). Essentially you place the tiles using procedural logic to shift odd/even rows, so that the placement of the tiles is correct. 
    3) A transformation matrix. I don't think this is possible to do in Phaser because you need to rotate and scale an image programmatically (I've discovered Phaser is only able to scale first, then rotate). Using a transformation matrix, the basic idea is that you can mathematically determine where each tile will be placed with a formula which converts 2D coordinates to isometric.. but if you start out with the image already transformed (rotate 45 degrees and 1/2 height) and the dimensions of the image are modular (just because the image looks like a rhombus doesn't mean it is, because the edges are transparent), this formula won't work. You really need to start out with a 2D tile and transform it programmatically, otherwise you end up with white space around the image. At least that's the conclusion I've come to after a few months of research. 
    If you can get away with using method #1, I recommend you do so. Creating the artwork is more difficult, but you really can get away with tiling the 2D way if you're tiles aren't going to be used for pathfinding (or you can simply create a separate invisible grid for pathfinding). The problem with #2 is that images with alpha layer tend to be much large (in comparison to JPEGs) so it somewhat limits how large you can make the map. 
    Hope this help. Also, I recommend this read as a primer. 
  9. Like
    Nikow reacted to ZoomBox in P2 ...   
    I could help you in private and in french if it's easier to you.
    Anyways, here is a good start:
  10. Like
    Nikow got a reaction from pranadevil in loading bar in phaser   
    Hi !
    Like that ? :
    var loadingBar = this.add.sprite(game.width/2,game.height/2,"loadingbar");loadingBar.anchor.setTo(0.5,1);this.load.setPreloadSprite(loadingBar,0);
  11. Like
    Nikow got a reaction from Deino in Destroying a sprite on collision   
    Why duplicated 'game.physics.arcade.collide(this.ball,this.coins,this.scoreincrease,null,this);' just one is enough !
    And after : 
    scoreincrease : function(ball,coins){ this.score += 20; this.labelScore.text = this.score; coins.kill(); },
  12. Like
    Nikow reacted to ZoomBox in Circular World...?!   
    You can't use P2 + Arcade physics together (and if it was possible, you shouldn't).
    You should work on you own gravity thing in order to achieve that.
    I imagine you have a "earth" sprite and the center of it is the center of gravity.
    You should enable one of these two physic engine (I recommand P2 because it has always been more reliant and with more capabilities from my point of view). Only enable physics but not gravity.
    Then, for each of your physical object you should have a "fall()" function which would calculate the angle between him and the center of the earth and rotate it + push it toward, following the vector you just calculated. Since physic is enabled, is should just hit the ground and not go thourgh.
    In order to calculate the velocity you should apply to your objects' bodies you can try simple calculations like this: body.velocity *= 1.01 or something like this.
    Enable physics but not gravity Get an angle between your object and the center of your planet Rotate the object following this angle Push the object toward the center of your planet (apply you own "gravity" thing)  
    There is maybe a "body.face(point);" function in P2.
    There is maybe a "body.pushToward(point);" function un P2.
    => I quickly checked P2 docs and I couldn't find anything like those two ideas.
    Edit: Salut Français, j'en suis un aussi.
  13. Like
    Nikow reacted to Nikow in Phaser .mask and Safari ?!   
    I find !
    It was just a prob with the draw method, with a rectangle, all is ok ! 
    THanks for all !
  14. Like
    Nikow reacted to mxmlb in Phaser .mask and Safari ?!   
    I remember reading Pixi can handle only 1 single mask on a canvas, while it can have several on WebGL.
    Maybe your game runs on WebGL in Firefox & Chrome but not in Safari ?
  15. Like
    Nikow got a reaction from jdnichollsc in Sprite animation with big images   
    Same problem !