Jump to content

camera vs. object movement


Recommended Posts

I am working on a vertical scrolling shmup with phaser. Due to some special game mechanics I want the player not to appear centered but slighty down (like in space invaders). Phaser camera follow does not support offsetting the camera by defauit so I was wondering if it wouldnt' be easier to move the objects around rather than the camera in the game worl and keep the player and the hud elements in place. Is there a fundamental difference between the two methods?


Thx in advance

Link to comment
Share on other sites

In general, I think it's easier to keep the player static and move the objects around for scrolling games like the one you're describing.

If you wanted to move the player and have the camera follow, you could probably implement your own camera behavior by setting the game.camera.y position in the update function. You would offset that position from the player.y position by however much you wanted. Thus you could have the camera follow the player but not have the player in the middle.

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.

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.


  • Recently Browsing   0 members

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