Torque 3D Embedded Browser (WebKit)
by Josh Engebretson · in Torque 3D Professional · 01/15/2010 (8:55 pm) · 305 replies
Hey guys,
Here are some highlights:
1) It uses QtWebKit which is based off Apple's WebKit, the same HTML5/Canvas based web rendering engine from Chrome, Safari, Adobe AIR
2) QtWebKit is *easily* the best designed embeddable web browser I have found in exhaustive travels... (I actually compiled Chrome from source at one point, not recommended). Qt is *extremely* well supported and owned by Nokia who recently paid $153,000,000 for it. So, it is probably going to be around for some time.
3) Flash works :)
4) It is setup as a GuiControl so interacts perfectly with mouse events, control overlap, filters...
There are currently 3 rendering modes:

1) Render to Texture: This mode renders the web view to an offscreen buffer and then uploads it to a GFXTexHandle. It uses the Torque GUI system input for mouse and keyboard. As we're rendering to a texture, compositing and rendering to 3d surfaces is possible. Flash renders as long as it is set to windowless mode in the HTML (not a big deal). Instead of using Flash for anything other than presentation/video playback, I would suggest looking into Canvas/HTML5/CSS animations/effects in this mode.

2) Render Native: This mode integrates a native child window with Gui Control, giving the best of both worlds :) There is no need to render to texture as we're using an actual clipped child HWND which uses the Torque GUI system for position/extents and focus :) Transparency does not currently work, however under Vista/Win7 this should be possible. I should be able to get masking working with minimal effort, which would allow for shaped windows and transparent areas.

3) Render Popup: This mode pops up a standalone window, which is owned by the application and consistent in scripting with other modes. This is useful for things like integrated document browsing, tutorial video watching, game doc reading, game forum reading, etc... where you don't want to crowd your game interface with browser. However, you want CLOSE scripted integration with a standard browser (no worries of IE/Mozilla/Chrome), which isn't possible with the current "launch browser" functionality.
These modes work with HTTPS adding a nice way to authenticate to servers, secure purchasing, etc.
It is still pretty early in the development and the idea with the code release will be to get feedback on usability and features... especially WRT integration with Javascript on the page, etc.
EDIT: The first version has been released and is available HERE
Regards,
- Josh Engebretson
Mythos Labs, LLC
Here are some highlights:
1) It uses QtWebKit which is based off Apple's WebKit, the same HTML5/Canvas based web rendering engine from Chrome, Safari, Adobe AIR
2) QtWebKit is *easily* the best designed embeddable web browser I have found in exhaustive travels... (I actually compiled Chrome from source at one point, not recommended). Qt is *extremely* well supported and owned by Nokia who recently paid $153,000,000 for it. So, it is probably going to be around for some time.
3) Flash works :)
4) It is setup as a GuiControl so interacts perfectly with mouse events, control overlap, filters...
There are currently 3 rendering modes:

1) Render to Texture: This mode renders the web view to an offscreen buffer and then uploads it to a GFXTexHandle. It uses the Torque GUI system input for mouse and keyboard. As we're rendering to a texture, compositing and rendering to 3d surfaces is possible. Flash renders as long as it is set to windowless mode in the HTML (not a big deal). Instead of using Flash for anything other than presentation/video playback, I would suggest looking into Canvas/HTML5/CSS animations/effects in this mode.

2) Render Native: This mode integrates a native child window with Gui Control, giving the best of both worlds :) There is no need to render to texture as we're using an actual clipped child HWND which uses the Torque GUI system for position/extents and focus :) Transparency does not currently work, however under Vista/Win7 this should be possible. I should be able to get masking working with minimal effort, which would allow for shaped windows and transparent areas.

