Giter VIP home page Giter VIP logo

t3tr0s's Introduction

PLAY HERE

We re-created Tetris™ in ClojureScript. We mainly did this to produce the pleasure and to celebrate the 30th anniversary of its original release in 1984. Our remake enabled us to host a small, local tournament to share a montage of the game's history. Choose from 10 themes representing the popular versions from its past.

DevBlog

In the beginning, we worked on the game at least once a week. It got pretty crazy at the end closer to deadline, but our initial process is documented in blogs below:

  • DevBlog 1 - data, collision, rotation, drawing
  • DevBlog 2 - basic piece control
  • DevBlog 3 - gravity, stack, collapse, hard-drop
  • DevBlog 4 - ghost piece, flash before collapse
  • DevBlog 5 - game over animation, score
  • DevBlog 6 - level speeds, fluid drop, improve collapse animation, etc.
  • DevBlog 7 - draw next piece, tilemap for themes
  • DevBlog 8 - allow connected tiles for richer graphics
  • Day 9 - live board broadcasting (no blog)
  • Day 10 - chat room, more tilemaps, page layouts (no blog)
  • Day 11 - page routing, username (no blog)
  • Day N - socket netcode, spectate mode, MC controls, key-repeat control, chatroom, authentic theming, history graphs, ...

Learn

In the end, we wrapped up what we learned into an educational resource:

Development Setup

  1. Install Leiningen and Node.js.

  2. Run the following in the project directory

    # install node.js dependencies
    npm install
    
    # install grunt
    npm install -g grunt-cli
    
    # compile LESS file
    grunt
    
    # compile ClojureScript files (this may take a minute)
    lein clean && lein cljsbuild once
    
    # copy the example config file (edit as needed)
    cp example.config.json config.json
    
    # start the node.js server
    node server.js
  3. Open http://localhost:1984 in your browser.

If you want a REPL connected to the browser for interactive testing:

lein repl
> (brepl)

Team

License

All code licensed under the terms of the MIT License.

The image files of past versions of the games (ie: the tilemap files) belong to their respective copyright holders.

Tetris is a registered trademark of The Tetris Company.

t3tr0s's People

Contributors

oakmac avatar imalooney avatar dudemullet avatar pgambling avatar shaunlebron avatar

Watchers

Johnny Duo 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.