codevinsky

[Plugin] Juicy: Simple Effects Plugin based on the "Juice it or Lose It" presentation

Recommended Posts

If you're not familiar with the presentation, it's vital that you go watch it: 

 

Now that you've done that, this plugin currently allows you to easily implement the following effects:

  • Camera Shake
  • Screen Flash
  • Object Trails
  • Over Scaling
  • Mouse Stretch
  • Jelly Effect

 

DEMO

 

SOURCE

 

I've made a pull request and I hope rich will merge it into the official repo.

 

 

Share this post


Link to post
Share on other sites

I took that screenshot while playing your demo on heroku. In my own game, if I force canvas mode it works, but I see the outlines of the individual triangles that make up the trail  :wacko:

Share this post


Link to post
Share on other sites

There are some issues though.

 

In many of the functions you accept arguments, but then you ignore them.

 
    Phaser.Plugin.Juicy.ScreenFlash = function(game, color) {
        color = color || 'white';
        var bmd = game.add.bitmapData(game.width, game.height);
        bmd.ctx.fillStyle = 'white';
 
 
Easy peasy to fix though, but it might be nice to get it fixed before a merge of the pull request.

Share this post


Link to post
Share on other sites

Can you please post an example?

Thanks

 

 

Well, pretty simple code, I just created this two variables

this.juicy=this.game.plugins.add(new Phaser.Plugin.Juicy(this));this.screenFlash=this.juicy.createScreenFlash();this.add.existing(this.screenFlash);

and then I used them with this code

this.juicy.shake();

and

this.screenFlash.flash();

I didn´t try anything else but these two things are working even on mobile :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.