For use as UI for desktop games

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

For use as UI for desktop games

Postby Rick » Fri May 22, 2015 6:39 pm

I ran into CEF from looking for html/css/javascript resources to use as a UI for a desktop engine that uses OpenGL. I'm curious if this is something that it's capable of doing? Ideally the webpage would display on top of the already existing rendered OpenGL game widow with transparent parts so the game shows through and input for the game is still allowed. Is this something CEF could possibly provide? The game engine is in C++ so I have access to the project and can access the window handle. I really think using html/css/javascript is an ideal situation for desktop game UI's because of all the benefits that come with it. The major flaws is that I haven't found anything that has done this well or they want you to embed the buffer of your game into the html directly which I think is backwards and not what a desktop game developer would want to do.

Just curious if anyone has thoughts on this with CEF.

Thank you!
Rick
Newbie
 
Posts: 3
Joined: Fri May 22, 2015 6:33 pm

Re: For use as UI for desktop games

Postby magreenblatt » Fri May 22, 2015 8:18 pm

Yes, this is possible and has been done. See for example viewtopic.php?f=11&t=808 or viewtopic.php?f=6&t=11062.
magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm

Re: For use as UI for desktop games

Postby Rick » Fri May 22, 2015 9:31 pm

So the idea is to render the html to an offscreen buffer that I can then draw on top of my game window? These examples are interesting but they don't use it as game GUI's but just more like putting the html on 3D planes. I wonder if there would be any gotchas with using it for a GUI where the buffer is overlayed on the screen.

Also, does CEF have all the same security that chromium has? If I'm thinking of only allowing local pages to be used I wouldn't really need all that security stuff so I assume I'd have to heavily modify Chromium to remove the security stuff or does CEF do that stuff already?
Rick
Newbie
 
Posts: 3
Joined: Fri May 22, 2015 6:33 pm

Re: For use as UI for desktop games

Postby magreenblatt » Fri May 22, 2015 10:23 pm

What security features do you think you need to remove and why?
magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm

Re: For use as UI for desktop games

Postby Rick » Sat May 23, 2015 6:35 am

I guess I'm thinking of speed and bloat (just extra code not needed) and possibly some javascript restrictions removed like node-webkit does (access local resources?). Stuff like that I guess. The biggest issue I hear when I tell people that html/css/javascript being used for desktop game UI's is that it's too bloated and possibly slow.
Rick
Newbie
 
Posts: 3
Joined: Fri May 22, 2015 6:33 pm

Re: For use as UI for desktop games

Postby magreenblatt » Mon May 25, 2015 11:44 am

Rick wrote:I guess I'm thinking of speed and bloat (just extra code not needed) and possibly some javascript restrictions removed like node-webkit does (access local resources?).

You can allow access to local files in CEF as well.

Rick wrote:The biggest issue I hear when I tell people that html/css/javascript being used for desktop game UI's is that it's too bloated and possibly slow.

Sounds like an opportunity to create a prototype and draw your own conclusions.
magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm


Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 25 guests