Python Snake Game Written and Deployed on IPHONE in TWENTY MINUTES -

Python Snake Game Written and Deployed on IPHONE in TWENTY MINUTES

Erik Sandberg
Views: 61255
Like: 1153
So many people don’t know that Python can be used to write cross-platform mobile applications. Watch as I use the Kivy framework for Python to write a typical snake game and play it on my iPhone. This video was recorded at 3 a.m.👇 LINKS AND INFO! 👇

Source code (follow me!):

Consider donating to me if you are able to and appreciate my content:
Any and all donations are super appreciated! ❤️

The creators of Kivy have been developing the framework for near a decade without funding. They recently set up a fundraising campaign in an attempt to fund one (to start) core developer of the framework. If you are so inclined, join me in contributing a small donation to help fund this wonderful project. I’m sure they really appreciate the support! Use the link below to check out their donation page. ❤️

Thanks for watching!

– Erik

Follow me on Github!

This video uses the following music:

Gymnopedie No 1 by Kevin MacLeod is licensed under a Creative Commons Attribution license ()


  1. What did you think of this video as opposed to my typical tutorial videos? I had a lot of fun making this one, so if it's well received I'll plan on making more in the future!

  2. Great Video. Please do more of these in future

  3. Kivy is awesome framework for mobile and desktop application, i love use it, make entire game or app with api for writing api i like flask, your video is good

  4. Thanks a lot for your videos, erik !!!! You helped a lot in explaining kivy's ease of use and cross-platform deployment. I am now your supporter and subscriber. Please do more kivy videos !!! By the way, i do hope that you can do a demo of using the camera in IOS and android to take a photo. Thanks !!

  5. love these video ~ can you make the page loading while sliding down

  6. Thank you for this amazing video! I did not know this can be so fast.

  7. This video is so cool. I'm watching it at 2am and enjoyed it a lot.

    I want to learn a much of things that you actually know, and it is cool that you can share your knowledge with all of us.

    Great channel, beautiful coding… Amazing!

    Sorry if my English is not good enough.

  8. Thank for these tutorials.. Just a question '' do we still need virtual box on windows to deploy on android / ios ?''

  9. Please do a longer video on thos one, explaining all of every functions and methods you used in every lines..just dont go to deep, just the nutshell
    Love it👍

  10. I just came across this and is loving it! Do you have anymore games to build with Python & Kivy? And how could I learn to build out your version of the snake game with more complex animations / functionality – maybe a score sheet and different levels..

  11. There's an error: invalid syntax in line 4 <SnakePart>

  12. Do you need to have a make to make IOS apps or to use the Kivey framework? Can it be done on windows?

  13. Hi there Erik 👋. I was wondering how much storage does it take up in your Macbook in general? The kivy project, Xcode, and everything needed to have the app running. How much storage of your Macbook is occupied by everything needed for this project?

  14. so you're using widgets as sprites similar to pygame. Clever. Nice Tutorial

  15. Hey @erik sanberg. Not sure if you'll ever see this. What are you using to run python on your mac? It is not the actual python idle, so I'm curious to know what it is.

  16. You are f**king most beautiful person ever born in this planet. I learned a lot from this.

  17. Hi Erik, thanks for video!
    🔥 🔥 🔥 🔥

    I try to repeat it, but failed with this.
    My command was
    (venv) iMac-Alex:snakeGameFixed alex$ sudo python ./ create snakegame ~/Users/alex/Documents/snakeGameFixed/

    the system answer was:
    /Users/alex/Documents/snakeGameFixed/venv/bin/python: can't open file '/Users/alex/Documents/snakeGameFixed/./': [Errno 2] No such file or directory

    What should I do to fix it?

    And one more problem. With the game algorithm. The longer snake the oftener food placed under the snake's body. So it seems the coordinate for the new food should be not just random, but free of snake body. If it possible, please make needed changes in code.

    I will be very appreciate for your answer.

  18. Its really great video, i learned new stuff in kivy. Erik can you do a tutorial on kivy garden joystick. Please🙏

  19. Aww man, "I have to unplug my mouse and plug in my phone" is such an macbook thing to say

  20. Can you show us how to publish this on the App Store?

  21. It doesn’t work it can not connect the x server thing

    INFO ] [Logger ] Record log in /var/www/.kivy/logs/kivy_22-09-06_24.txt
    [INFO ] [Kivy ] v2.1.0
    [INFO ] [Kivy ] Installed at "/usr/local/lib/py/dist-packages/kivy/"
    [INFO ] [Python ] v3.7.9 (default, Aug 18 2020, 06:24:24)
    [GCC 5.4.0 20160609]
    [INFO ] [Python ] Interpreter at "/usr/bin/py"
    [INFO ] [Logger ] Purge log fired. Processing…
    [INFO ] [Logger ] Purge finished!
    [INFO ] [Factory ] 189 symbols loaded
    [INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored)
    [INFO ] [Window ] Provider: sdl2
    [INFO ] [Window ] Provider: x11(['window_sdl2'] ignored)
    Couldn't connect to X server

  22. I am a windows user and wiring the sw in windows but I want to upload it into iphone. My question : is this possible, when yes how?

Leave a Reply

Your email address will not be published.