Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Latest commit e50ece9 Apr 15, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information. update readme Apr 15, 2019

Asteroid Belt

A bullet hell game written in python that fits on a business card.

Inspired by Frank Force's Tiny Ski:

Limited to 40 characters wide by 35 characters tall (max 1400 bytes).


Should run in Linux and Mac consoles natively.

On Windows the curses library will need to be installed first:

  1. Install python pip
  2. Run the following command pip install windows-curses

Compiles in python 2.7 and 3.X

To run, simply install python then download or clone the repo and type python into a terminal.


  • WASD keys to move
  • P key to shoot
  • 0 key to quit


  • Fast paced bullet hell gameplay
  • Randomly generated asteroids
  • Adjustable difficulty (make the console screen smaller for a harder difficulty)
  • Scoring system

The Code

class A:             # ~~ASTEROID BELT~~
  w=0;a=4;t=2          # By u/Bombadil44
  def m(_):     #
    _.x+=_.z;_.w+=1  # WASD=move P=shoot
    try:      # Don't Panic! Have Fun :D
      for i in 0,1: p(_.x,_.w+i,"O"*4)
    except: o.remove(_)
  def __init__(_): _.x=r(t);_.z=r(-1,2)
class Z: #                       OOOO 0
  def __init__(_): _.x=x+3;_.y=y#OOOO
  def m(_): #                        AA
    _.y-=1;p(_.x,_.y,"0") #    OOOO <==>
    if _.y<=0: global m;m=0 #  OOOO  **
from curses import*;from random import*
l=[" AA","<==>"," **"];d=a=m=n=0;y=q-9
def p(h,e,w): z.addstr(e,h,w)
def k(e=100,w=1,l=0):
  if e in u: global d;global a;d=w;a=l
while 48 not in u:
  u=[];U=0;r(7)<5 and o.append(A())
  while U!=-1: U=z.getch();u+=U,
  m=(m,Z())[112 in u];k();k(97,-1)
  x+=d;y+=a;y-=(0,a)[y<0 or y+3>q]
  x-=(0,d)[x<=0 or x+7>t];m and m.m()
  for i in 0,1,2: p(x,y+i,l[i])
  for e in o:
    and g+e.t>y+2>=g and u.append(48))
    if (m and v<=m.x<v+e.a and g<=m.y<
     g+e.t): o.remove(e);m=0;n+=1000
  p(10,0,"SCORE: %s"%(n));napms(50)


alt text

You can’t perform that action at this time.