Game Development Community

It works!

by Neil Marshall · 03/07/2006 (1:28 pm) · 27 comments

I finally got the Torque Plugin to work!

If you're interested in giving it a spin, the code and installation instructions are here. If you're willing to help out great! Just fix something and email the code to me and I'll put it in the zip file so that other people can build on top of it.

TGE Plugin source code


It took me a while to get to this point. It turns out that the error message in my last post was caused by a couple different problems.

1) The processor wasn't being detected, so it didn't know how to draw properly. This was due to the fact that I had disabled the assembly language code in an attempt to get it to compile. Once I re-enabled it, and figured out the linking errors, the top of the console.log file showed that it picked up my processor.

2) The next problem that I spotted was DirectInput wasn't loading. It turns out that this wasn't really the issue either, but I managed to fix it with some help from people in the IRC channels. It turns out the appInstance variable was always 0 and I had to find the HINSTANCE of the application which the npPlugin architecture didn't supply me properly (It gives me an instance of the plugin and the browser window, but neither of those worked).

3) And finally, the cause of the crash was failing to run the run(argc, argv) function. I didn't realize that the bootup process started sooner in the code then where I was looking. Once I got those 3 lines of code to execute the plugin didn't crash and I made it to the main menu.

Next up is to look into the reasons why the mouse doesn't work too well in the GUI screens, but it works perfectly in the game itself (If you can get there). If anyone knows the reason, please let me know.

And now for the ever popular screenshots:

www.eightlines.com/neil/temp/pprogress3.pngwww.eightlines.com/neil/temp/pprogress4.png
Page«First 1 2 Next»
#21
03/08/2006 (6:07 am)
I don't really see why that would be needed. If you put the plugin code in your game, you're responsible. It's not part of the default package, just like every other code resource.

If there was an authorized version then GarageGames would be setting themselves up to take the blame which is what they want to avoid.
#22
03/08/2006 (6:25 am)
Mainly because it would help the user discern between versions which are going to run a program which is pre-authorized as unharmful, as opposed to a program which is not authorized, and may contain harmful code.

It says to the user that "GarageGames knows about this and if something goes wrong, it's not related to us, it's related to the developer."

I guess if anyone did something so stupid, it's not exactly untraceable ;)
#23
03/08/2006 (9:22 am)
I'm really excited to see where this goes. Congratulations, Neil.
#24
03/08/2006 (8:36 pm)
My $0.02 about security: we can wrap a sandbox around this plugin, so only one folder - with art will be accessible.
#25
03/21/2006 (1:01 pm)
igLoader has a technique to protect against that kind of security threat. Some type of encryption/key system... But I don't remember how he said it works exactly.
#26
04/24/2006 (2:02 pm)
Very nice.

Although, I don't see much use for it for creating web-browser based games... Mainly due to security reasons and people being too afraid (rightfully) to download any "suspicious" new browser plugins.

Basically, I think the security is a problem since TGE is a complex piece of work, so it's likely to have some security flaws. Add the easy accessibility to the TGE code, and you just may have a major security problem.

(Also, add the quite big size (of the dll / data) to that, and TGE isn't such a great web browser game anymore)

However, I do see one really interesting aspect to this... The possibility of HTML and TGE integration. HTML/javascript being an easy and very quick way to develop even complex GUIs, and TGE giving the ability to have a 3D viewport, the combination might be something interesting... Perhaps a RPG game with 3D viewport and HTML based inventory, conversation, etc. menus. If done properly, it just might work. :)

Also, another useful implementation might be editor menus... HTML would be a fast way to develop menus for an editor, then just glue the TGE 3D viewport to that and you have a quick and easily extensible editor up and running for whatever purpose.

(A bit far fetched ideas maybe, but interesting nevertheless. ;)
#27
08/09/2006 (2:17 am)
igLoader just got a sandbox.
Page«First 1 2 Next»