Grasshopper -mr picklesworth's

Miscellaneous Forums/General Discussion/Grasshopper -mr picklesworth's

Has anyone got the grasshopper plug-in working?

You could always use igLoader for free via www.pjio.com and embed the game in your own site.

Depends on what it's being used for :P
Grasshopper is a good choice if you are building:
-- a web browser component of an installed application (eg: If you are building an web-based turn-based game, you could have your game launch as soon as someone clicks on a link to a .turn file).
-- a web plugin thing sort that activates on demand to display a particular file format/MIME type, such as .3ds, a game level, or a text file.

Grasshopper is probably not the best choice if you are planning to build an application/game embedded in the web browser in one single place and never seen again. (Such as a game demo / miniature game ).
In that case, igLoader is a great solution :)


I've had Grasshopper working, of course... though I don't currently have any web-based examples since the project is in early days. (Though usable in its present state).
Where are you having trouble with it?

I realize that the whole 'getting it in the web browser's plugin directory' part is a bit difficult.
I will be looking at Grasshopper again in a while, at which point I'll see what I can do about an installer script which people can use...

If I'm lucky, it will be possible to integrate with NSIS.
(Then I return to the wonderful IE support with ActiveX...)


Anyway, getting it in the browser's plugins directory has to be done manually at this point, though you can write an installer script that does it as well. (Software like Flash and Adobe Reader write plug-ins to a browser's plugins directory in the same way).
There is a link in the help file that shows how to get the necessary information for Mozilla/Firefox... IE and other browsers probably work the same way and have similar documentation somewhere.

indiepath, i did :)

mr picklesworth, yes i like the idea of the file format support.
I managed to get the applications to embed into the test window OK but I cant seem to get the application to embed into opera. im not sure where to put the game files.
i get a square on the screen which suggests opera is trying to embed something but it remains blank

Ah, Opera.... Now that's a different kettle of fish altogether. I had to build a registry enumerator into our installer just to keep track of and find the relevant Opera plugin folders - it seems to change from version to version!

d'oh sounds pretty bad

Hm... Opera, eh?

I haven't done any testing with that one, unfortunately. Presumably it loads plugins in the same way as browsers like Firefox, so is everything in the appropriate plugins directory for Opera?
The DLL should be able to load resources from the plugins directory with no fuss...

...

Oooh...
EEK!

Does Opera have a directory named Plugins, or does it have its own label?
Looking back at it, ghMain is currently assuming that the plugins directory is called plugins and is in the same directory as the browser's main program.

I'll see what can be done about that... Presumably the fix for that is the same as the installer script I'll have to write, but there may be somewhere in NPAPI that tells my program where it is.
Right now I'm grabbing the path that the plugin has been executed from (or some such thing...) which, unfortunately, is the directory containing mybrowser.exe instead of the plugins directory.

the plugins folder for opera is here:
C:\Program Files\Opera\program\plugins

This explains it.
I suppose that the Opera main program, then, is in Opera and not Opera\program?
:(

Oh well... looks like I have a bit of hunting to do.
Thanks!

the plugins folder for opera is here:
C:\Program Files\Opera\program\plugins

Yes but certain registry entries need to be enumerated since not all of us have a c:\Program Files ...