On Tue, Aug 13, 2013 at 2:09 PM, Keith Nemitz <muse...@yahoo.com> wrote:

>
> Is there a way to create iOS games with pysdl2 ?  Would Cython be a path?
>
>
Hello,

Using ctypes and pysdl2 should be possible with some work, but I'm not 100%
certain.

Python and ctypes on iOS can work, but would require some extra code.
Instead of using the ctypes FFI load library call, it gets the function
pointers from the statically compiled executable.  So this would be a small
python c extension module exposing all of the SDL functions.  Generating
this small module could be mostly automated I think.  Then the rest of
ctypes can be used for memory structures etc.  iOS does not allow
dynamically loading, so everything needs to be compiled in statically
(SDL2, python etc).

That may pass the Apple review, and only require a small amount of code
(mostly automated) which can replace the ctypes FFI loading.  The rest of
pysdl2 could be reused.

There are a number of python on iOS ports around... and I got it running
myself a few years ago.

Using cython would be another way.  But of course would be a separate code
base.

I'd probably attempt the ctypes+FFI replacement module instead of the
cython path.



all the best,

Reply via email to