rich Posted April 24, 2013 Share Posted April 24, 2013 Pretty big update this time! Added the new ScrollZone game object. Endlessly useful but especially for scrolling backdrops. Created 6 example tests.Added GameObject.hideFromCamera(cameraID) to stop an object rendering to specific cameras (also showToCamera and clearCameraList)Added GameObject.setBounds() to confine a game object to a specific area within the world (useful for stopping them going off the edges)Added GameObject.outOfBoundsAction, can be either OUT OF BOUNDS STOP which stops the object moving, or OUT OF BOUNDS KILL which kills it.Added GameObject.rotationOffset. Useful if your graphics need to rotate but weren't drawn facing zero degrees (to the right).Added shiftSinTable and shiftCosTable to the GameMath class to allow for quick iteration through the data tables.Added more robust frame checking into AnimationManagerRe-built Tilemap handling from scratch to allow for proper layered maps (as exported from Tiled / Mappy)Tilemap no longer requires a buffer per Camera (in prep for WebGL support)Fixed issues with Group not adding reference to Game to newly created objects (thanks JesseFreeman)Fixed a potential race condition issue in Game.boot (thanks Hackmaniac)Fixed issue with showing frame zero of a texture atlas before the animation started playing (thanks JesseFreeman)Fixed a bug where Camera.visible = false would still renderRemoved the need for DynamicTextures to require a key property and updated test cases.You can now pass an array or a single value to Input.Keyboard.addKeyCapture().Try out the new Blasteroids demo (arrows to fly, space to shoot) https://github.com/photonstorm/phaser Link to comment Share on other sites More sharing options...
initials Posted April 24, 2013 Share Posted April 24, 2013 Amazing update. Extra thanks for including ability to load maps from Tiled, which is a great editor. Just wondering if you plan to include a demo that would show how to subclass a Phaser.Sprite, for example if you wanted to have your ship in Blastoids as a file called "Ship.ts" in the Scroll Zones folder. I spent a bit of time on it, reading about Internal Named Modules, but I couldn't really find an elegant solution. It's an amazing framework, and congratulations. I hope your HTML5 business is doing well! Link to comment Share on other sites More sharing options...
rich Posted April 24, 2013 Author Share Posted April 24, 2013 Yeah I'll try and sort out an example for this. You can kinda of see it in the Sprite Emitter particle test, where I do exactly that for a custom Particle. But I know it'd be better to have a proper Sprite example too. Link to comment Share on other sites More sharing options...
rich Posted April 24, 2013 Author Share Posted April 24, 2013 Oh and sorry guys, I forgot to tag this update until it was too late (that's what you get for pushing at 3.30am!) Link to comment Share on other sites More sharing options...
Hsaka Posted April 24, 2013 Share Posted April 24, 2013 Great update! I was just wondering if you were considering including the option to create text game objects? For my game it would be cool to be able to manipulate and tween text labels. This is how I subclass Phaser.Sprite, not sure if it's the best way to do it but it works: class Block extends Phaser.Sprite { constructor(game: Phaser.Game, x?: number = 0, y?: number = 0, key?: string = null) { super(game, x, y, key); game.world.group.add(this); }} Link to comment Share on other sites More sharing options...
rich Posted April 24, 2013 Author Share Posted April 24, 2013 Yes proper text support is a pre-1.0 feature (bitmap fonts, glyphs, canvas text) along with input detection on GameObjects and tilemap collision - although I'm nearly done on that Link to comment Share on other sites More sharing options...
Recommended Posts