3) Render Popup: This mode pops up a standalone window, which is owned by the application and consistent in scripting with other modes. This is useful for things like integrated document browsing, tutorial video watching, game doc reading, game forum reading, etc... where you don't want to crowd your game interface with browser. However, you want CLOSE scripted integration with a standard browser (no worries of IE/Mozilla/Chrome), which isn't possible with the current "launch browser" functionality.
These modes work with HTTPS adding a nice way to authenticate to servers, secure purchasing, etc.
It is still pretty early in the development and the idea with the code release will be to get feedback on usability and features... especially WRT integration with Javascript on the page, etc.
EDIT: The first version has been released and is available HERE
Regards,
- Josh Engebretson
Mythos Labs, LLC
About the author
http://www.TheEngine.Co
#102
I made almost the same changes, and i got the same results. In my case (i do not know if it is a common problem), onRender is not called, and then get a black texture. I have not published before the code, because i had this issue.
09/16/2010 (12:25 pm)
@Konrad:I made almost the same changes, and i got the same results. In my case (i do not know if it is a common problem), onRender is not called, and then get a black texture. I have not published before the code, because i had this issue.
#103
- In a GuiTSCtrl it crashes. (ie. in game)
- It repeats content if the page is smaller than the window.
- It crashes the gui editor if the web app was opened at least once before.
- Dropdown windows for selects are misplaced.
onRender gets called, it renders fine, but there are still some serious issues left to be solved. We'll have to dig deeper and see what's up.
I still wanted to show what we got so far, so maybe someone else can help us find a solution.
09/16/2010 (12:40 pm)
@Alfio: Our control displays fine if we use it from the main menu. But there are a few problems (that I know of):- In a GuiTSCtrl it crashes. (ie. in game)
- It repeats content if the page is smaller than the window.
- It crashes the gui editor if the web app was opened at least once before.
- Dropdown windows for selects are misplaced.
onRender gets called, it renders fine, but there are still some serious issues left to be solved. We'll have to dig deeper and see what's up.
I still wanted to show what we got so far, so maybe someone else can help us find a solution.
#104
The video after my patch:
Attaching my files: HERE
09/16/2010 (7:04 pm)
Ok, i think i've solved almost everything. The problem of black textures i mentioned, is when it should be displayed ingame, onRender in not called. In fact, if i opened the BrowserWnd, the page was displayed, even if incorrect.The video after my patch:
Attaching my files: HERE
#105
I hate to be bringing this up once again, but Alfio, you are going against your license restrictions, you know that, right? You are supposed to buy the source version to work with source. I'm not a license nazi, but you are being downright impudent with your actions. I know this thread is not the place to discuss this, so I'll stop right here and hope it gets some official attention.
Edit: Just watched the video.. never tested it in the original environment, so I'm glad it works then. It must be our code that's breaking our stuff. Thanks for posting that.
09/16/2010 (7:53 pm)
It's basically what I just posted. What is the work you did to solve the issues that you speak of? I could find but a few irrelevant differences that modify texture size.I hate to be bringing this up once again, but Alfio, you are going against your license restrictions, you know that, right? You are supposed to buy the source version to work with source. I'm not a license nazi, but you are being downright impudent with your actions. I know this thread is not the place to discuss this, so I'll stop right here and hope it gets some official attention.
Edit: Just watched the video.. never tested it in the original environment, so I'm glad it works then. It must be our code that's breaking our stuff. Thanks for posting that.
#106
09/16/2010 (8:40 pm)
So how far r u from an updated beta 2 code?
#107
As for my license... from now on (even when I bought a regular license), i will avoid posting code or comment, since it is not acceptable to some.
09/16/2010 (9:15 pm)
The main problem (after the patch for the enum and the allocation of the texture), relates only to the size passed to Qt to render the page. The render (in QT) produced with setting in the QT the same size used by the T3D texture , fills the texture of T3D. Finally then, i reviewed some values in rescale the texture.As for my license... from now on (even when I bought a regular license), i will avoid posting code or comment, since it is not acceptable to some.
#108
Why don't you ask the guys at TorquePowered, the Sickhead crew, Rene Damm, Chris Robertson, and the many more people who work on this day and night whether they find it fair or acceptable?
09/16/2010 (9:23 pm)
Quote:
As for my license... from now on (even when I bought a regular license), i will avoid posting code or comment, since it is not acceptable to some.
Why don't you ask the guys at TorquePowered, the Sickhead crew, Rene Damm, Chris Robertson, and the many more people who work on this day and night whether they find it fair or acceptable?
#109
09/16/2010 (9:43 pm)
I'm tired of continuing to debate with you. Just do not talk more about it, and close this issue definitively. From now on, as i wrote above, you will not see code on my part. I apologize to everyone for sending unintentionally off-topic the discussion.
#110
I personally respect any helping hand even a pirate hook :)
09/16/2010 (9:52 pm)
How did you get the code anyway?I personally respect any helping hand even a pirate hook :)
#111
I also believe that it is inappropriate to have your hands an product without having regularly purchased the license. But what do I do? Suicide or delete everything? I think nobody would do it, included Konrad.
In any case, i always say i must buy the license, but certainly, good or bad it is, i dont participate more to the forum, seen the repeated attacks.
Nobody will see more code on my part. With this i hope to have closed the issue.
09/16/2010 (10:33 pm)
I have got from a friend, but honestly i do not know where he find him. Obviously someone who has a license, and enjoys to sharing it. After all the accusations of Konrad (which i believe correct), i was intrigued and went to do a search on google, and i have noticed that it is not difficult to obtain a copy. In any case, i dont think absolutely it's all my fault. I've had... i find it in my hands... and deepened, waiting to buy the license.I also believe that it is inappropriate to have your hands an product without having regularly purchased the license. But what do I do? Suicide or delete everything? I think nobody would do it, included Konrad.
In any case, i always say i must buy the license, but certainly, good or bad it is, i dont participate more to the forum, seen the repeated attacks.
Nobody will see more code on my part. With this i hope to have closed the issue.
#113
If you had your fun and there is no commercial interest than delete everything since you do not really need it and sign a statement that you no longer obtain any source code so nobody can press charges...
09/16/2010 (11:00 pm)
I still think that if you need to change the code you better get the right to do so and the support you need by simply paying for a licence if you are using it commercially and not just toying around for fun.If you had your fun and there is no commercial interest than delete everything since you do not really need it and sign a statement that you no longer obtain any source code so nobody can press charges...
#114
Initially i bought the binary version to evaluate the product. Then found that the product is interesting (irrespective of the fact that after i got the source package from an friend), i decided to purchase the pro version, but not at this time. If i was not interested, i do not waste time studying the T3D, or trying to fix other people's code (which anyway i take this opportunity to thank). We are not here to comb the dolls :)
09/17/2010 (12:24 am)
@Tomer:Initially i bought the binary version to evaluate the product. Then found that the product is interesting (irrespective of the fact that after i got the source package from an friend), i decided to purchase the pro version, but not at this time. If i was not interested, i do not waste time studying the T3D, or trying to fix other people's code (which anyway i take this opportunity to thank). We are not here to comb the dolls :)
#115
09/17/2010 (12:44 am)
This has happened before .... people pirate the source and pay for a binary license to leech off the support forums.
#116
But to what end? If in the end they do nothing. Will never publish or distribute on the Internet, what they did.
09/17/2010 (12:50 am)
@Chris:But to what end? If in the end they do nothing. Will never publish or distribute on the Internet, what they did.
#117
They stole. It doesn't matter what is done with what was stolen, but the fact that it was stolen is the problem in itself. Just do the right thing and buy a license, since you're using it. The product isn't priced just for those who will succeed at publishing a game, but for people who will use the product.
09/17/2010 (12:55 am)
Quote:But to what end? If in the end they do nothing. Will never publish or distribute on the Internet, what they did.
They stole. It doesn't matter what is done with what was stolen, but the fact that it was stolen is the problem in itself. Just do the right thing and buy a license, since you're using it. The product isn't priced just for those who will succeed at publishing a game, but for people who will use the product.
#118
If the only people to license this engine were people who pirated the engine, made a game and are now ready to publish the cost would be well over 10 times as much, then they could not even afford it.
IA does have a legal team, and a EULA. Put them to use.
09/17/2010 (4:18 am)
I am going to guess 90% of people who license game engines never publish games, and thats what drives prices of game engines to reasonable levels.If the only people to license this engine were people who pirated the engine, made a game and are now ready to publish the cost would be well over 10 times as much, then they could not even afford it.
IA does have a legal team, and a EULA. Put them to use.
#119
Many companies are moving towards open source GPL licenses just because it makes a better product with more free developers. TheGameCreators.com did that with DarkBasic and FPSC Creator and the development was booming since than.
This extension would be implemented much faster if anyone wanting to help could do that.
You can still implement an online activating mechanism as a required lib which is not open source.
09/17/2010 (10:45 am)
They stole and exposed themselves so you should get the IP via the ISP and locate them and press charges if they used it commercially yet if they did not make any money and just learned the source and even helped others than I see no reason in pursuing them.Many companies are moving towards open source GPL licenses just because it makes a better product with more free developers. TheGameCreators.com did that with DarkBasic and FPSC Creator and the development was booming since than.
This extension would be implemented much faster if anyone wanting to help could do that.
You can still implement an online activating mechanism as a required lib which is not open source.
#120
09/17/2010 (1:35 pm)
Just a note on TheGameCreator's products. They are not under the GPL. The free versions are supported by advertisement revenue. The source for FPSC has been available, I believe, since it's release to all DBPro developers, but it was not under the GPL.
Associate Konrad Kiss
Bitgap Games