Simple Space Shooter

Well i was in hospital for over a week, and had no internet, but my laptop with jme3 on it.
This is what comes out of pure boredom, and some sounds lying around on my pc.

Also this was a simple testcase for my Entity System,
(the real download button is the smaller on on the right)

Btw anyone knows why this post is marked as spam when i add more than one download link?

Post Screens of your top score :slight_smile:


Hehe, cool. Sadly its compiled for Java7 so I can’t run it on my laptop atm :frowning: Hope you’re better!

a week? :s must of been bad! glad u found something to keep you busy :slight_smile:


Recompiled for 1.6,hopefully this works

YEah, without something to do, I would have gone insane :slight_smile:

1 Like

An intelligent person is never bored. :slight_smile: Hope you are better.

I can recommend trying Artemis, I normally don’t like adding dependencies, but Artemis feels very easy, and integrates very well with jME. I am a little worried about how it scales with number of components though, since it allocates an array for each entity with space for one of each type of component. But so far, it has been very nice to work with. Also it handles a little strangely when removing/deleting components from an entity.

Well the design is inspired by artemsis, however its multithreaded like pspeeds one, eg all entities for all systems run concurrently, and in the end the changes are applied. (eg all systems see all entities time frozen in their current tick and components itself a immutable (wich allows for long running background tasks to work without synchronizing)

High Score: 10!!!

Fear Me!

12!!! :slight_smile:

Okay…maybe I should stick to make games rather then play… XD

Love the Style and very cool Sounds.

44, OH YEAH!

42 :slight_smile: …Really hard to avoid the huge amount of bullet ^^.

How long did this take to put together?

When you say threads run concurrently, are these constant running threads? Or futures via an Executor?

actually the es or the game?
the es several weeks, the game then only 2 days.

Well it’s a bit complicated as the system was designed to be lineary scaling with amount of entitys and systems, while being able to scale up to 42core or more on a single machine.

Each system has a dispatcher thread, that runs a loop over all entities mathing the aspect once per tick, divedes them into blocks of 2k5 and dispatches them to a central threadpoolexecutor. It waits till all spawned tasks are finished. The systems are keept in synch with a cyclicbarrier, that does the change of the timefrozen view in its runner. (By also splitting all entities in blocks and let those run by the executor.
The only not good parralizeable part is adding/removing entities. At any time it is allowed to call those methods, and in between ticks the queue for both is emtied by applying the changes. A addition here is that it’s possible to register into this with a Aspect based listener, so eg in this game, the jme binding receives all entity additions for grafical objects to create the corresponding geometry.

Then we als have the jme part, in this case its just a simpleapplication, and everything is done via app.enqueue. The es and the renderring stay as a simple solution in sync by the use of a dual semaphore, that blocks the faster untill the other is ready. The renderer is set a 60fps, so the whole es is slowed down to this. Also since this is a simple game, the executor is only running with 1 thread.

As a side note, when being run on my server, the concurrent gc is used, so another core is blocked with gc alone, but at the other side this is so far able to keep the gc pauses below 1ms wich is important, as components are immutable and many garbage is produced.

1 Like