Vivern

Members
  • Content Count

    13
  • Joined

  • Last visited

  1. Thanks. >>When writing cross-platform code you should take into account whether the device is touch enabled (via the game.device.touch property, which will be true if a touch device is present) and alter your input methods accordingly. - it was my plan "B". I expected that phaser auto-detects the device and adjusts the input-touch. >>via the game.device.touch property - Potentially check can be defined using game.device.desktop
  2. var customButton = game.add.sprite(game.world.centerX, game.world.centerY, 'button');customButton.inputEnabled = true;customButton.events.onInputOver.add(onBtnOver, customButton);customButton.events.onInputDown.add(onBtnDown, customButton);When touch custom button on ipad simultaneously activated events onInputOver and onInputDown, but should only onInputDown? Possible for mobile devices to use another (not events.onInput) input-touch system embedded in Phaser? Event onInputOver - used for Desktop.
  3. super(Global.WIDTH, Global.HEIGHT, Phaser.CANVAS, 'content', null); On some android devices, game does not start. To successfully run the game - need to force select Phaser.CANVAS. How best to verify in this case? The following code does not work, because must first create a Phaser.Game: var renderer;if (this.game.device.android && !this.game.device.webGL) { renderer = Phaser.CANVAS;} else { renderer = Phaser.AUTO;}super(Global.WIDTH, Global.HEIGHT, renderer, 'content', null);or var game;if(!game = new Phaser.Game(800, 600, Phaser.AUTO, 'content', { preload: this.preload, create: this.create })) { //force Phaser.CANVAS for some android devices game = new Phaser.Game(800, 600, Phaser.CANVAS, 'content', { preload: this.preload, create: this.create })}
  4. On some android devices (stock browser) duplicate screen game with offset (use one canvas). How to solve this problem?
  5. Thanks. Another wanted to clarify. How to do a check: If( device support WebAudio ) { Play background music + play game sounds (click, explodes, etc.)} else { Only play background music}?
  6. What advantages give audio sprites in html5 games (whether necessarily)?. Download speed will be faster sounds, what else?
  7. Using Phaser 2.0.3 loadPolygon (key, object, options) → {boolean} - loads several/multi polygon-shapes, it is good. But I need to manually add several -polygon-shapes to the body. addPolygon (options, points) → {boolean} - add only One polygon-shape to body. As manually add several polygon-shapes to body (without loadPolygon) ------- P.S. loadPolygon ({}, object, [ [22, 0], [31, 9], [31, 22], [23, 31], [9, 31], [0, 22], [0, 9], [9, 0] ]) - good, shape displayed. if loadPolygon ({}, object, [ 22, 0, 31, 9, 31, 22, 23, 31, 9, 31, 0, 22, 0, 9, 9, 0 ]) - fault, shape is not displayed? from docs: "An array of 2d vectors that form the convex or concave polygon. Either [[0,0], [0,1],...] or a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be flat x,y values e.g. setPolygon(options, x,y, x,y, x,y, ...) where x and y are numbers.":
  8. Advise level editor (not a tile) for positioning, rotation, scaling objects and save level to json/xml?
  9. In basic Phaser 2.0.2 contains a function hitPixelTest() for detect intersection of two bitmap with alpha channel?
  10. If you decide to implement Box2D (html5 version), details below links: 1. https://code.google.com/p/box2d-html5/ 2. http://code.google.com/p/box2dweb/ http://www.emanueleferonato.com/2012/12/03/introducing-box2dweb-create-box2d-projects-in-html5/ http://www.binarytides.com/javascript-box2d-tutorial/ It would be great )
  11. Need to find a collision objects (contact events). Now is not displayed function alert ("Eahh, collision!"), Ie not processed by the collision. What need to fix? Link to Project (visual studio 2013 + type script): https://drive.google.com/file/d/0B1BUvrgMgztwbWYwSzRob2pOMk0/edit?usp=sharing Code:
  12. 1. In basic function Phaser 2.0.2 I found a simple functions of the intersection: Phaser.Rectangle.intersects – AABB-AABBPhaser.Circle.intersects – Circle–CircleIs it possible in Basic Phaser (without physics engine) to create complex poly shapes, as well as search for the intersection: AABB-Circle, Poly-AABB, Poly-Circle, Poly-Poly? 2. What Physics engines support custom poly shapes describing of the complex objects? p2 physics – support complex poly shapes. Arcade physics - ? Ninja physics - ?