captainHook

static panels on top of rpg/tilemap game

Recommended Posts

Hi guys,

I am working on a rpg game with tilemap. Everything is ok concerning tilemap integration, but I have a problem that I can't elucidate concerning a kind of UI I would like to create for this game.

Concretely, I need static panels on my game on each side of the tilemap part. But (logically) when I try to implement this, I have a problem with panels coordinates because camera follow the players (whose coordinates reflect tilemap coordinate).

The only trick I found to implement those panels is to adjust panels coordinates on the player one's, but that seems a really poor solution... I wonder if there could be an other solution that would imply other layer/canvas element but dont know how to implement it.

Does someone know to achieve this with phaser3 or give me hints ? 

Share this post


Link to post
Share on other sites

When you're more comfortable with Phaser, you can also consider moving your panels to a separate Scene. That would allow you to keep the UI's display list and logic separate from your gameplay, which may end up being easier to work with. For now, however, I'd go with Olf's solution of using `setScrollFactor`.

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.