Coder Social home page Coder Social logo

pac-man's Introduction

Pac-Man in 348 Bytes of HTML+JS

Based on the the oldskool remake by @maettig of the classic arcade game Pac-Man. Golfed down by @aemkei, @p01, @subzey, @xem, @0ndras, @maettig. See the original gist.

Demo

PLAY THE DEMO!

Use your keyboard to control the movement.

Source

<body onload=for(l=D=11;d=k=D--;x=78)l+="῿
၁᝝ᐅᗕᔕᕵ".charCodeAt(D<7?D:10-D).toString(2)
+3;l=l.split(""),setInterval("if(x^X)for(h
=i=l[x]=2,l[x+=d=2%k||9&l[x+(o=k%2||~-k*14
)]?9&l[x+d]?0:d:o]=4,l[X]&=7,b=D%4-2,b=b++
%2||b*14,9&l[X+b]?D++:X+=b,l[X]|=8;i<154;)
p.innerHTML=h+='.# \\nx'[l[++i]]||0",X=151
) onkeydown=k=event.which-38><pre id=p>

Gameplay Video

Pac-Man

Board Layout

#############
#     #    .#       #   = Wall
# ### # ###.#
# # X    .#.#       X   = Ghost
# # # ###.#.#
# # # o #.#.#       o   = Player
# # ### #.#.#
# # ......#.#       .   = Gold
# ### #.###.#
#.....#.....#
#############

pac-man's People

Contributors

140bytes avatar aemkei avatar maettig avatar p01 avatar subzey avatar thiemowmde avatar

Watchers

 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.