• JadedTuna

    @omz how long would it take for this fix to make it into the App Store? Also, will getting the beta affect my files/settings in any way?

    posted in Pythonista read more
  • JadedTuna

    While developing a streaming app for Pythonista I noticed that it usually crashes after some time. Turns out it's somehow related to loading/unloading images with scene. Here is a minimal example that crashes Pythonista reliably:

    import scene
    import random
    from cStringIO import StringIO
    import Image
    
    def raw_jpeg(img):
        buf = StringIO()
        img.save(buf, 'JPEG', quality=50)
        data = buf.getvalue()[::]
        buf.close()
        return data
    
    imglist = [raw_jpeg(img) for img in [
        Image.new('RGB', (512, 384), 'red'),
        Image.new('RGB', (512, 384), 'yellow'),
        Image.new('RGB', (512, 384), 'green'),
        Image.new('RGB', (512, 384), 'blue'),
        Image.new('RGB', (512, 384), 'gray'),
    ]]
    
    imgnames = []
    while True:
        name = scene.load_image_data(random.choice(imglist))
        if len(imgnames) == 16:
            scene.unload_image(imgnames.pop(0))
        imgnames.append(name)
        print name
    

    It takes a variable amount of time, somewhere between a second and a minute I'd say. And using scene.load_pil_image instead does not help, but only makes the loading process slower.
    Am I missing something? scene.unload_image should free memory, and since this example never exceeds 16 images loaded at once it should have plenty of that.
    EDIT: I am using iPad 4 and what seems to be the latest version of Pythonista.

    posted in Pythonista read more
  • JadedTuna

    I tried using it with a simple ellipse, but I still have no idea how it works and where actually is the rotation point. It seems as the ellipse is not rotated along its own rotation point (center).

    P. S. A side question: scene.translate just moves objects on the x and y axises by the specified number, right?

    posted in Pythonista read more
  • JadedTuna

    Heh, no. This is a method of a class Scene, and I am talking about the scene module itself (scene.size not scene.Scene.size)

    posted in Pythonista read more
  • JadedTuna

    Module scene has a function called size which seems to return the size of the display, but I can't seem to find it here: http://omz-software.com/pythonista/docs/ios/scene ? : ]

    posted in Pythonista read more
  • JadedTuna

    Hey there. touch_id is basically an ID for every touch - you can have any amount of touches and all of them will have an unique touch_id. It can be used in multi-touch applications to track down different touches.

    posted in Pythonista read more
  • JadedTuna

    Gonna advertise GamePie some more :)

    Here is a video of a game I am working on (PieRPG): https://www.youtube.com/watch?v=N3cKMUwPd_g.
    It uses GamePie as game engine and runs fine on Linux and iOS.

    P. S. Incase anybody wants to take a look at the code it is here: https://github.com/Vik2015/pierpg. Please note that PieRPG is using a dev version of GamePie (0.2) which is not available yet.

    posted in Pythonista read more
  • JadedTuna

    I finally made something that works! :)

    GamePie allows you to create games which can be ran on many platforms. The project was created to allow creation of cross-platform games - those that can run on both iOS devices and PCs. It's licensed under zlib license.

    Git repository is here: https://github.com/Vik2015/gamepie. For PC you need gamepie-pc/ and for iOS - gamepie-ios/. Just put it in the site-packages folder and rename to gamepie.

    Check examples/ folder to see some examples. Currently it contains planes.py which is a shooting game where you control the player and your goal is to shoot down as many enemy planes as possible. Player can be controlled via keyboard on PC (left/a and right/d keys, space shoots, escape quits) and mouse/touches on PC and iOS. Nothing fancy :)

    If you have any ideas about what can I add to it please post them here.

    posted in Pythonista read more
  • JadedTuna

    @Moe, thanks, cross-platform support was the intention :). Btw, the library also automatically converts Pythonista coordinates ([0, 0] is bottom-left) to PyGame coordinates ([0, 0] is upper-left).

    posted in Pythonista read more
  • JadedTuna

    Hey guys. Is it possible to draw 3D objects in Pythonista? I know it doesn't have 3D libraries, but AFAIK Doom was made in DOS without 3D libraries (2.5 D or something). Is it possible to do such stuff in Pythonista (and if it is, what's the estimated speed?). Thanks.

    posted in Pythonista read more
  • JadedTuna

    Hey guys. I was annoyed of not having a tool which allows you to view .pyui files on PC so I thought about creating one :).

    It is a python script, which will parse .pyui file (which is basically json file) and then generate HTML file which can be viewed in the browser such as Firefox, Safari, etc.

    It is still dirty and surely not complete yet. Program supports View, Label and TextField elements (hopefully). Gonna try to add more elements tomorrow after school. Please post your reviews and ideas here or open issues on the github page :].

    Repository: https://github.com/Vik2015/pyui-renderer/

    posted in Pythonista read more
  • JadedTuna

    Haven't updated this project for a loong time, but hopefully gonna add some cool stuff now! :]

    In this update I added branches support:

    When entering repo's name, you can specify the branch by putting '/{branch-name-here}' after repo's name, ex:

    gitrepo-branches

    Going to add push support soon.

    P. S. Fixed the lag issue; updates will now be pushed into the dev branch

    posted in Pythonista read more
  • JadedTuna

    My first program using ui module :)

    It allows you to easily download repos and releases from GitHub, and also supports automatic unzipping.

    Main branch: https://github.com/Vik2015/gitrepo<br />
    Dev branch: https://github.com/Vik2015/gitrepo/tree/dev

    posted in Pythonista read more
  • JadedTuna

    I just have to advertise mine :D.
    https://github.com/Vik2015/gitrepo lets you download repos, releases and gists easily with a single interface :)

    posted in Pythonista read more
  • JadedTuna

    Just tried this script on iPad 3 with stable Pythonista build (1.5 I think?). Seems to work just fine.

    posted in Pythonista read more
  • JadedTuna

    @dgelessus, more off-topic :]. The speed wouldn't be such a big problem, as I don't think somebody'd be creating bigs apps on an iPad - it is uncomfy to type it on a tablet. And it would allow to (after LOOTS of work time) allow to compile gcc. On the other hand it wouldn't be a lot of use: you wouldn't be able to use graphics && stuff on an iPad.

    Regarding the keyboards - I am not a big pro, but a bluetooth keyboard should work, right? If you are feeling like doing lots of programming you could research about bluetooth keyboard and write one on Python. It'd run on PC, detect key presses and send them over bluetooth to an iPad :]

    posted in Pythonista read more
  • JadedTuna

    @briarfox, I guess it is possible to write a virtual machine in Python, which will execute C code. That would require you to build your own C compiler to compile for this virtual machine tho... I had this idea before, but it seems too hard for a single person to implement.

    posted in Pythonista read more
  • JadedTuna

    Updated the repo - removed SDL_gfx dependency. I needed it only for drawing ellipses, but after some googling and reading wikipedia I managed to write my own functions :]. Also I added install.py which (hopefully) makes it easier to build & install scene library.

    posted in Pythonista read more
  • JadedTuna

    Hey guys! Due to many people being interested in ways of running scene games on PC, so I thought of continuing developing pcista. Thought this time I am creating direct SDL bindings for Python. I want some people to try to use them on different systems. It is capable of running basic programs (it can surely run basic scene and Piano [with dummy sound module]), but I want to make sure it works on different platforms. It requires SDL to build or you can download precompiled binaries (for Linux only for now...).

    Here is the GitHub repo: https://github.com/Vik2015/scene.

    Thanks for reading :].

    posted in Pythonista read more
  • JadedTuna

    @wradcliffe, I don't know how exactly Kivy works (never really used it), but I guess it is possible to write a layer on top of scene with Kivy-like functions n stuff. It probably won't be able to support all it's features but would be enough to run some basic programs.

    P. S. I am the Vik2015 from GitHub :). I kinda abandoned pcista because I didn't really see anyone being interested in it. Thought now it seems like there are more and more people asking for such kind of stuff, so I may try to finish the port.

    posted in Pythonista read more
Internal error.

Oops! Looks like something went wrong!