Code Monkey home page Code Monkey logo

ld34's Introduction

Wrecking Bull

This is an entry into Ludum Dare #34 by Jim MacArthur.

Ben is a bull for hire. He's been hired by Mr Delaunay to smash another china shop's stock. You control Ben's skateboard and have to keep Ben inside the shop.

In other words, it's a clone of Breakout. The main difference is that the blocks are arbitrary polygons. The collision resolving code becomes significantly more complicated because of this. It should model a circular projectile bouncing off both vertices and edges of a polygon accurately, although there are almost certainly some glitches in the algorithm which was written in a few hours.

Everything necessary to run game should be in the js/ subdirectory after checkout. The top-level directory contains some tools used to make the polygon sets. The shapes start off as simple polygons made in Inkscape. From then, you can extract just the path data into an 'svgextract' file. poly-processor.py will turn that into raw polygon data (one polygon per line) and 'shatter.py' will then create a random (but approximately evenly distributed) network of points which should fit onto the area of the polygon. The Voronoi diagram is calculated from those points, and the intersection of the voronoi diagram and the original shape is taken. This becomes the 'shattered' version. Both the original raw polygon data and the shattered version are copied to the js/resources subdirectory.

ld34's People

Contributors

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