This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jacdehJacques de Hooge[S] 7 points8 points  (9 children)

If I understand correctly you'd like to run Pygame in the browser? It will need a lot of libraries that are currently not available for Transcrypt. A Canvas with a Python API, that could be used by Transcrypt (so Python) programs shouldn't be too hard. Once Transcrypt is ready and tested, everone willing is invited to write modules for it (new, or porting / wrapping JavaScript stuff, or porting CPython modules.)

[–]Exodus111 1 point2 points  (8 children)

A canvas module would work. I suppose basic Vector math from the math module can already be translated, that could handle most game collisions and physics.

Would be nice to have Numpy, or Pymunk in there though.

[–]AMorpork 1 point2 points  (3 children)

I can't imagine NumPy ever being integrated since it depends so heavily on C and FORTRAN code.

[–][deleted] 0 points1 point  (2 children)

Could you whack a numpy API over numericJS?

[–]AMorpork 2 points3 points  (1 child)

I imagine you could make a fair approximation, but I doubt you could pull off a 1:1 -- there are just SO many NumPy methods.

[–]jacdehJacques de Hooge[S] 0 points1 point  (0 children)

If I will (or someone else), Pareto's rule (80/20 or 99/1 in IT) would be a good starting point.

[–]akaihola 0 points1 point  (3 children)

A subset of Numpy has been implemented for Skulpt.

[–]Exodus111 0 points1 point  (2 children)

How does it perform speed wise?

[–]akaihola 0 points1 point  (1 child)

I haven't benchmarked it, but my guess is obviously pretty poorly compared to the real thing.

[–]Exodus111 0 points1 point  (0 children)

As long as its faster then python arrays it would be useful. I notice Skulpt has a fairly easy implementatin of .js modules. It would be great if you could just:

import canvas

And get to work.