rafaholiveira

Members
  • Content Count

    17
  • Joined

  • Last visited

About rafaholiveira

  • Rank
    Member

Contact Methods

  • Website URL
    http://rafaholiveira.com.br/

Profile Information

  • Gender
    Male
  • Location
    Brazil
  1. From the docs: "setResizeCallback(callback, context) Sets the callback that will be invoked before sizing calculations. This is the appropriate place to call setUserScale if needing custom dynamic scaling." Maybe there is a bug?
  2. Is there a way to set a scale factor in ScaleManager.RESIZE, so all objects are created with that scale? I tried to scale the camera, but I need to calc a new size of the camera to view all visible area of the canvas, but my calc are wrong, because the new size isn't covering everything. This is my calc basically (the code is in haxe, but is similiar to javascript): get the scale factor: public function getScaleFactor(stage:Stage):Float{ var ratioX = stage.width / 420; var ratioY = stage.height / 630; return Math.min(ratioX, ratioY);}scaling the camera: public function scaleCamera(world:World, camera:Camera, scaleFactor:Float):Point{ var size = new Point(camera.width, camera.height); camera.scale.set(scaleFactor, scaleFactor); var sizeScaled = new Point(size.x * scaleFactor, size.y * scaleFactor); var diff = new Point(size.x - sizeScaled.x, size.y - sizeScaled.y); camera.setSize(camera.width + diff.x, camera.height + diff.y); world.resize(camera.width, camera.height); return diff;}With these function I do in the boot state: var scaleFactor = getScaleFactor(stage); var diff = scaleCamera(game.world, camera, scaleFactor);Main.width = game.width + diff.x;Main.height = game.height + diff.y;the variables Main.width and Main.height should have the dimension of the canvas (to position things), but isn't covering everything. I think should have a easy way to set the scale in RESIZE.
  3. I have two basic android devices here, that aren't loading the game, so I was hoping this was webgl.. but I forget to check the images..
  4. I always heard we have to use Canvas fallback in html5 mobile, but then I saw this game in softgames: http://games.softgames.de/road-crossing/?locale=pt&p=m.softgames.de by the way, it looks "almost" exactly as Crossy Road for ios and android, but a closer look and we see that is different. The point here, is that for the look it seems to use webgl (or could be a well made game in 2d). I have a basic android from LG that didn't load, I'd like other people testing in devices that don't support webgl to check if this is really using only webgl.
  5. There is a project for famo.us https://github.com/forafish/famoushx It seems to be a direct port. The current target is javascript, but openfl will be included in the future. This would be very good, specially for mobile development. The sad part is that is not updated in a while.
  6. I opened a issue. https://github.com/photonstorm/phaser/issues/388
  7. For repeated sprites you can use TileSprites, but if the sprites will not change, I think the best option is tilemaps.
  8. I confirm that Tile.setCollision( left, right, up, down) is not working.
  9. With Phaser 1.1.4, how I set up wich sides of a tile will collide in tilemaps?
  10. Phaser.Tileset.getTile uses this.tiles[index], but there is no variable tiles in Tileset. I was trying to set the collision of the faces of the tiles, but Tileset.getTile shows undefined for tiles.
  11. A easy way of change phaser.d.ts, is do a right-click in the class, and choose go to definition. Then check the definition in http://gametest.mobi/phaser/docs/ and put in the end of the class. Some properties of Sprite are inherited from Pixi DisplayObject, like Alpha. In this case I put directly in the Sprite class, for my use. But maybe for the repo this is not the best way.
  12. You can edit phaser.d.ts manually, and include the missing definitions. I have a list of things to include/change, but I need to review first before send to the Repo.
  13. I liked it but I would prefer the movement buttons on a dpad in the bottom side. That way I could play without moving my hand. Could only show possible moves, as shown in the character.