• Scatterfelt

    Luk,

    That sounds super cool. Checking out your script as soon as I can!

    posted in Pythonista read more
  • Scatterfelt

    I've been using gravity() during a scene's setup to establish the starting position of the device. It works great on my iPad Air. My iPhone 5, however, doesn't seem to get any values from gravity() when run during setup.

    To test this, check out the following code: https://gist.github.com/andrewschmidt/8293953

    Run on my iPad Air, tilted mostly vertical, this outputs:
    (0.01366471778601408, -0.8423394560813904)

    Run on my iPhone 5, in any position:
    (0.0, 0.0)

    It's worth noting that in my actual script, the gravity() call made after the scene has begun looping works fine on the iPhone. It's only in setup that it doesn't return anything.

    I don't know which is the intended behavior, but it can't be both!

    posted in Pythonista read more
  • Scatterfelt

    And I'm back a couple minutes later with a discovery.

    I added a hack-y bit of code—I stuck the gravity() call in a WHILE loop that doesn't end until it gets values different than zero.

    This mostly solved the problem on my iPhone. Based on just how it feels to use gravity() to move a rect around, it seems like the accelerometer takes a second or two after it begins returning values to return correct values. I wouldn't expect Pythonista to do anything about that—it's just something devs will have to be aware of.

    In summary: Looks like the iPhone 5 is a bit slower about either getting gravity() up and running, or getting values from the system's accelerometer. A little too slow to get any information before a scene has finished with setup.

    posted in Pythonista read more
  • Scatterfelt

    Curiously I was working on a program that required this very thing—keyboard during scene (it's a typing game).

    I don't think I'm likely to finish it (in Pythonista, that is), but it'd be a neat feature. Screenshotting the keyboard isn't so bad, though.

    posted in Pythonista read more
  • Scatterfelt

    It's almost unreal you made a game this great within Pythonista. I've no idea what game this is based on or how similar it is, but apart from the copyright issues this would be a cool thing to try to package and release as a standalone app!

    posted in Pythonista read more
  • Scatterfelt

    I know it's been forever since you posted this, but I hope you're still working on it! It's a super cool engine, at least, and I'm impressed at how fast it runs!

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!