GoogleMax2D
Community Forums/Showcase/GoogleMax2D
| ||
Google rendering in Max2D :-)![]() and the code : SuperStrict Framework cef.cef Import brl.glmax2d InitCEFApp() Graphics 1088, 832, 0 Local browser:TCEFBrowser = New TCEFBrowser.Create("http://google.com", 1024, 768) While Not KeyDown(KEY_ESCAPE) UpdateCEF() Cls Local image:TImage = LoadImage(browser.pixmap) DrawImage image, 20, 20 Flip Wend The concept : * I wondered how I might render an HTML-based/externally driven UI in BlitzMax. Rather than work out clever graphics stuff in BlitzMax to do menus, tables and so on, why not borrow the strength of HTML/JS/CSS to do it for me? * It appears to be a (fairly) popular way of adding a UI to games - for example there are similar things such as Scaleform which many AAA games use (based on Flash/ActionScript 3). The implementation : * Uses Chromium Embedded Framework (CEF) to render the page. (a WebKit-based engine) * My colour format is wrong RGBA instead of ARGB, hence the funky colours. * Not entirely efficient yet as you can see by the image loading. But as a proof of concept, it's not so bad. * Cross-platform and 64-bit supported. The background can be set to transparent, and your page can be any size, so in theory you could render little parts of your UI separately with different "browsers". Haven't tried interaction yet (i.e mouse movement and clicks), but youtube videos play, with sound ;-) Anyways, I should probably be doing something more useful with my time - like bcc_ng... :o) |
| ||
Awesome! How much does it add to the size the executable? Or is it dynamically linked? |
| ||
You're a bonnie lad, Brucey. Glad Scotland didn't make tracks and take you with... ;) |
| ||
Ohhhhhh! It's Christmas time?!?!?? Nice, very nice! |
| ||
Yay, now installing adblock for blitzmax *joking*. Think the filesize increase is much higher than with other html-viewers (as it is more "feature complete") - what a pitty. Cannot imagine how to use it as "[G]UI"-replacement. bye Ron |
| ||
Awesome, as always! Looks nice and easy to use, too. |
| ||
Awesome, html esque front ends, I've seen some hardware configured with a similar thing. |
| ||
This is great! I looked into this a while back and couldn't figure out how to get it working, so hats off to you. :) Can you access the render as a texture? EDIT: Apparently, the answer is yes! :) |
| ||
Cannot imagine how to use it as "[G]UI"-replacement. Chromium gives you everything that can be put on a web page, including WebGL. If the GUI is a separate page, then it can work immediately for doing things like tracking progress and stats. If it can be rendered to a texture, then it could be overlaid and used as a GUI, though it might be a bit slow. It also has the advantage of reusability - a leaderboard implementation could be used in game and on the game's web site.Personally, I think there's no substitute for a great 2D in 3D GUI system, but Chromium definitely provides an exciting alternative. |
| ||
Can you access the render as a texture? Don't see why not -- you have Image and Pixmap access right there: Local image:TImage = LoadImage(browser.pixmap) |
| ||
..you have Image and Pixmap access right there D'oh! Clearly, I wasn't paying attention! :OIt would probably be a bit slow, but good enough for many applications. Still, I wonder how the pixmap gets created and if there is a way to generate a texture in more direct fashion.. |
| ||
Wow amazing work :) I'm really interested in getting this working on minib3d, how easy would it be and have you put your current code online yet brucy? |
| ||
Awesome ! Totally awesome ! Does that means that a html5 app (made in Monkey) could run inside a Bmax app ? Useless but fun idea... |
| ||
Cool! Does this mean we could in theory build our own browsers without having to resort to IE? Can't wait to download this :) |
| ||
Does this mean we could in theory build our own browsers without having to resort to IE? Yes, that's what it means. All that and more! :) |
| ||
Sweet. :) . . .and Brucey I just got your database mod going, also so sweet. :D |
| ||
Amazing.. Also, that means you're also integrating the CEF JavaScript JIT engine? |
| ||
Interesting :) So i can get multiple pages and show them in a mosaic? |