Jump to content

GUI - Html or Canvas


gca
 Share

Recommended Posts

Hi guys,

I'm very new into the game dev scene (1 week new). My idea is to develop games using Phaser and then compile it, using phonegap, for mobile devices.

In this scenario - as I see some no-nos in others. Is it bad practice to use html + jquery and gsap to create the gui of the game, instead of the canvas?

 

I bring a lot of experience of dom manipulation into this new venture and I didn't like the way of positioning things around the canvas. Pixels, ew. I was on my way, building a javascript grid based on the phaser api, to mitigate the previous ew-remark, when I remembered good old html. But... standards, and you got to love standards. What's your view on this subject?

Link to comment
Share on other sites

It depends how much gui you have. A few buttons are easier wth phaser alone. If you plan dropdown menus and off-canvas navigation than css3 is your friend.  Here is example that has gui in html&css3 and phaser for animation render. (Spoiler that is mine): http://demo.irokus.si/irokusplus/kem8uc/kem8_ani_02/

There are no problems with mixing dom and canvas... Just structure you code appropriately. Phaser and jquery have very different ideas about code organization. 

Link to comment
Share on other sites

  • 2 months later...

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...