• bashedcrab

    You can publish Swift apps now, so you can avoid Objective-C if you like.

    If you mainly write games (like me), you can't beat ray wenderlich for iOS tutorials.

    http://www.raywenderlich.com/1371/iad-tutorial-for-ios-how-to-integrate-iad-into-your-iphone-app

    posted in Pythonista read more
  • bashedcrab

    https://gist.github.com/BashedCrab/8949577

    This started out as a Flappy Bird clone (can be done in under 100 lines of Pythonista), but I let my son do a bit of a redesign. He decided an underwater setting involving an Octopus was much more enjoyable.

    The game play and physics are tuned to replicate the original Flappy Bird as closely as possible, so it is hard! If you want to make it a bit more fun for young kids, make the gap larger (Default is 360. 450 is much easier but still a challenge for young kids).

    Enjoy.

    posted in Pythonista read more
  • bashedcrab

    https://gist.github.com/9098744

    I've been wanting to do something with the accelerometer for a while, and then I saw this game on the Codea demo movie.

    I've always though doodle jump was a cool game, so here it is on Pythonista.

    It would be cool if someone made the clouds look better, though.

    posted in Pythonista read more
  • bashedcrab

    Hydrogen - https://gist.github.com/BashedCrab/5924965

    HydrogenLayouts - https://gist.github.com/BashedCrab/6103019

    HydrogenDemo - https://gist.github.com/BashedCrab/5953776

    I know a few of you are already using this, but I thought I'd put a post here to help keep track of the project, and let people know when new features are added.

    Wishlist:

    • Better default look&feel
    • More layouts
    • Multiline text components.
    • Tutorial
    • HKeyboard and key events (!)

    Feel free to suggest changes and optimisations to the existing code. I've been programming for a while but only just learning python. Likewise, if you would like to contribute a component or request one, drop something here.

    posted in Pythonista read more
  • bashedcrab

    https://gist.github.com/9062268

    When I said my next game would be more fun, it appears that I lied!

    My daughters class starts every day with 100 math questions in 2 minutes challenge. I created this game to help her practice at home. The 'real' game I've been working on in the background makes extensive use of the PC graphics, so I've incorporated them too.

    Have fun. My best time is 112 seconds.

    posted in Pythonista read more
  • bashedcrab

    There are multiple ways to do this but here is what I do.

    • Upload your .jpg/.png etc files to a photo sharing website (photobucket etc).
    • Take note of the complete url to access just the .jpg (It will look something like http://i427.photobucket.com/albums/pp359/haru2858/starwarscat.jpg)
    • Use urllib to open a link to the jpg.
    • Using the url, save the jpg to your filesystem.
    • Use PIL to load the jpg from your filesystem.
    • Use scene.load pil image() to use within your scene.

    Write your "load_remote_image()" or whatever function to first check if the photo exists on the local file system. If it does exist, go directly to loading it with PIL, else download and save it first using urllib. This way if you share your code, anyone else who runs it will download the image if they don't have it locally. It also means you won't have to download the image every time your code is run.

    posted in Pythonista read more
  • bashedcrab

    You can try Hydrogen to get some UI controls for your Pythonista project.

    https://omz-forums.appspot.com/pythonista/post/5003825878401024

    At least until Pythonista introduces native UIKit controls

    posted in Pythonista read more
  • bashedcrab

    Thanks Sebastian - that looks fantastic. I have updated the Gist with your clouds.

    posted in Pythonista read more
  • bashedcrab

    Hi Tomkirn,

    The game probably took me about an hour or so to get a functional prototype going. I probably spent another 2 - 3 hours, debugging, tuning and making it look nice.

    Hi Upwart,

    When you are in the editor in Pythonista you will see a "+" button up the top. Tap it to bring up a browser of all the built in images, colours, fonts and sounds.

    posted in Pythonista read more
  • bashedcrab

    Hey upwart,
    If you need help getting started with Hydrogen, feel free to ask and I'll get you going. I'm not actively working on it at the moment, but I'm always happy to answer questions.

    Looking at the code for HydrogenDemo is probably the best place to start.

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!