C++ Entity System

Started by
5 comments, last by pinebanana 11 years, 3 months ago
After many hours of confusion on how I should implement my Entity System; it has finally been completed (at like 4 in the morning) smile.png. This framework is based of the Java Entity System, Artemis, however it's a bit different with the way it is implemented, but you will find similarities. Unfortunately it is not entirely complete, I believe the only thing left to do is the SceneDirector, however, that's not really a required class in the framework, it's more of an add-on to help you manage Scene* objects.

*If you are familiar with the Artemis framework, a Scene is a World.

Features:


- Unlimited component-types
- Fast retrieval of components
- Creation of components, entity-systems and entity-managers through a string

If you are going to try this framework out, please submit ANY bugs and feel free to add suggestions. I have put issues in my BitBucket repo available for the public, so please submit bugs/suggestions there. There are no known bugs at the moment, I have resolved them.

NOTE:
If you are unsure what an Entity System is, I recommend reading this basic tutorial and preferably a blog, such as this one, before reading the tutorial, which describes what one is.

EDIT:

Moved to tutorial to the public wiki on BitBucket, here.

anax - An open source C++ entity system

Advertisement
Good job, I know you enjoyed working on it. It has a lot of similarities to my Escape System Entity System, but it also has some differences, including some improvements.

The 1st thing I noticed that bothered me a little was the Macro requirement. As minor as it is, I couldn't help but frown when I saw it.

I haven't been able to look through it all, but it looks good so far. Have you used it extensively? When designing the Escape System, and using a test program, it seemed to all work fine. However, when I put it into an actual game, I found some other issues that had to be ironed out (which, honestly, I don't think I've uploaded to github)

My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

Looks awesome! I've BookMarked this page, I'll probably use it in my next project.

I'm a game programmer and computer science ninja !

Here's my 2D RPG-Ish Platformer Programmed in Python + Pygame, with a Custom Level Editor and Rendering System!

Here's my Custom IDE / Debugger Programmed in Pure Python and Designed from the Ground Up for Programming Education!

Want to ask about Python, Flask, wxPython, Pygame, C++, HTML5, CSS3, Javascript, jQuery, C++, Vimscript, SFML 1.6 / 2.0, or anything else? Recruiting for a game development team and need a passionate programmer? Just want to talk about programming? Email me here:

hobohm.business@gmail.com

or Personal-Message me on here !


Looks awesome! I've BookMarked this page, I'll probably use it in my next project.


Thanks, although I may have some minor changes when I get around to it :)



Good job, I know you enjoyed working on it. It has a lot of similarities to my Escape System Entity System, but it also has some differences, including some improvements.

The 1st thing I noticed that bothered me a little was the Macro requirement. As minor as it is, I couldn't help but frown when I saw it.


Thanks, and yeah... I would prefer not to use macros, but in order to have unlimited component types, it is required (without using hash-maps). Also, I placed them to serialise the components/systems/managers.


I haven't been able to look through it all, but it looks good so far. Have you used it extensively? When designing the Escape System, and using a test program, it seemed to all work fine. However, when I put it into an actual game, I found some other issues that had to be ironed out (which, honestly, I don't think I've uploaded to github)

I have tested it, but I don't believe all of it's features, and I have not tested the performance of it. There is probably a lot of optimizations I will do, but I still have yet to make a game with it, which will be soon. Currently I'm just a tad busy with other things :C. Thanks again.

anax - An open source C++ entity system

Very interesting and good stuff.
One question, do we want to couple entity/component with scene?
I think an entity component system is an independent system which can be used freely without coupling to scene.

https://www.kbasm.com -- My personal website

https://github.com/wqking/eventpp  eventpp -- C++ library for event dispatcher and callback list

https://github.com/cpgf/cpgf  cpgf library -- free C++ open source library for reflection, serialization, script binding, callbacks, and meta data for OpenGL Box2D, SFML and Irrlicht.


Very interesting and good stuff.
One question, do we want to couple entity/component with scene?
I think an entity component system is an independent system which can be used freely without coupling to scene.


In this System, a Scene is a specific world where the Entity lives, it's not a Scene in the rendering sense. An Entity has to be active within a Scene, but it can be moved from Scene to Scene if you are using multiple Scene (which probably isn't common).

My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

Very interesting and good stuff.
One question, do we want to couple entity/component with scene?
I think an entity component system is an independent system which can be used freely without coupling to scene.

A tutorial on the wiki is up (it is not entirely completed, but most of the basics are there)

anax - An open source C++ entity system

This topic is closed to new replies.

Advertisement