For pymunk, removing ctypes would mean that somebody must do the
wrapper using swig or cython. It's a long work, and unless you're
familiar with one of both way, forget about it.
I've found https://bitbucket.org/timostolz/gamephysics/, a cython
wrapper for box2d. But the compilation was a mess.
So after checking more about pybox2d, and why it would not compile, we have now:
1. a new pybox2d-android project, with all the changes needed to pass
the compilation (changes from cstdlib->stdlib.h, and some other
includes changes.) => http://github.com/tito/pybox2d-android
2. a new build_pybox2d.sh script, that clone the previous directory,
build pybox2d and install locally (you need to generate a new
distribution after that with ./distribute.sh)
3. an example using box2d + kivy, located at
https://github.com/tito/pybox2d-android/tree/master/pybox2d-kivy-test
For testing, i'm doing:
cd pgs4a-kivy
bzr update
./build_all.sh
./build_pybox2d.sh
./distribute.sh Kivy-box2d
cd Kivy-box2d
./build.py --package net.txzone.box2d.test --name TestBox2D --version
0.1 --dir ../../pybox2d/pybox2dtest/ debug installd
(Note that the example can be run if you have python-box2d package installed)
Unfortunately, it doesn't work yet, as soon as the _Box2D module is
loaded, i got an exception:
I/python ( 6697): Traceback (most recent call last):
I/python ( 6697): File "main.py", line 1, in <module>
I/python ( 6697): from Box2D import *
I/python ( 6697): File
"/data/data/net.txzone.box2d.test/files/lib/Box2D/__init__.py", line
20, in <module>
I/python ( 6697): from .Box2D import *
I/python ( 6697): File
"/data/data/net.txzone.box2d.test/files/lib/Box2D/Box2D.py", line 28,
in <module>
I/python ( 6697): _Box2D = swig_import_helper()
I/python ( 6697): File
"/data/data/net.txzone.box2d.test/files/lib/Box2D/Box2D.py", line 24,
in swig_import_helper
I/python ( 6697): _mod = imp.load_module('_Box2D', fp, pathname,
description)
I/python ( 6697): ImportError: Cannot load library:
reloc_library[1315]: 87 cannot locate '__cxa_get_exception_ptr'...
I/python ( 6697): Kivy for android ended.
Step by step, i hope that will help both of you for going further.
2011/12/26 Mathieu Virbel <m...@kivy.org>:
Also tryed without success:
* -lgnustl_shared
* + libgnustl_static.a
* + preload one of them
* + same with libstdc++ shipped with r7
(both gnustl_shared and libstdc++ contain the symbol).
* -fno-use-cxa-get-exception-ptr (should deactivate usage of thoses
symbols too)
I don't understand why not a single one of all theses approach is not
working. Will retry a little bit tomorrow.
On 27/12/2011 15:21, Arnaud Waels wrote:
> amazing work you did ! For sure that's helping a lot
>
> Maybe trying with another version of gcc would help
> http://www.itk.org/pipermail/insight-users/2007-October/023849.html
>
>
> 2011/12/27 Mathieu Virbel <m...@kivy.org <mailto:m...@kivy.org>>
> 2011/12/26 Mathieu Virbel <m...@kivy.org <mailto:m...@kivy.org>>:
> > Using schedule_interval with 0 is already calling the callback
> each frame,
> > so it will not help.
> > I'll try to check about chipmunk or box2d compilation if that can
> help
> >
> >
> > Le 26 d�c. 2011 � 17:49, Arnaud Waels a �crit :
> >
> > Hi
> >
> > Integration of pypybox2d inside a kivy app works, but slowly..
> > I tried to improve it using a C extension, but it doesn 't help
> >
> > So far, i'm scheduling the physics engine stepping ( world.step()
> function )
> > using Clock.schedule_interval(function, 0)
> > I would like to increase that refreshing frequency
> > Calling this function every canvas.draw() could help ?
> >
> > A
> >
> > 2011/12/24 Mathieu Virbel <m...@kivy.org <mailto:m...@kivy.org>>
> >>
> >> I doubt that ctypes is working. Porting task include all that
> kind of
> >> debugging, try to look why and how you can resolve it.
> >>
> >> Le 24 d�c. 2011 � 18:03, Nicolas Niemczycki a �crit :
> >>
> >> > Hi,
> >> > I follow this instruction.
> >> > I tested to do a package with kivy, android and pymunk.
> >> > I have just a problem with ctypes.
> >> > When I launch :
> >> > try ../python-install/bin/python.host setup.py build_chipmunk
> >> >
> >> > File "setup.py", line 4, in <module>
> >> > import ctypes
> >> > File
> "~/kivy/python-install/lib/python2.7/ctypes/__init__.py", line
> >> > 10, in <module>
> >> > from _ctypes import Union, Structure, Array
> >> > ImportError: No module named _ctypes
> >> >
> >> > Nicolas.
> >> >
> >> >
> >> > On Dec 23, 5:51 pm, Mathieu Virbel <m...@kivy.org
> <mailto:m...@kivy.org>> wrote:
> >> >> For any compiled module, take pgs4a-kivy project from
> launchpad (bzr
> >> >> clone), copy/paste an existing build_<module>.sh (like
> build_PIL.sh), and
> >> >> use it as a template for pybox2d (or underlaying module like
> box2d).
> >> >>
> >> >> (2 steps: generate an arm binary, and install it in
> python-install).
> >> >>
> >> >> Then generate a ./distribute.sh package, and you'll have
> pybox2d in it.
> >> >>
> >> >> (build_lxml contain 2 C lib + 1 python module.)
> >> >>
> >> >> Mathieu
> >> >>
> >> >> Le 23 d�c. 2011 � 17:43, Arnaud Waels a �crit :
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>> ok thanks for the info
> >> >>> i'm currently writing a test app running box2d inside of a
> kivy app.
> >> >>> I'll let you know what the outcome is.
> >> >>
> >> >>> A
> >> >>
> >> >>> 2011/12/23 Mathieu Virbel <m...@kivy.org <mailto:m...@kivy.org>>
> >> >>> Hi Arnaud,
> >> >>
> >> >>> Good news so far !
> >> >>> I know that Nicolas (attached here) are trying to compile
> pymunk for
> >> >>> android. Maybe both of you can work together on that point ?
> >> >>
> >> >>> :)
> >> >>
> >> >>> Mathieu
> >> >>
> >> >>> Le 23 d�c. 2011 � 15:35, Arnaud Waels a �crit :
> >> >>
> >> >>>> Hi all
> >> >>
> >> >>>> Looking for a full python physics engine in order to run it
> under
> >> >>>> android as well, i ended up trying pypybox2d : the full
> python port of
> >> >>>> pybox2d
> >> >>>> http://pybox2d.blogspot.com/
> >> >>
> >> >>>> Source is available here
> >> >>>>
> >> >>>>
> http://code.google.com/p/pybox2d/source/browse/#svn%2Fbranches%2Fpure...
> >> >>
> >> >>>> On my laptop it's running very well, still slow in case of
> vertical
> >> >>>> stacks, but very fast in case of simple top view blocks
> collision
> >> >>>> Top view physics (instead of side view) is achievable by
> setting
> >> >>>> gravity to 0 and using a friction joint (see apply force
> example
> >> >>>>
> herehttp://pybox2d.googlecode.com/svn/trunk/examples/test_ApplyForce.py
> <http://pybox2d.googlecode.com/svn/trunk/examples/test_ApplyForce.py>)
On 05/01/2012 17:15, Nicolas Niemczycki wrote:
> When I do : import cymunk
> ImportError: cymunk.so: undefined symbol: cpBodyApplyImpulse
> But cpBodyApplyImpulse is defined in body.pxd.
>
> 2012/1/5 Mathieu Virbel <txp...@gmail.com <mailto:txp...@gmail.com>>
>
> What's the problem at import ?
>
>
> On 05/01/2012 16:06, Nicolas Niemczycki wrote:
>
> Hi
>
> I do a project for building chipmunk with cython.
> https://github.com/minou/__chipmunk-android
> <https://github.com/minou/chipmunk-android>
> I have just a problem when I import.
> Many pymunk functions are implemented.
>
>
> On Dec 27 2011, 5:49 pm, Mathieu Virbel<txp...@gmail.com
> <mailto:txp...@gmail.com>> wrote:
>
> I'm using the one cross compiled for arm, shipped in the NDK r7.
> (i've spent time to move from r5b to r7, but didn't help).
>
> Also tryed without success:
> * -lgnustl_shared
> * + libgnustl_static.a
> * + preload one of them
> * + same with libstdc++ shipped with r7
> (both gnustl_shared and libstdc++ contain the symbol).
> * -fno-use-cxa-get-exception-ptr (should deactivate usage of
> thoses
> symbols too)
>
> I don't understand why not a single one of all theses
> approach is not
> working. Will retry a little bit tomorrow.
>
> On 27/12/2011 15:21, Arnaud Waels wrote:
>
>
>
>
>
>
>
> amazing work you did ! For sure that's helping a lot
>
>
> Maybe trying with another version of gcc would help
> http://www.itk.org/pipermail/__insight-users/2007-October/__023849.html
> <http://www.itk.org/pipermail/insight-users/2007-October/023849.html>
>
>
> 2011/12/27 Mathieu Virbel<m...@kivy.org
> <mailto:m...@kivy.org><mailto:m.__..@kivy.org
> <mailto:m...@kivy.org>>>
>
>
> Ok, nicolas told me that he was trying to
> understand why ctypes
> doesn't work.
> Just a tip, ctypes python is using libc on your
> desktop computer, but
> on android, libc doesn't exist. It's bionic. And
> so, some internals
> structures doesn't match libc.
>
>
> For pymunk, removing ctypes would mean that
> somebody must do the
> wrapper using swig or cython. It's a long work, and
> unless you're
> familiar with one of both way, forget about it.
> I've
> foundhttps://bitbucket.org/__timostolz/gamephysics/
> <http://bitbucket.org/timostolz/gamephysics/>, a cython
> wrapper for box2d. But the compilation was a mess.
>
>
> So after checking more about pybox2d, and why it
> would not compile,
> we have now:
>
>
> 1. a new pybox2d-android project, with all the
> changes needed to pass
> the compilation (changes from cstdlib->stdlib.h,
> and some other
> includes changes.)
> =>http://github.com/tito/__pybox2d-android
> <http://github.com/tito/pybox2d-android>
> 2. a new build_pybox2d.sh script, that clone the
> previous directory,
> build pybox2d and install locally (you need to
> generate a new
> distribution after that with ./distribute.sh)
> 3. an example using box2d + kivy, located at
> https://github.com/tito/__pybox2d-android/tree/master/__pybox2d-kivy-test
> <https://github.com/tito/pybox2d-android/tree/master/pybox2d-kivy-test>
>
>
> For testing, i'm doing:
> cd pgs4a-kivy
> bzr update
> ./build_all.sh
> ./build_pybox2d.sh
> ./distribute.sh Kivy-box2d
> cd Kivy-box2d
> ./build.py --package net.txzone.box2d.test --name
> TestBox2D --version
> 0.1 --dir ../../pybox2d/pybox2dtest/ debug installd
>
>
> (Note that the example can be run if you have
> python-box2d package
> installed)
>
>
> Unfortunately, it doesn't work yet, as soon as the
> _Box2D module is
> loaded, i got an exception:
> I/python ( 6697): Traceback (most recent call last):
> I/python ( 6697): File "main.py", line 1, in<module>
> I/python ( 6697): from Box2D import *
> I/python ( 6697): File
> "/data/data/net.txzone.box2d.__test/files/lib/Box2D/__init__.__py",
> line
> 20, in<module>
> I/python ( 6697): from .Box2D import *
> I/python ( 6697): File
> "/data/data/net.txzone.box2d.__test/files/lib/Box2D/Box2D.py"__,
> line 28,
> in<module>
> I/python ( 6697): _Box2D = swig_import_helper()
> I/python ( 6697): File
> "/data/data/net.txzone.box2d.__test/files/lib/Box2D/Box2D.py"__,
> line 24,
> in swig_import_helper
> I/python ( 6697): _mod =
> imp.load_module('_Box2D', fp, pathname,
> description)
> I/python ( 6697): ImportError: Cannot load library:
> reloc_library[1315]: 87 cannot locate
> '__cxa_get_exception_ptr'...
> I/python ( 6697): Kivy for android ended.
>
>
> Step by step, i hope that will help both of you for
> going further.
>
>
> 2011/12/26 Mathieu Virbel<m...@kivy.org
> <mailto:m...@kivy.org><mailto:m.__..@kivy.org
> <mailto:m...@kivy.org>>>:
> > Using schedule_interval with 0 is already calling
> the callback
> each frame,
> > so it will not help.
> > I'll try to check about chipmunk or box2d
> compilation if that can
> help
>
>
> > Le 26 d c. 2011 17:49, Arnaud Waels a crit :
>
>
> > Hi
>
>
> > Integration of pypybox2d inside a kivy app works,
> but slowly..
> > I tried to improve it using a C extension, but it
> doesn 't help
>
>
> > So far, i'm scheduling the physics engine stepping (
> world.step()
> function )
> > using Clock.schedule_interval(__function, 0)
> > I would like to increase that refreshing frequency
> > Calling this function every canvas.draw() could help ?
>
>
> > A
>
>
> > 2011/12/24 Mathieu Virbel<m...@kivy.org
> <mailto:m...@kivy.org><mailto:m.__..@kivy.org
> <mailto:m...@kivy.org>>>
>
>
> >> I doubt that ctypes is working. Porting task
> include all that
> kind of
> >> debugging, try to look why and how you can resolve it.
>
>
> >> Le 24 d c. 2011 18:03, Nicolas Niemczycki a crit :
>
>
> >> > Hi,
> >> > I follow this instruction.
> >> > I tested to do a package with kivy, android and
> pymunk.
> >> > I have just a problem with ctypes.
> >> > When I launch :
> >> > try ../python-install/bin/python.__host setup.py
> build_chipmunk
>
>
> >> > File "setup.py", line 4, in<module>
> >> > import ctypes
> >> > File
> "~/kivy/python-install/lib/__python2.7/ctypes/__init__.py",
> line
> >> > 10, in<module>
> >> > from _ctypes import Union, Structure, Array
> >> > ImportError: No module named _ctypes
>
>
> >> > Nicolas.
>
>
> >> > On Dec 23, 5:51 pm, Mathieu Virbel<m...@kivy.org
> <mailto:m...@kivy.org>
> <mailto:m...@kivy.org><mailto:m.__..@kivy.org
> <mailto:m...@kivy.org>>>
> >> >>> Hi Arnaud,
>
>
> >> >>> Good news so far !
> >> >>> I know that Nicolas (attached here) are trying
> to compile
> pymunk for
> >> >>> android. Maybe both of you can work together on
> that point ?
>
>
> >> >>> :)
>
>
> >> >>> Mathieu
>
>
> >> >>> Le 23 d c. 2011 15:35, Arnaud Waels a crit :
>
>
> >> >>>> Hi all
>
>
> >> >>>> Looking for a full python physics engine in
> order to run it
> under
> >> >>>> android as well, i ended up trying pypybox2d :
> the full
> python port of
> >> >>>> pybox2d
> >> >>>>http://pybox2d.blogspot.__com/
> <http://pybox2d.blogspot.com/>
>
>
> >> >>>> Source is available here
>
>
> http://code.google.com/p/__pybox2d/source/browse/#svn%__2Fbranches%2Fpure.
> <http://code.google.com/p/pybox2d/source/browse/#svn%2Fbranches%2Fpure.>..
>
>
> >> >>>> On my laptop it's running very well, still
> slow in case of
> vertical
> >> >>>> stacks, but very fast in case of simple top
> view blocks
> collision
> >> >>>> Top view physics (instead of side view) is
> achievable by
> setting
> >> >>>> gravity to 0 and using a friction joint (see
> apply force
> example
>
>
>
> herehttp://pybox2d.googlecode.__com/svn/trunk/examples/test___ApplyForce.py
> <http://pybox2d.googlecode.com/svn/trunk/examples/test_ApplyForce.py>
> <http://pybox2d.googlecode.__com/svn/trunk/examples/test___ApplyForce.py
1. compile chipmunk for arm platform
2. ensure the libchipmunk.so is arm: file libchipmunk.so
3. copy the libchipmunk.so in libs/armeabi/
4. open src/org/renpy/android/PythonActivity.java, search for
_imaging.so, and to the same try/catch/System.load for libchipmunk.
=> Before python interpreter really start, it will load libchipmunk.
Then the symbols will be available for when you'll import your module.
Mathieu
On 05/01/2012 21:29, Nicolas Niemczycki wrote:
> To start, I would test on my ubuntu.
> I have install chipmunk from github.
>
>
> 2012/1/5 Mathieu Virbel <txp...@gmail.com <mailto:txp...@gmail.com>>
>
> How did you load the chipmunk lib into android ?
> Are you compiling your extension with dynamic or static chipmunk lib ?
>
>
> On 05/01/2012 17:15, Nicolas Niemczycki wrote:
>
> When I do : import cymunk
> ImportError: cymunk.so: undefined symbol: cpBodyApplyImpulse
> But cpBodyApplyImpulse is defined in body.pxd.
>
> 2012/1/5 Mathieu Virbel <txp...@gmail.com
> <mailto:txp...@gmail.com> <mailto:txp...@gmail.com
> <mailto:txp...@gmail.com>>>
>
>
> What's the problem at import ?
>
>
> On 05/01/2012 16:06, Nicolas Niemczycki wrote:
>
> Hi
>
> I do a project for building chipmunk with cython.
> https://github.com/minou/____chipmunk-android
> <https://github.com/minou/__chipmunk-android>
>
> <https://github.com/minou/__chipmunk-android
> <https://github.com/minou/chipmunk-android>>
> I have just a problem when I import.
> Many pymunk functions are implemented.
>
>
> On Dec 27 2011, 5:49 pm, Mathieu Virbel<txp...@gmail.com
> <mailto:txp...@gmail.com>
> <mailto:txp...@gmail.com <mailto:txp...@gmail.com>>> wrote:
>
>
> I'm using the one cross compiled for arm, shipped in
> the NDK r7.
> (i've spent time to move from r5b to r7, but didn't
> help).
>
> Also tryed without success:
> * -lgnustl_shared
> * + libgnustl_static.a
> * + preload one of them
> * + same with libstdc++ shipped with r7
> (both gnustl_shared and libstdc++ contain the symbol).
> * -fno-use-cxa-get-exception-ptr (should deactivate
> usage of
> thoses
> symbols too)
>
> I don't understand why not a single one of all theses
> approach is not
> working. Will retry a little bit tomorrow.
>
> On 27/12/2011 15:21, Arnaud Waels wrote:
>
>
>
>
>
>
>
> amazing work you did ! For sure that's helping a lot
>
>
> Maybe trying with another version of gcc would help
> http://www.itk.org/pipermail/____insight-users/2007-October/____023849.html
> <http://www.itk.org/pipermail/__insight-users/2007-October/__023849.html>
>
> <http://www.itk.org/pipermail/__insight-users/2007-October/__023849.html
> <http://www.itk.org/pipermail/insight-users/2007-October/023849.html>>
>
>
> 2011/12/27 Mathieu Virbel<m...@kivy.org
> <mailto:m...@kivy.org>
> <mailto:m...@kivy.org
> <mailto:m...@kivy.org>><mailto:__m.__..@kivy.org
> <mailto:m.__..@kivy.org>
>
> <mailto:m...@kivy.org <mailto:m...@kivy.org>>>>
>
>
> Ok, nicolas told me that he was trying to
> understand why ctypes
> doesn't work.
> Just a tip, ctypes python is using libc on your
> desktop computer, but
> on android, libc doesn't exist. It's
> bionic. And
> so, some internals
> structures doesn't match libc.
>
>
> For pymunk, removing ctypes would mean that
> somebody must do the
> wrapper using swig or cython. It's a long
> work, and
> unless you're
> familiar with one of both way, forget about it.
> I've
>
> foundhttps://bitbucket.org/____timostolz/gamephysics/
> <http://bitbucket.org/__timostolz/gamephysics/>
> <http://bitbucket.org/__timostolz/gamephysics/
> <http://bitbucket.org/timostolz/gamephysics/>>, a cython
>
> wrapper for box2d. But the compilation was
> a mess.
>
>
> So after checking more about pybox2d, and
> why it
> would not compile,
> we have now:
>
>
> 1. a new pybox2d-android project, with all the
> changes needed to pass
> the compilation (changes from
> cstdlib->stdlib.h,
> and some other
> includes changes.)
> =>http://github.com/tito/____pybox2d-android
> <http://github.com/tito/__pybox2d-android>
>
> <http://github.com/tito/__pybox2d-android
> <http://github.com/tito/pybox2d-android>>
> 2. a new build_pybox2d.sh script, that
> clone the
> previous directory,
> build pybox2d and install locally (you need to
> generate a new
> distribution after that with ./distribute.sh)
> 3. an example using box2d + kivy, located at
> https://github.com/tito/____pybox2d-android/tree/master/____pybox2d-kivy-test
> <https://github.com/tito/__pybox2d-android/tree/master/__pybox2d-kivy-test>
> "/data/data/net.txzone.box2d.____test/files/lib/Box2D/__init____.__py",
>
> line
> 20, in<module>
> I/python ( 6697): from .Box2D import *
> I/python ( 6697): File
> "/data/data/net.txzone.box2d.____test/files/lib/Box2D/Box2D.__py"__,
>
> line 28,
> in<module>
> I/python ( 6697): _Box2D =
> swig_import_helper()
> I/python ( 6697): File
> "/data/data/net.txzone.box2d.____test/files/lib/Box2D/Box2D.__py"__,
>
> line 24,
> in swig_import_helper
> I/python ( 6697): _mod =
> imp.load_module('_Box2D', fp, pathname,
> description)
> I/python ( 6697): ImportError: Cannot load
> library:
> reloc_library[1315]: 87 cannot locate
> '__cxa_get_exception_ptr'...
> I/python ( 6697): Kivy for android ended.
>
>
> Step by step, i hope that will help both of
> you for
> going further.
>
>
> 2011/12/26 Mathieu Virbel<m...@kivy.org
> <mailto:m...@kivy.org>
> <mailto:m...@kivy.org
> <mailto:m...@kivy.org>><mailto:__m.__..@kivy.org
> <mailto:m.__..@kivy.org>
>
> <mailto:m...@kivy.org <mailto:m...@kivy.org>>>>:
> > Using schedule_interval with 0 is already calling
> the callback
> each frame,
> > so it will not help.
> > I'll try to check about chipmunk or box2d
> compilation if that can
> help
>
>
> > Le 26 d c. 2011 17:49, Arnaud Waels a crit :
>
>
> > Hi
>
>
> > Integration of pypybox2d inside a kivy app works,
> but slowly..
> > I tried to improve it using a C extension, but it
> doesn 't help
>
>
> > So far, i'm scheduling the physics engine stepping (
> world.step()
> function )
> > using Clock.schedule_interval(____function, 0)
>
> > I would like to increase that refreshing frequency
> > Calling this function every canvas.draw() could help ?
>
>
> > A
>
>
> > 2011/12/24 Mathieu Virbel<m...@kivy.org <mailto:m...@kivy.org>
> <mailto:m...@kivy.org
> <mailto:m...@kivy.org>><mailto:__m.__..@kivy.org
> <mailto:m.__..@kivy.org>
>
> <mailto:m...@kivy.org <mailto:m...@kivy.org>>>>
>
>
> >> I doubt that ctypes is working. Porting task
> include all that
> kind of
> >> debugging, try to look why and how you can resolve it.
>
>
> >> Le 24 d c. 2011 18:03, Nicolas Niemczycki a crit :
>
>
> >> > Hi,
> >> > I follow this instruction.
> >> > I tested to do a package with kivy, android and
> pymunk.
> >> > I have just a problem with ctypes.
> >> > When I launch :
> >> > try ../python-install/bin/python.____host setup.py
>
> build_chipmunk
>
>
> >> > File "setup.py", line 4, in<module>
> >> > import ctypes
> >> > File
> "~/kivy/python-install/lib/____python2.7/ctypes/__init__.py",
> <mailto:m...@kivy.org
> <mailto:m...@kivy.org>><mailto:__m.__..@kivy.org
> <mailto:m.__..@kivy.org>
>
> <mailto:m...@kivy.org <mailto:m...@kivy.org>>>>
> >> >>> Hi Arnaud,
>
>
> >> >>> Good news so far !
> >> >>> I know that Nicolas (attached here) are trying
> to compile
> pymunk for
> >> >>> android. Maybe both of you can work together on
> that point ?
>
>
> >> >>> :)
>
>
> >> >>> Mathieu
>
>
> >> >>> Le 23 d c. 2011 15:35, Arnaud Waels a crit :
>
>
> >> >>>> Hi all
>
>
> >> >>>> Looking for a full python physics engine in
> order to run it
> under
> >> >>>> android as well, i ended up trying pypybox2d :
> the full
> python port of
> >> >>>> pybox2d
> >> >>>>http://pybox2d.blogspot.____com/
>
> <http://pybox2d.blogspot.com/>
>
>
> >> >>>> Source is available here
>
>
> http://code.google.com/p/____pybox2d/source/browse/#svn%____2Fbranches%2Fpure
> <http://code.google.com/p/__pybox2d/source/browse/#svn%__2Fbranches%2Fpure>.
> <http://code.google.com/p/__pybox2d/source/browse/#svn%__2Fbranches%2Fpure
> <http://code.google.com/p/pybox2d/source/browse/#svn%2Fbranches%2Fpure>.>..
>
>
>
> >> >>>> On my laptop it's running very well, still
> slow in case of
> vertical
> >> >>>> stacks, but very fast in case of simple top
> view blocks
> collision
> >> >>>> Top view physics (instead of side view) is
> achievable by
> setting
> >> >>>> gravity to 0 and using a friction joint (see
> apply force
> example
>
>
>
>
> herehttp://pybox2d.googlecode.____com/svn/trunk/examples/test_____ApplyForce.py
> <http://pybox2d.googlecode.__com/svn/trunk/examples/test___ApplyForce.py
> <http://pybox2d.googlecode.com/svn/trunk/examples/test_ApplyForce.py>>
> <http://pybox2d.googlecode.____com/svn/trunk/examples/test_____ApplyForce.py
> <mailto:m...@kivy.org>><mailto:__m._...@kivy.org
> <mailto:m._...@kivy.org>
> <mailto:m...@kivy.org>><mailto:__m._...@kivy.org
> <mailto:m._...@kivy.org>
>
> <mailto:m...@kivy.org <mailto:m...@kivy.org>>>>:
> > Using schedule_interval with 0 is already calling
> the callback
> each frame,
> > so it will not help.
> > I'll try to check about chipmunk or box2d
> compilation if that can
> help
>
>
> > Le 26 d c. 2011 17:49, Arnaud Waels a crit :
>
>
> > Hi
>
>
> > Integration of pypybox2d inside a kivy app works,
> but slowly..
> > I tried to improve it using a C extension, but it
> doesn 't help
>
>
> > So far, i'm scheduling the physics engine stepping (
> world.step()
> function )
> > using Clock.schedule_interval(____function, 0)
>
> > I would like to increase that refreshing frequency
> > Calling this function every canvas.draw() could help ?
>
>
> > A
>
>
> > 2011/12/24 Mathieu Virbel<m...@kivy.org <mailto:m...@kivy.org>
> <mailto:m...@kivy.org
> <mailto:m...@kivy.org>><mailto:__m._...@kivy.org
> <mailto:m._...@kivy.org>
> <mailto:m...@kivy.org>><mailto:__m._...@kivy.org
> <mailto:m._...@kivy.org>
I was looking into physics just a week ago. I also talked to the devs and concluded that I shall not stick my noob nose in it just yet, because something is being developed as we speak.
You should do a PR for thoses changes anyway, because the first repo is
the default one on python-for-android :)
Otherwise, people have to change the url manually :/
Mathieu
Le 29/03/2013 20:43, Kovak a �crit :
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.