Let's make a simple game with Python 3 and iPhone

Do you know an iOS app called Pythonista?

What is Pythonista?

Pythonista is a Python environment that runs on iPhone / iPad and has the following functions.

For Pythonista (Python programmer), it's a wonderful environment where you can code anywhere on the train or in the bathroom.

This time, I tried to make a simple game with only Pythonista and iPhone software keyboard.

The game I made

Flappy bird-style side-scrolling action game

Creation time: About 5 hours on the train

FlappyAlien.gif

Source code: https://github.com/yukinarit/flappy_alien/blob/master/flappy_alien.py (Just copy and paste to Pythonista and it will work)

Environment

Search for Pythonista from the App Store and install it.

Although not required, I used StaSh to code the shell environment and git on my iPhone. This page (http://qiita.com/kido-akira/items/8fbe7783245e3b7d3bac) may be helpful for installing StaSh.

asset.png Using StaSh's git to modify the typo and push it to github

Code description

I made it using the scene, ui, and sound packages of the Pythonista module.

I used the sound and image resources that are pre-installed in Pythonista.

asset-1.png

At the end

In this way, you can easily create a game using Pythonista. Personally, I feel great potential as a programming material for children.

Recommended Posts

Let's make a simple game with Python 3 and iPhone
Let's make a shiritori game with Python
[Python] Make a simple maze game with Pyxel
Let's make a graph with python! !!
[Python] Make a simple maze game with Pyxel-Make enemies appear-
Let's make a voice slowly with Python
Let's make a simple language with PLY 1
Let's make a web framework with Python! (1)
Let's make a Twitter Bot with Python!
Let's make a web framework with Python! (2)
Make a simple OMR (mark sheet reader) with Python and OpenCV
[Python] Make a game with Pyxel-Use an editor-
I want to make a game with Python
Let's replace UWSC with Python (5) Let's make a Robot
Make a fortune with Python
Let's make a rock-paper-scissors game
Make a simple Slackbot with interactive button in python
[Let's play with Python] Make a household account book
Let's make a Mac app with Tkinter and py2app
What is God? Make a simple chatbot with python
[Super easy] Let's make a LINE BOT with Python.
Let's make a breakout with wxPython
Make a recommender system with python
Let's make a supercomputer with xCAT
Sugoroku game and addition game with python
Let's make a websocket client with Python. (Access token authentication)
I made a simple typing game with tkinter in Python
Associate Python Enum with a function and make it Callable
Let's create a PRML diagram with Python, Numpy and matplotlib.
How to make a simple Flappy Bird game with pygame
Creating a simple PowerPoint file with Python
Rubyist tried to make a simple API with Python + bottle + MySQL
Let's create a free group with Python
Fractal to make and play with Python
How to make a surveillance camera (Security Camera) with Opencv and Python
A memo with Python2.7 and Python3 on CentOS
I tried to make a periodical process with Selenium and Python
[Python] Let's make matplotlib compatible with Japanese
Make a scraping app with Python + Django + AWS and change jobs
Let's make a tic-tac-toe AI with Pylearn 2
Let's make a combination calculation in Python
Let's make a web chat using WebSocket with AWS serverless (Python)!
Make a desktop app with Python with Electron
Create a simple Python development environment with VS Code and Docker
I made a roguelike game with Python
I made a simple blackjack with Python
2. Make a decision tree from 0 with Python and understand it (2. Python program basics)
Make a wireless LAN Ethernet converter and simple router with Raspberry Pi
[Ev3dev] Let's make a remote control program by Python with RPyC protocol
Make a decision tree from 0 with Python and understand it (4. Data structure)
Make a Twitter trend bot with heroku + Python
Building a python environment with virtualenv and direnv
Make a simple pixel art generator with Flask
Start a simple Python web server with Docker
Try to make a "cryptanalysis" cipher with Python
Make a rock-paper-scissors game in one line (python)
Launch a web server with Python and Flask
Let's control EV3 motors and sensors with Python
Let's write a Python program and run it
Try to make a dihedral group with Python
A simple to-do list created with Python + Django