rich

Please help test the Phaser 1.1.4 release

Recommended Posts

Hmm that's strange, because :

  • I modified the script to add cameraOffset on the text, it works for the first text, but the second is not displayed
  • On sprites, it works without cameraOffset... And it's new, it did not work on 1.1.3

My new code :

         var s1 = game.add.sprite(game.world.centerX, game.world.centerY, 'totoro');        s1.fixedToCamera = true;        var s2 = game.add.sprite(game.world.centerX + 100, game.world.centerY + 100, 'totoro');        s2.fixedToCamera = true;                // Add text        var style = { font: "12px Arial", fill: "#ffffff" };                var t1 = game.add.text(10, 10, 'This is the first sentence', style);        t1.cameraOffset(10, 10);        t1.fixedToCamera = true;        var t2 = game.add.text(100, 100, 'This is the second sentence', style);        t2.cameraOffset(100, 100);        t2.fixedToCamera = true;

Share this post


Link to post
Share on other sites

I am seeing some collision issues with Tilemaps. I have something setup to show what I mean here:  http://play.reminiscencegame.com/example/

 

If you move left/right into a wall, sometimes there is a gap, and sometimes there isn't.

 

There also appears to be a 1px gap between the character and the floor.

 

 

From what I see here, it looks like this will be fixed, but I just wanted to provide an example.

 

 

EDIT:  I have also had things get stuck like in the screenshot attached.

post-4958-0-99616300-1390252520.png

Edited by RestingCoder

Share this post


Link to post
Share on other sites

am I missing something the src/phaser.js for the git tag ("1.1.4") sha d9ffd6afd47f198a197e129723f15f6aa5538231 is version 1.1.3. 

 

I also saw that.
 
@photonstorm: It's ok clone the dev branch to test the 1.1.4?

Share this post


Link to post
Share on other sites

i tested out the phaser touch analog stick on my ipad 1 and ipad 2 and the touch detection was really buggy. sometimes i found myself having to drag my finger along the top left and right of my screen to move the analog stick which is on the very bottom left of the ipad screen. 

Share this post


Link to post
Share on other sites

Hi,

 

in the previous version there was a ''wasTouching'' property for the Body class. This was useful for preventing e.g. repeating bounce sounds

 

// prevent sounds repeats
if(this.body.wasTouching.down)
    // skip bounce sound
 
Is there another way to do this in 1.1.4 ?
 
Thanks

Share this post


Link to post
Share on other sites

Hi all,

 

I just pushed a brand new build up into dev, including all the new examples, the new build files and other bits and pieces.

 

I'm about 95% sure I'm going to release this today. I've got one annoying bug left that I want to nail, but otherwise it's a pretty monster update! Loads of API changes though. But check out the new collision - polygon stuff :)

Share this post


Link to post
Share on other sites

Cool news, I will try it on my game later today.

 

The latest (yesterday evening) version had no working collision on tilemaps + gravity.. so I hope that's fixed now.

 

I have got a question though:

 

In Phaser 1.1.3 there was the option to set collision for tilemaps in so that they only collide from above / below / left /right.

This seems to be missing from the 1.1.4 Version. - But it's kind of a must have feature for mario style jump and runs.

(Where you can jump through many platforms from below, but then walk on them.)

 

Am I just missing how this is done now, or is it actually missing (if so are there plans to bring it back)?

 

Thanks for any info on this,

JP

Share this post


Link to post
Share on other sites

Thank you !

 

You left a console.log :-/

updateScale 0.8993682499994975 0.8993682499994975 phaser.min.js:12

And please, can you tell me what appened to the "center" variable of Body ?

 

I probably left loads of console.logs!

 

Center has gone because now you have a polygon for the collision shape it didn't really make sense any more.

 

re: the tiles, I'll do an example showing n-way collision.

Share this post


Link to post
Share on other sites

I probably left loads of console.logs!

 

Center has gone because now you have a polygon for the collision shape it didn't really make sense any more.

 

re: the tiles, I'll do an example showing n-way collision.

Thank you for the answer.

So sprite.body.polygon.pos is the "new" center, right ?

Share this post


Link to post
Share on other sites

It depends on the shape and its rotation, but by default with a standard rectangle body.x/y would be the top-left and you could derive the center easily by taking that and body.width/height and halving them. This is also true for circles.

 

Body.left/right/width/height are calculated based on the rotation of the points, so can (and will) change if you rotate the body. Leave it untouched and it should be fine. Body.polygon.pos shouldn't really be touched directly (and should match body.x/y anyway). Circle shapes don't have any polygons, hence the way the x/y getter works.

Share this post


Link to post
Share on other sites

Thank you again for this informations !

I don't rotate my sprite but its body have an offset and a different width and height than the sprite. I can compute center easily but I would know if it's already done by Phaser.

 

Again, thank you !

Share this post


Link to post
Share on other sites

Hi Rich,

 

Quick feedback:

 

With the latest 1.1.4 I have the following problem:

 

Pretty standard stuff: player sprite, gravity enabled, colliding with a tilemap

 

The player sprite is stopped by the "ground" (the colliding tiles) but: spirte.body.touching.down is only set for one call to update() in the following calls to update (while the player sprite is standing on the ground) sprite.body.touching.down is false.

 

(In my case this leads to not being able to jump and playing the wrong animation).

 

Should I use something else to check if the sprite is "on the ground", or will this work when 1.1.4 is done?

 

If you need a quick demo showing the problem I'll make one, just let me know.

 

Thanks,

JP

Share this post


Link to post
Share on other sites

Yes this is related to one of the final few things on my list: when a body lands on the ground (or a tile) and it has bounce > 0, it will enter a 'flux' state. Visually it may not change at all, but internally its delta values toggle back and forth between super low values - not enough to move it, but enough to cause the 'blocked' flag to reset. If the body had a high velocity you can see it 'jiggling around' on the tiles.

 

I'm open to suggestions on how to fix this actually, because it's quite annoying :) and really hard to determine the difference between what is a 'jittery' rebound, and what is just the beginning values of a normal rebound.

Share this post


Link to post
Share on other sites

same issue as @jpdev.

 

also, when using parallax scrolling, the background layers seem to "jump" a bit where they didn't use to. I've added a 'dev-phaser-1.1.4' branch to nadion (https://github.com/jcd-as/nadion) with the changes I've made to run under 1.1.4. the sample should show the issue if you go to the 'bushes' just to the right of where you start and walk back and forth quickly. not a show stopper perhaps, but something to be aware of.

 

re the bouncing problem, I imagine it's not possible to clamp the very low values because you would lose the start of an 'actual' bounce as well as the 'jittering'?

 

cheers

Share this post


Link to post
Share on other sites

I've found an issue with sprites placed within Groups, causing them to fly off the screen. It's to do with the Body using the wrong sprite coordinates, so I'll do a fix for that this weekend.

 

Is the parallax thing to do with layers in a tilemap? Or some other way?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.