should i use html or ige ui font entity

All things HTML5 or text based engines, or really any web based engines.
Post Reply
dnasello
Posts: 11
Joined: Wed Oct 09, 2013 3:13 pm

should i use html or ige ui font entity

Post by dnasello »

I saw in the docs we have the ability to create html divs etc and just offset the canvas. For keeping score, is ige font entity optimal or would using plain html and offsetting the canvas be the way to go?

(this is for a mobile game).
robaldred
Posts: 64
Joined: Tue Aug 27, 2013 5:54 pm

Re: should i use html or ige ui font entity

Post by robaldred »

The IgeUI classes are limited, I think Rob is going to be investing some time in them soon.
It really depends on what you want to achieve and your workflow.
I'm using IgeUIEntity class with smart textures or IgeFontEntity class for all of my UI components, including menus, scores, health bars, messages etc.

The only issue with this method is it's difficult to mock up your interface or menus separate or to make changes later.

Usually I would build my complete interface in HTML & CSS first then control things by showing/hiding/changing things in javascript.
I chose not to do this with the current game I'm building.

With hindsight I maybe have been better to stick to HTML & CSS, doing everything in code makes it very painful & slows my workflow when making even the smallest of visual changes.
foolmoron
Posts: 25
Joined: Wed Sep 11, 2013 3:34 pm

Re: should i use html or ige ui font entity

Post by foolmoron »

Definitely use IgeUiEntities (and IgeFontEntities, which are a subclass) for your UI. This keeps all your stuff within just the canvas element. As for usability, the top/bottom/left/right functions are pretty damn good for positioning UI.

Also, Rob has recently pushed a huge update to the UI system in the dev branch, that allows more HTML and CSS-like positioning of UI elements, still within the canvas. I'm sure he can explain it better (I haven't tried it out yet). Example 5.1 shows how to use it though.
signature
dnasello
Posts: 11
Joined: Wed Oct 09, 2013 3:13 pm

Re: should i use html or ige ui font entity

Post by dnasello »

thanks guys, i will definitely do just a mock up in html first and then go fully js
Post Reply

Return to “HTML5/Web Engines”