GithubHelp home page GithubHelp logo

flappy.ps's Introduction

flappy.ps: Flappy Bird in PostScript

Flappy Screenshot

This was my entry for Devnology's CodeFest 2016. The objective was to write Flappy Bird in your favorite uncommon or esoteric programming language.

Always up to a challenge, and wanting to up my concatenative language skills, I did it in PostScript.

Notes to future historians: I'm not an experienced PostScript programmer! I just threw something fun together for a coding challenge. My PostScript style is probably completely crap, so don't try to learn anything from this code, maybe other than a curiosity.

(Short Presentation)

How to run it

You'll need GhostScript (obviously). Then run

./run flappy.ps

To see pages rendered live (pressing ENTER all the while), or run

./export flappy.ps

To export to a PDF and viewing that in your favorite PDF viewer.

How it works

Every frame of the game is rendered as a separate page in the output.

The locations of the pipes are generated based off a random seed you'll find at the top of the file:

/level 3582 def

Because PostScript has no user input, the frame numbers of where the user is going to jump are part of the program. Edit this to advance in the level (hopefully):

/jumps [
    30 35
] def

The game will then into a loop where the scene is drawn using various PostScript drawing commands, and the physics are calculated to update Flappy's position.

flappy.ps's People

Contributors

rix0rrr avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.