Jump to content

  • Log In with Google      Sign In   
  • Create Account

Question about using webkit for GUI in games...


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 lmbarns   Members   -  Reputation: 460

Like
0Likes
Like

Posted 18 July 2012 - 11:15 AM

So is this something you have to implement at the engine source level? I always thought a webkit was just a standalone browser with a JS engine. I was looking at using one for an html5 game I was working on hoping to bundle googles v8 engine to maintain a level of performance while also launching the web game in a standalone window.

I saw the game Overgrowth (the game with the jumping/fighting rabbit) was using this webkit framework http://awesomium.com/ inside the engine so they could use css, javascript and html to structure their menu's/GUI system....in game.

Using css/jquery/etc seems like a dream for creating elaborate menu systems, far easier than using Rects(for me, maybe I need to learn a better way). I imagine it has to be slower or something or why wouldn't every engine incorporate it?

Also thinking about web technologies, aren't they efficient? I mean you can surf the web on a really weak phone or an old 486 with windows 3.11. Would it not be good for mobile games?

So I assume there's a reason nobody does it.....can anyone fill me in? Too hard to coordinate with renderer or game window? Too slow? Incompatible???

EDIT::THANKS for the responses guys, that clears it up, I figured I'd edit this instead of bumping the thread. Thanks.

Edited by lmbarns, 20 July 2012 - 10:12 AM.


Sponsor:

#2 ApochPiQ   Moderators   -  Reputation: 16391

Like
0Likes
Like

Posted 18 July 2012 - 12:12 PM

A browser is a very heavy-weight thing to include in a game just for a UI. Of course, depending on your requirements, that may not matter; but for a mobile game for instance, packaging an entire browser into the game where you could have just drawn some natively rendered widgets is a complete waste of resources.

#3 6677   Members   -  Reputation: 1058

Like
0Likes
Like

Posted 18 July 2012 - 05:07 PM

I think that game is using it simply because its so easy to write up some quick HMTL documents, make a few PNG's and cram a little bit of JS in there and bam, got something that looks like a GUI for a game, set the background colour of the HTML body to be transparent (possible in awesomium) and draw it the same size over your main openGL window or whatever, there you go, won't look any different to a hard coded GUI. A hard coded GUI will always be far more efficient.

On the topic of awesomium though, I have seen some other nice things done with it, it can render to a PNG in real time which can then be used as a surface texture, I've seen a tech demo done with Ogre3d where the crosshair of a first person camera was being mapped as an X,Y co-ordinate on a 2d surface. This 2d surface was just sitting vertically in a hilly terrain, nothing special about the terrain, its just there. The cool part was awesomium behind the scenes was being rendered to a texture for this 2d surface, all backgrounds were overridden to be transparent. Essentially there was a floating google logo and a few text boxes (URL, search etc) and of course the search button. It cast shadows aswell which was pretty awesome.

#4 Chris_F   Members   -  Reputation: 2460

Like
0Likes
Like

Posted 18 July 2012 - 06:21 PM

Awesomium is awesome and all, but a heads up, there is a free alternative. http://berkelium.org/




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS