Search the Community

Showing results for tags 'phaser'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 3,291 results

  1. haden

    Error in Sprite.crop

    While using Sprite.crop I noticed that changing crop.width doesn't always work. For example, the following code won't have any effect: var sprite = game.add.sprite(0, 0, 'someSprite');sprite.crop = new Phaser.Rectangle(0, 0, sprite.width, sprite.height);sprite.crop.width = v; // some value vNow the following code will work without problem: var sprite = game.add.sprite(0, 0, 'someSprite');sprite.crop = new Phaser.Rectangle(0, 0, sprite.width, sprite.height);sprite.crop = sprite.crop; // adding this line fixes the problemsprite.crop.width = v; // some value vThe problem is inside crop's "set" function: set: function (value) { if (value instanceof Phaser.Rectangle) { if (this._cropUUID == null) { this._cropUUID = this.game.rnd.uuid(); PIXI.TextureCache[this._cropUUID] = new PIXI.Texture( PIXI.BaseTextureCache[this.key], { x: value.x, y: value.y, width: value.width, height: value.height } ); } else { PIXI.TextureCache[this._cropUUID].frame = value; } this._cropRect = value; this.setTexture(PIXI.TextureCache[this._cropUUID]); }}The first time we set a crop rectangle R, sprite._cropRect is assigned R but in PIXI texture cache we actually create a new frame instance. So if we set sprite.crop.width we do change the width of _cropRect but not the width of the texture's frame.
  2. Mike

    Breakout Game - need help

    So I need your help to finish, and polish the Breakout game with Phaser. http://mihail.ilinov.eu/games/PhaserBreakout/ In short i make it for this: http://city41.github.io/breakouts/ I've made like 50% i think, what's left is: - Start, Game Over Screen - Display Lives, Level, Score - Display the Countdown - Make powerups and powerdown fall from predefined random bricks (if you press "Z" you trigger the powerdown and paddle become smaller) - All sound related (here i wait for final version of Phaser) But there are some problems i met during the development: - I think that justPressed and justReleased doesn't work as expected i tried fixed it but failed... The problem is that even with one quick press, the update calls justPressed and execute code several times: Just press "V" to spawn a ball. Sam thing with "X" and "C" for switching levels, here i tried a bit hackish for me thing to set the duration as 22 ms... 11ms fails, and 44ms trigger multiple - I don't quite understand the paddle.immovable = true; but as i tested and read from flixel without it collision goes nuts and don't do what "expected imho" I'll be glad if Rich point me to some reading, or example - Still think how to implement the different play states Start scree, Playing, and Game over Here is the TS source: http://mihail.ilinov.eu/games/PhaserBreakout/app.ts Also I'll be happy if someone takes a time the restructure the game to not be in one big .js And of course when this is finished it will be added to the Breakout projects, and i think it's going to be useful for all new comers to Phaser
  3. Arlefreak

    Best size for game assests

    I will start making the resources for my game, and I wanted to know what is the best size to make my sprites, or my backgrounds? is it better to make a large asset and scale it, or make several sizes and load them depending on the resolution of the screen.
  4. Hattraz

    Render in HTML Element

    I may be mistaken, but I think Phaser handles the generation of the canvas/WebGL markup/placement. Is it possible to give it a particular HTML element to render within?
  5. I am trying to run the example "play sound 1" from Phaser 1.00TS083 Tests/audio, but it doesn't seem to work on mobile. On my iPod touch 4th gen with iOS 6.1.3, when running the example, the sound doesn't play when pressing the button and the browser crashes after a few seconds. Should this test be running on my iPod touch ?
  6. Alvin

    Weird Tilemap rendering

    Hello, I'm encountering a weird bug when I try to render a tiledmap (exported from Tiled) using Phaser : I've just modified the Phaser test suites and included my files to make sure that it wasn't a problem from my code and I still get the same problem. I've tested with the 095, 097, and 1.0TS083 test suites. This is what the map should look like : You can find the files causing problems here : http://www.webeled.com/debug/weirdmap.zip Thanks
  7. I've been using Phaser for more than a week now, making my first polished Html5 game. I have a good experience with Flixel, so I was looking forward to using Phaser. Yesterday I upgraded to 1.00TS083. I will try to post here all the problems, suggestions and even small fixes I've found. Overall, I've been pretty pleased with the framework. Getting something up and running on my iPod touch was relatively easy and the performance is good enough. I am sticking to 320x480 for now and the graphics scale really well on mobile. The various examples available with Phaser are really helpful and in general are enough to learn how to use the engine, although it's not uncommon to jump into Phaser's code just to get a better understanding of how things work. In the next posts I will point to some things I think are missing or incorrect in the engine.
  8. Arlefreak

    Elapsed function ?

    So I'm new to this, i have achived to do this, but i can't get the sprite to jump correctly, i was trying this metod but i can't find a elapsed function, any way to ahive this? PD: No pressure, but any news about 1.0 ? I'm looking forward to ir great work BTW PD: Sorry for the bad english.
  9. Paul-Andre

    Starting with Phaser and Javascript

    Oh, please forgive me if I'm missing something so obvious here. I wish to use Phaser from Javascript and I don't know where to start, and since there is no API documentation, I'm completely lost. The test suit is something, but there are multiple things that I don't really get. For example, if I'd like to create a TileMap and populate it grammatically, what should I do? Also, are there some complete game examples or tutorials in Javascript that I could play with? Everything I find seems to be for Typescript.
  10. I really really, like the way phaser is setup, but at the same time I want pixi for my renderer. Is there any plan for implementing pixi in phaser or has someone done so? Or am I just crazy, and it's not a good idea? Regards, O.
  11. Tácio Sousa

    More questions about the Phaser workflow

    I'm here again with a little bit more questions. I want to know how i do to : - Pause the game. (I've tried game.pause, game.paused, game._paused and more other pause methods and all results in error) - Stop the game controls. (Things inside update, input checks, player moves, ...) - Play sounds/musics. I'm making a "Aero Fighters" clone, and i'll need this for the ending of every stage, something like "final stage animation". Thanks for anyone who help me.
  12. Hey, as requested in this thread - I made a small tutorial on how to setup phaser using FlashDevelop. This tutorial is based on the fantastic phaser-project-template done by jesse freeman. A flashdevelop project template is attached to this post. So, here we go... 1.) Install NPM 2.)Install typescript npm install -g typescript3.)Install and launch FlashDevelopThis tutorial uses FlashDevelop Version 4.4.0RTM 4.)Create a new TypeScript Project (Project->New Project->Typescript) 5.)Create a new folder within your project called "lib" 6.)Download PhaserThis tutorial uses Phaser0.9.5 7.)Copy Phaser directory (including the typoscripts) to you lib-folder 8.)Adjust project properties to compile to ES5 targetRight Click on Project Name -> Properties -> Build Tab -> add "--target ES5" to the Pre-Build Command Line textfield 9.)Press F8 (Build project) 10.)Open the bin/index.html in your browserNote: if you use assets please use a web server Hope this helps a bit. Best,benny!PhaserFlashDevelopTemplate.zip
  13. Tácio Sousa

    My game don't run iPad 1

    I'm here again with new problems! o/ I make this simple test game (http://eukito.com.br/teste/phaser) to check the input on mobile only clicking on the screen, and open him in one iPad 1 and another iPad 4 (both with safari browser). In the iPad 4 the game is running perfect (except when turning around the iPad, when you do this, the game disappear), but in iPad 1 the game doesn't run, and throws my old friend error : "undefined is not a function". Can anyone help me with this 2 problems?
  14. Tácio Sousa

    Another question about Input

    I want to know how i do (if this can be make) to change the "game.input" to "specificObjet.input", in this case i don't want the mouse click in all stage, but in only one specific "button" object (like the FlxButton or like some android and IOS games). Can anyone help me?
  15. rich

    Phaser 0.9 Update

    Large refactoring. Everything now lives inside the Phaser module, so all code and all tests have been updated to reflect this. Makes coding a tiny bit more verbose but stops the framework from globbing up the global namespace. Also should make code-insight work in WebStorm and similar editors. Added the new GeomSprite object. This is a sprite that uses a geometry class for display (Circle, Rectangle, Point, Line). It's extremely flexible! Added Geometry intersection results objects. Added new Collision class and moved some functions there. Contains all the Game Object and Geometry Intersection methods. Can now create a sprite animation based on frame names rather than indexes. Useful when you've an animation inside a texture atlas. Added test to show. Added addKeyCapture(), removeKeyCapture() and clearCaptures() to Input.Keyboard. Calls event.preventDefault() on any keycode set to capture, allowing you to avoid page scrolling when using the cursor keys in a game for example. Added new Motion class which contains lots of handy functions like 'moveTowardsObject', 'velocityFromAngle' and more. Tween Manager added. You can now create tweens via Game.createTween (or for more control game.tweens). All the usual suspects are here: Bounce, Elastic, Quintic, etc and it's hooked into the core game clock, so if your game pauses and resumes your tweens adjust accordingly. Tidied up every single class now. Common header formats, started work on docs and lots of house keeping.
  16. benny!

    Collision Question

    Hi, since I do not want to spam the announcement thread - I started to post a new thread for this question. I have not tried the code myself - but just browsing through the example codes I wonder what the "collides" variable should mean: myGame.collide(car, melon, collides); I do not see where it is instantiated referring to the following code: http://gametest.mobi/phaser/collision/collide%20sprites.js So, I assume it is undefined. Nevertheless, so far I really like the whole syntax of phaser. Looks pretty clean and simple. Best, benny!