Code Monkey home page Code Monkey logo

chesspursuit's Introduction

Chess Pursuit

This is the game I created for the JS13K contest of 2015, the theme was "Reversed".

Concept

My interpretation of the theme was quite loose. The idea was to turn the chess game upside down, making it an action game instead of a strategy game. For once, I started with the graphical concept, the perspective and the scrolling and tried to make some game out of it. The result is a little weird, the 'action' part and the 'puzzle' part don't blend so well, but I kinda like it anyway.

Code

I lost a lot of time drawing the checkerboard. My first version used shaky code to compute the projections from checkerboard space to screen space. While it looked good enough, it was impossible to reverse the projection for computing mouse input, so I had to do it again with a more mathematical approach.

For the pieces, I decided to use SVG in order to have them scale nicely. It was my first contact with SVG and it was quite interesting. I probably would have saved some time by writing the SVG elements directly in the HTML instead of using JS to generate everything.

As for the rest of the code, it is a little messy, as usual. I should probably have taken some time to write things more cleanly, especially the intro & dialogs part.

External code

I relied on Mr Doob stats.js lib during debug: https://github.com/mrdoob/stats.js/

And on jsfx for the sound: https://github.com/mneubrand/jsfxr

Using code provided by Jack Rugile for the integration of jsfxr: http://codepen.io/jackrugile/blog/arcade-audio-for-js13k-games

chesspursuit's People

Contributors

gre avatar ornicar avatar saturnyn avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  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.