Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Beta Boids with a Crash
-
I've been playing with some boids (https://en.wikipedia.org/wiki/Boids) in Pythonista using the beta. It's still work in progress, but since I've run into a problem I thought it is time to share it anyway: https://gist.github.com/offe/48c833fc5bfad3571bb1
When it's run on my iPad mini the Pythonista app crashes after around 100 seconds every time. My plan is to cut away as much as possible of the code and still keep the crash, then maybe Ole can identify the problem. But since I just ran out of weekend I appreciate all the help I can get from you guys. Either I'm doing something weird or there is a bug somewhere. My bet at the moment is that there is a memory leak somewhere.
Up to 12 boids can swarm around the screen in 60 fps (on my iPad mini). If you touch the screen their flocking behaviour is reversed so they want to "fly solo". If I knew how to include a screenshot of the boids and obstacles it would be here :-) :
[Nonexistng screenshot]
(Edit:)And now I know:
-
Sounds cool, I'll be sure to check it out.
PS: For uploading screenshots, I use pyimgur with this script. I can take a screenshot, then run the script, and in my clipboard I have a code snippet which I can paste in the forums.
-
Wow, that's really cool. I like it a lot.
-
I just tried it in the new beta, and it does no longer crash. At least not within the 10 minutes I ran the program.
-
I've experienced a similar issue while developing the bundled "Swarm" example (also a Boid simulation). The responsible memory leak should already have been fixed in the last build though.
-
It would be fun to look at the swarm example, but I can't find it. Is it in the the latest beta? Where?
-
@Oscar Should be in the Examples folder (use "Restore Examples" in the settings if it's not there).