On Thu, 2006-07-06 at 14:24 -0400, Gregory Piñero wrote: > Hi guys, > > I was just idley curious on what it would take to make a web plug-in > for Pygame. I'm picturing it working the way my browser currently > shows flash games. Is such an idea even possible? Has anyone > attempted this? >
At a previous position, I looked at this. Not for a game but for embedding our components in IE & Mozilla. I started work on a Mozilla (this was pre-firefox) plugin that was based on pyxpcom. The company told me to stop development due to changing business stuff, and I convinced them to release the non-working source. However, I have since lost the source code. It was a strange situation as I wasn't allowed to start a sf project, and hosted the source on my website. (they didn't want to be "seen supporting open source" if that makes any sense...esp since the project was largely python based). Unfortunately, sometime over the course of 2 web host changes and 1 move from NC to PA I lost the source. It might be available in a mailing list archive of the pyxpcom list. (I make no claims of quality code, this was during extra-special heavy duty start-up mode and I was getting maybe 6 hours of downtime a day for meals, sleep and saying "Hi" to my wife... so if you do manage to find the code, keep that in mind. :) ) It was not, as I recall, overly difficult at least conceptually since most of the cross-platform hurdles were handled by pyxpcom. Just follow the examples in pyxpcom and in the netscape documentation to get a basic plugin. This would load a xpcom component and start it. It was just a matter of creating the pyxpcom component and "that was it." (Pushing aside implementation details like getting pyxpcom installed on the machine, and how the extent of the plugin's area gets passed in and a bunch of other niggling little details.) Mind you this was back in 2002, so my memory may be simplifying things slightly, and there is always the chance that I was just flat out wrong from beginning to end. :) Also, I'd spent maybe 10 hours on the project before I was told to stop, so who knows what issues might be laying under the surface. For example, getting the same concept to work in IE ended up taking a great deal of development as we ended up using trolltech's ActiveQT to wrap our components (which were already QT classes). At anyrate, I'm 90% certain that it can be done and think it's a rockin' good idea. I might return to it in future, as my new employer may have a need, but that wouldn't be until at least next year, if not the year after that. > -- > Gregory Piñero > Chief Innovation Officer > Blended Technologies > (www.blendedtechnologies.com) -- http://mail.python.org/mailman/listinfo/python-list