HTML Browser + Torque?
by Tane Piper · in Torque Game Engine · 12/10/2001 (5:01 am) · 17 replies
After I seen the MySQL functionality for Torque, I was thinking that a built-in lightweight browser using the Mozilla rendering engine like KMeleon (http://kmeleon.sourceforge.net/) or Gecko would be an excellent idea.
Using Mozilla, and getting rid of all the bloat, it could be ported to both linux and win32, and could be a really useful feature. You just need to add another couple of libs, and one DLL (I think, don't quote me).
For example, when the player starts up the game, you could check for updates or MOTD, or check out the players stats all in the engine, rather than loading an external browser.
Another nice thing would be a game browser using this, and to start up a multiplayer game you just link to it like:
torque://123.456.789.1:1234
Anyway, I would offer to code it but I don't think I am that good a coder (I could give it a crack though).
Using Mozilla, and getting rid of all the bloat, it could be ported to both linux and win32, and could be a really useful feature. You just need to add another couple of libs, and one DLL (I think, don't quote me).
For example, when the player starts up the game, you could check for updates or MOTD, or check out the players stats all in the engine, rather than loading an external browser.
Another nice thing would be a game browser using this, and to start up a multiplayer game you just link to it like:
torque://123.456.789.1:1234
Anyway, I would offer to code it but I don't think I am that good a coder (I could give it a crack though).
About the author
#2
I think you should check the XML abilities of the GUI, first. I think it supports some tags like font, etc. .
Does anybody know more about it?
bye
Felix
12/10/2001 (7:47 am)
Hi,I think you should check the XML abilities of the GUI, first. I think it supports some tags like font, etc. .
Does anybody know more about it?
bye
Felix
#3
12/10/2001 (8:00 am)
Go for it. Mozilla was designed to be embedded like that. If you end up with working code, please post it. I'd be very interested in using it.
#4
Jeff Tunnell GG
12/10/2001 (8:07 am)
Very cool idea. I think it would allow you to make some interesting games that people have not thought of.Jeff Tunnell GG
#5
If you read my .plan update for my game, a browser feature would be perfect for it. Player scores could be kept on a server somewhere, and when the game loads up it gives a list of all the best players, plus news, motd, patch news, etc.
12/10/2001 (8:14 am)
I agree Jeff, a lot could be done with it.If you read my .plan update for my game, a browser feature would be perfect for it. Player scores could be kept on a server somewhere, and when the game loads up it gives a list of all the best players, plus news, motd, patch news, etc.
#7
Jeff Tunnell GG
12/10/2001 (10:00 pm)
Keep in mind there could be licensing conflicts if you merge the two codebases and actually want to make money. You better read them closely. Mozilla may require you to release any code that it is attached to. I have not read their license, I'm just raising a flag.Jeff Tunnell GG
#8
amazing, fast, flexible, nicer...
Btw, why not use other embedded html parsers ... gtkhtml comes to my mind first...
12/11/2001 (12:18 pm)
Wow, imagine a game with a completely html gui... amazing, fast, flexible, nicer...
Btw, why not use other embedded html parsers ... gtkhtml comes to my mind first...
#9
Is there a Microsoft API for Internet Explorer, or would that cost me my arm and leg?
12/11/2001 (2:32 pm)
I had actually thought about that idea as well, almost as a very flexible way to have easily updated material for my GUI, and I am in the process of doing this. I'm gonna go ahead and try with Mozilla 0.9.6, but I have a question:Is there a Microsoft API for Internet Explorer, or would that cost me my arm and leg?
#10
PS I'm only 17, so if anyone could help me with some of the advanced concepts in the future like differential calculus(I'm only beginning derivatives) applied, I would be very grateful.
Cheers
12/11/2001 (2:37 pm)
btw, I will try to keep updates on my progress in this area. I will be focusing most of my energy on this, but I am not very experienced at C++. I am taking some college courses in the next 2 months, hoping to get a leap in this language.PS I'm only 17, so if anyone could help me with some of the advanced concepts in the future like differential calculus(I'm only beginning derivatives) applied, I would be very grateful.
Cheers
#11
Yes, you can use the activeX control I suppose, but the problem then is that it can't be ported to linux.
The problem between licencing was an issue I didn't think about, but I don't think there would be many changes to Mozilla that it would be a huge problem - in the long term anyway. But it is something that needs to be thinked about anyway.
12/12/2001 (2:45 am)
Is there a Microsoft API for Internet Explorer, or would that cost me my arm and leg?Yes, you can use the activeX control I suppose, but the problem then is that it can't be ported to linux.
The problem between licencing was an issue I didn't think about, but I don't think there would be many changes to Mozilla that it would be a huge problem - in the long term anyway. But it is something that needs to be thinked about anyway.
#12
-Tim aka Spock
12/12/2001 (3:24 am)
I had thought about at one time to have a web browser in my game cause you could have a computer on a desk and the character could go to it and it brings up a monitor with a browser on it and they could search the real internet for things needed in the game. Have either real internet pages setup for the game that they find about in game and have to go to for clues and things or (cheaper route) have it override some addresses and display the pages locally. The first way would be cool because while they are at work (on break of course :) ) or at school they could use the internet and continue trying to figure out the clues in the game without the need for the game at the moment.-Tim aka Spock
#13
Didn't Tribes 2 have some sort of built in browser or similar that connected to a news page(s)? How did that work (assuming it had it and Im not thinking of something else)?
12/12/2001 (9:55 am)
My brain is on vacation and wont return my calls, so... Didn't Tribes 2 have some sort of built in browser or similar that connected to a news page(s)? How did that work (assuming it had it and Im not thinking of something else)?
#14
12/12/2001 (11:39 am)
how exactly would i get activex controls...
#15
NPL is the Netscape Public License. It is around becase netscape had closed source code that they wanted to distribute with the open source mozilla. That is the reason why netscape 6.2 has Instant Messenger, AOL Email, and a spell checker, where as Mozilla 0.9.x doesn't.
Compuserve currently embeds mozilla in it and I believe AOL is moving away from IE as well (It already uses mozilla on AOL Linux) None of these are open source, so I'm pretty sure you can just use the embedding hooks to attach the embeddable version into Torque.
Also, mozilla has an activeX control written by adam lock which mimics the internet explorer one, so you can swap the 2 engines at once. But then again, it only works on windows where as the other way will work on any os that moz works on.
12/12/2001 (1:05 pm)
Mozilla has a tri-license. I believe it's MPL, NPL, and/or GPL.NPL is the Netscape Public License. It is around becase netscape had closed source code that they wanted to distribute with the open source mozilla. That is the reason why netscape 6.2 has Instant Messenger, AOL Email, and a spell checker, where as Mozilla 0.9.x doesn't.
Compuserve currently embeds mozilla in it and I believe AOL is moving away from IE as well (It already uses mozilla on AOL Linux) None of these are open source, so I'm pretty sure you can just use the embedding hooks to attach the embeddable version into Torque.
Also, mozilla has an activeX control written by adam lock
#16
The script call is command = gotoWebpage($url);
So for example you could create a button to go to a web page such as,
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "top";
position = "29 264";
extent = "110 20";
minExtent = "8 8";
visible = "1";
command = "gotoWebpage($url);";
helpTag = "0";
text = "News...";
};
place that as a button in your mainMenuGui and you have an instant link to the webpage (as soon as you define the string $url to the website you want to reach :) ...) However, that's a long way from embedding a full browser into the game that is being discussed here.
Still, it is a very nice feature - in our game I use it to point to our (currently hidden) website where the development team can get game related info and access our internal development forums. it's cool to be working on a game, jump back to the main menu, jump to a forum and log a bug or suggestion and then exit back to the game and resume.
12/15/2001 (8:40 am)
Aaron, Tribes 2 and the torque engine has a function call from a script which will call your default browser.The script call is command = gotoWebpage($url);
So for example you could create a button to go to a web page such as,
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "top";
position = "29 264";
extent = "110 20";
minExtent = "8 8";
visible = "1";
command = "gotoWebpage($url);";
helpTag = "0";
text = "News...";
};
place that as a button in your mainMenuGui and you have an instant link to the webpage (as soon as you define the string $url to the website you want to reach :) ...) However, that's a long way from embedding a full browser into the game that is being discussed here.
Still, it is a very nice feature - in our game I use it to point to our (currently hidden) website where the development team can get game related info and access our internal development forums. it's cool to be working on a game, jump back to the main menu, jump to a forum and log a bug or suggestion and then exit back to the game and resume.
#17
02/28/2007 (10:56 pm)
We are working on some games right now that could greatly benefit from an embedded browser. I've been looking into embedding gecko. It's pretty easy to build the libs and link them into Torque. However, I'll have to experiment to see the size of the memory footprint and how well it renders within the Torque GUI hierarchy. Looking at some other threads, it seems like the rendering would have to be done on a new thread because the Torque GUI thread is synchronized with the 3d rendering path. If anyone is interested on working on this with me please shoot an email over to contact@filamentgames.com. Our goal is to make a robust implementation that is fully supported on all Torque platforms.
Torque Owner Karsten "Clocks" Viese
// Clocks out