enpu

Panda Engine 2 development

300 posts in this topic

Multiple animations now implemented:

var player = new game.Animation(	'player1.png',	'player2.png',	'player3.png');player.addAnim('jump', [0, 1]);player.addAnim('run', [0, 1, 2, 1, 2]);player.play('run');// Change properties for each animplayer.anims.jump.speed = 10;player.anims.jump.loop = false;player.anims.run.reverse = true;// Define properties on addAnimplayer.addAnim('jump', [0, 1], { speed: 5 });// Play from specific frameplayer.play('run', 2);
PixelPicoSean likes this

Share this post


Link to post
Share on other sites

@enpu, you're hero :D

Love the new API, even better than I've expected.

 

@ThanosS

It is not hard to implement, but the structure of data may not be the same for everyone. And if you don't have a specific tool to generate these json files, it does not have benefits either. So I'd suggest not to add it as a core feature of Panda.

Share this post


Link to post
Share on other sites

Some new things:

 

- Audio fading (Web Audio)

- Better hires support, no need to place objects with game.scale number anymore.

Share this post


Link to post
Share on other sites

So engine itself manages hires, I like it  :D

Just tested the new fade in/out feature which is great. I'd suggest to add fade in/out support for music too, which might be more useful.

 

Looks like there're only Graphics and TilingSprite are not finished, are you going to publish any alpha/beta versions before final release?

Share this post


Link to post
Share on other sites

Some new things:

 

- Audio fading (Web Audio)

- Better hires support, no need to place objects with game.scale number anymore.

Just wondering if there is a way to override this default hires functionality without editing with the engine files?

also not related to this update but from my testing with the video feature I noticed it doesn't work in cocoonjs do you know why?

Share this post


Link to post
Share on other sites

So engine itself manages hires, I like it  :D

Just tested the new fade in/out feature which is great. I'd suggest to add fade in/out support for music too, which might be more useful.

 

Looks like there're only Graphics and TilingSprite are not finished, are you going to publish any alpha/beta versions before final release?

 

game.audio.fadeIn(game.audio.currentMusic); ;)

Share this post


Link to post
Share on other sites

Just wondering if there is a way to override this default hires functionality without editing with the engine files?

also not related to this update but from my testing with the video feature I noticed it doesn't work in cocoonjs do you know why?

 

What do you exactly mean by overriding default hires functionality?

Share this post


Link to post
Share on other sites

Hi @enpu

 

I know that 2.0 is a work in progress, but I just wanted to  try it out :)

 

There are some things that don't work, like tweens and the fader plugin etc.

 

I assume that this is normal, just wanted to double check :)

Share this post


Link to post
Share on other sites

Hi @enpu

 

Basically, I've just made an animated Splash screen using tweens.

 

When using the Master version - things work perfectly

 

When using Develop, Im getting weird artifacts, missing graphics etc.

Share this post


Link to post
Share on other sites

Hi @enpu

 

I zipped up my project and emailed it to you so you can have a look if you need.

 

It's very simple - just an animated splash screen.

 

Let me know if I can do anything else.

 

Thank you!

Share this post


Link to post
Share on other sites

Thanks, will take a look!

 

edit: Ok there was some issues loading sprite sheets, i have made custom exporter for Texture Packer to clean the JSON from unnecessary data, the loader was not compatible with older JSON format, but it's fixed now.

 

Another major thing is the anchor point, that is now using pixels instead of percents, that gives you imho more precise control, and allows you to easily place the anchor point outside of the sprite.

 

Tweens seems to be working correctly.

Share this post


Link to post
Share on other sites

Hi @enpu

 

Thanks!! I fixed the anchor points, but there still seems to be problems.

 

- I can't seem to tween a 'container' with sprites inside (sprites alone tween fine).

 

- The scaling modes don't seem to work correctly, when using 'hires' or 'retina'.

 

- The Fader Plugin throws an error.

 

Just letting you know :)

Share this post


Link to post
Share on other sites

Can you show your tween code, i can't see anything wrong when tweening containers.

Share this post


Link to post
Share on other sites

Hi @enpu

 

var ninja = new game.Container();

ninja.position.set(240, 432);
mg.addChild(ninja);
 
I then add body parts into the container and tween the whole thing like this ...

 

game.scene.addTween(ninja, {y:248}, 200, {delay: 500, easing:'Quadratic.Out'}).start();

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.