[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] pygame web plugin



hey,


we did a prototype of a flex-pypy(and then continued ) - which uses
pypy to translate into actionscript - which is then compiled with the
free flex compiler.  So the 'bash the monkey' thing on the pygame main
page is made with that.

However... flex and pypy are such un-fun things to use that I think it
would require someone to be paid to work on it to get it
finished(think not one, but two compile steps... one using java!
eeewww) .  If there's anyone who wants to pay for it, I think a pretty
could port could be done in less than 3 months. It would still be
buggy, but you could probably get many pygame games working on flash.
The idea is to implement the pygame API using flash.  Yes, flash 8+
can do fast blits.  You can kind of emulate basic blitting with flash
7 too.


tinypy.org is another option... there is a much better chance of
auditing tinypy for security than Bigpy.  Tinypy aims to be a < 64K of
code, and already has a sandbox module.  It was designed from the
beginning with security, and tests in mind.  As a side effect you can
make tinypy executable with around 30KB executable.  Note there are no
batteries included (only the really basic stuff).  However a pygame
port to it would mean you could make lots of games without the python
stdlib.    It's not possible to do a successful security audit on
300,000 - 2 million lines of code.  Tinypy is written with half tinypy
code, and half C code.

There's a basic pygame module started for tinypy.  However we planned
to get many unittests for pygame first (which Nicholas helped with for
his gsoc project for the last 4 months).  These extra tests should
make porting pygame to tinypy much easier.

It might also be worth implementing a tinypy virtual machine... since
tinypy is half written in tinypy, and half in C.  With the new flash
VM being super fast, this might even be fairly quick.  It might even
be less code than using pypy translation.

However SDL hasn't really been audited for security... and anyone who
has done serious graphics programming knows it's easy to crash a
machine... even with flash, or java.  Graphics drivers have so many
bugs, the whole security using graphics is kind of a joke.

Saying that, there already are web plugins using python, pygame and
SDL out there.

... anyway.  Those are some thoughts, for what they're worth :)




On Sat, Sep 6, 2008 at 10:07 AM, machinimist@xxxxxxxxx
<machinimist@xxxxxxxxx> wrote:
> hi,
>
> i would like to bring up this topic again since a python based open source
> alternative to flash which could be used to create browser games would
> be super awesome. :)
>
> if i understand this correctly then the main problem of something like that
> is security.
>
> i noticed on the blender mailing list that someone started to revive the
> blender game engine web plugin. they use python too and apparently they have
> found a way to sandbox python.
>
> http://lists.blender.org/pipermail/bf-committers/2008-August/021660.html
>
> what do you think about this?
> wouldn't a web plugin be a big opportunity for pygame?
> i am no expert on all of this though... maybe making a web version of
> pygame is totally unfeasible?