The game Breakout implemented with Reagent
Clojure CSS Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
env Restarting repo on github Feb 2, 2015
resources/public
src fix(garden) forgot the #info styles Feb 5, 2015
.gitignore removed Procfile and system.properties Feb 3, 2015
LICENSE Restarting repo on github Feb 2, 2015
README.md switched CSS to garden, much better animations too Feb 5, 2015
deploy.sh
project.clj

README.md

Reagent Breakout

This is an implementation of Breakout done in Reagent and ClojureScript.

It is mostly done, but still has a few more things to do. Check out the issues to see what's left to tackle.

You can play it here

Hacking on the code

You will need Leiningen installed as well as a Java SDK 1.7 or better. (Typical Clojure environment).

run lein figwheel to setup the dev environment. You can then see the game at http://localhost:3449.

Also lein garden auto will automatically start compiling the garden (at src/clj/breakout/style.clj) into css.

Any CSS or ClojureScript changes you make will be picked up right away by the browser. But since this is a game with a lot of state, requestAnimationFrame, etc, you still often need to refresh the browser to see your changes.

Deploying

run lein build-prod. Once done, the contents of resources/public/ will have everything you need:

  • index.html
  • js/app.min.js
  • img/ -- all of the images in here
  • css/site.css

resources/public/ is what gets deployed out to the gh-pages branch with deploy.sh