Coder Social home page Coder Social logo

asteroid-civil-war's Introduction

Asteroids

This is a "game" I wrote in 2010, with some minor changes to make it compile using stable libraries. It's really just a demo for a 2D vector graphics engine and a particle system.

I've spent a few hours in 2022 cleaning it up:

  • Now builds with a stable version of Allegro
  • Untangled some cyclic dependencies (the module dependencies now form a DAG)
  • Replaced libboost with C++17 standard library
  • Replaced a lot of ugly iteration with ranged-for or STL algorithms

It's still not particularly good code:

  • It leans heavily on a crutch made of shared_ptrs. Most of these could be unique_ptrs or even direct data members.
  • There are some complex loops I didn't take the time to fully recomprehend - these can probably be simplified by decomposition into STL algorithms.

Dependencies

You'll need Allegro 5, including the development headers, along with the usual g++ toolchain. To install these dependencies on Ubuntu, just run sudo apt install build-essential liballegro5-dev.

Building

  1. Install the dependencies.
  2. Build the application by typing make.
  3. Run the application by typing ./asteroids.

Controls

Arrow keys rotate/accelerate. Spacebar fires an asteroid. Use the asteroids to destroy the asteroids.

asteroid-civil-war's People

Contributors

acarapetis avatar

Stargazers

 avatar

Watchers

 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.