4 ms·
I like how you're using standard HTML elements for the important bits outside of the game's main display. That is a great idea and seems like an efficient way (
by jcromartie 15y ago
I like how you're using standard HTML elements for the important bits outside of the game's main display. That is a great idea and seems like an efficient way (in terms of level of effort, not reinventing the wheel) to build a UI and tools for a game like this.
- ajuc 15y agoIt's also making canvas window smaller, so it runs faster :) At least when it's using canvas software renderer, 20% of screen size is making a big difference in fps (on my old PC 30 versus 37 fps). But it would be worth it just for much simpler ui programming.
- jcromartie 15y agoAnd not just simpler, but way simpler, and way easier to get nice results. Think of all the stuff you get "for free" by using HTML in a modern browser. You'd have to write all this stuff by hand or lean on a game library to implement: text input, input focus, buttons, UI events, styled text (bold, italic, etc.), text shadows, box shadows, skinned UI (CSS). In fact, I bet big name games will increasingly embed things like WebKit and use HTML5 and CSS for their UIs in the future.