Coder Social home page Coder Social logo

cljs-snake's Introduction

snake-game

http://lambdax.io/blog/posts/2016-01-19-snake-game-part-1.html FIXME: Write a one-line description of your library/project.

Overview

FIXME: Write a paragraph about the library/project and highlight its goals.

Setup

To get an interactive development environment run:

lein figwheel

and open your browser at localhost:3449. This will auto compile and send all changes to the browser without the need to reload. After the compilation process is complete, you will get a Browser Connected REPL. An easy way to try it is:

(js/alert "Am I connected?")

and you should see an alert in the browser window.

To clean all compiled files:

lein clean

To create a production build run:

lein do clean, cljsbuild once min

And open your browser in resources/public/index.html. You will not get live reloading, nor a REPL.

Re-frame documentation

https://github.com/Day8/re-frame/tree/master/docs#introduction

License

Copyright © 2014 FIXME

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

cljs-snake's People

Watchers

 avatar  avatar

cljs-snake's Issues

Add a leader board

When the game is finished, and the player bested high score, he/she can type his/her name. Then the leader board is displayed. When space is pressed, you go back to the start of the game.

  • Expand the data model with a leader board.
  • Add a game stage after :running and show the leader board. If the player topped the high score, do new entry.
  • Where to store the leader board? localstorage? something online?

Create game levels that you can edit within the game

A game level introduces:

  • A color scheme
  • The start position of the snake.
  • A number of walls to make it harder for the snake.
  • Add levels to the data model, and the current level.
  • expand game rendering to draw the current level into the game
    • Level colors
    • the walls
  • expand collision detection
  • add level editing to the game.
    • the 'e' key starts edit mode. The snake is hidden. You can draw walls, and choose the start position of the snake. If you use 'e' key again, the edited level is restarted.

Add dificulty levels

There will be 3 levels. The level will affect game speed and score for each point

  • Expand the model with a level value, and base game speed and score calculation on the level.
  • Introduce game stage ':loaded', It shows a menu for game level. Cursor keys allow you to move up and down, and enter selects the level and starts the game.

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.