Jump to content

Follow multiple sprites with camera


nkholski
 Share

Recommended Posts

I couldn't resist the urge to create a two-player co-op mode to my Metroid clone and needed a camera that could follow both players. This feature was surprisingly easy to add to Phaser's Camera.js. I put a demo and source code for anyone interested on my Metroid dev-blog: http://metroid.niklasberg.se/2016/03/27/two-player-support/

I haven't tested things such as deadzone and the code is not checking for parents because it's not needed in my specific case, so the code is not fit for a PR on GitHub. However, I guess it would be trivial to test it and add the missing functionality if there is a demand.

Link to comment
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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...