Artemoids

Artemoids Web StartArtemoids is a simple Asteroids clone I put together using the Slick 2D game engine and the excellent Artemis entity-component framework. It was a simple test to see how effective I could be with the Slick/Artemis combination, and I was very happy with being able to get it to a playable state in just a few hours (including getting my head around Artemis).

Admittedly a fair chunk of the initial codebase was lifted from Artemis’ sample game StarWarrior, but over time the code became increasingly tailored and I began to see how easy it was to reuse components and modify behaviours. I’m very excited about getting stuck into a few more projects with Slick/Artemis in the near future.

Click Launch above or play in your browser!

Or if you’re so inclined, check out the source code! It’s open source under the Simplified BSD License, so you can do anything you want.

8 thoughts on “Artemoids

  1. Pingback: Entity/Component Game Design That Works: The Artemis Framework

  2. Pingback: Introducing: Artemoids

  3. Pingback: Artemoids now on Softpedia!

  4. Hi! I’ve recently discovered the Artemis entity-component framework and I’m tinkering with your Artemis code. I’m struck with the AsteroidSpatial class. The method initialize() starts with the following lines:

    transform = new ComponentMapper(Transform.class, world).get(owner);
    Asteroid a = new ComponentMapper(Asteroid.class, world).get(owner);

    But I’m getting the error: The constructor ComponentMapper(Class, World) is not visible. I’m using the artemis-a609b2076aacc0ef5ecf0b390205d01bb88ceae2. Do you know any way to get around that problem? Thanks in advance!

    • Oh! Ok, sorry. I should search a little bit more about Artemis before start asking questions anywhere. I believe the followong lines will fix the problem:

      ComponentMapper transformMapper = world.getMapper(Transform.class);
      transform = transformMapper.get(owner);
      ComponentMapper asteroidMapper = world.getMapper(Asteroid.class);
      Asteroid a = asteroidMapper.get(owner);

      Thank you anyway!

      • Always feel free to ask questions, but it’s good to hear you figured it out because I’ve been hacking on JavaScript for a while now, and I’d have to think back a bit!

Leave a Reply