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

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.