Questions tagged [entity-component-system]

A programming paradigm in which game-objects (entities) are composed out of components, and are operated upon by systems.

Filter by
Sorted by
Tagged with
3
votes
1answer
37 views

ECS System in Javascript

I'm trying to get a better feel for how an entity-component-system system works. I'm most comfortable in JavaScript, so that's what I wrote it in. I'm mostly looking for ways my code violates ECS ...
3
votes
1answer
108 views

Creating a cache-friendly component system

I am fairly new to c++ and am attempting to write a simple 2D game engine. I am currently working on my object model: a pure component system, similar to that described in the Data Locality chapter in ...
4
votes
1answer
108 views

Bridge-Pattern or Entity-Component-System

I want to learn how/when/why to use the GoF Design Patterns. These last days are dedicated to the Bridge Pattern, which means: Decouple an abstraction from its implementation so that the two can ...
3
votes
1answer
170 views

Single Header C++14 Entity-Component-System Library

I plan to create a 3D space simulator (realistic (orbital) physics, procedural planets) based on this ECS library. I am very new to game development so feedback is very welcome. I am especially ...
1
vote
2answers
46 views

Numbers as objects

Instead of this.getValue(); I thought it would reduce duplication I had number objects such as this.value.get(); I have ...
4
votes
1answer
231 views

Component-based system for animals

I'm making a small Zoo application, in this question I will cover only the basics - the animals. I've picked the component-based design over inheritance because the creatures can be quite complex ...
3
votes
1answer
82 views

Communicating events between entity components with minimal code overhead

I'm working on a game which utilises a variant of the entity component system pattern. In my current code, I have been communicating between components using code of the form: ...
2
votes
2answers
3k views

Entity Component System (ECS)

I'm currently working on my own game engine for learning purposes, so I've implemented the first iteration of an entity component system using Java 8. For my approach, I decided to not use any entity ...
3
votes
0answers
112 views

Mesh Modifier System in the Unity Game Engine using C#

The system is meant to replicate the deformers and modifiers commonly used in 3D modeling programs like 3DS Max, Maya, Blender and Cinema 4D. I made a post on Reddit, explaining the features and ...
3
votes
0answers
71 views

Template class for an Entity Component System library

I'm working on an Entity Component System library. Right know I'm trying to clean up the Entity/Component part (only the code which manage the data). But I have a class which I think is not really ...
2
votes
1answer
340 views

Implementing Entity and Component in a game engine

I'm currently creating a game engine for my personal project. And I'm currently implementing Entity and Component System. Classes and Interfaces Definitions Here the classes and interfaces that ...
1
vote
1answer
88 views

Method of uniquely identifying classes

I have written the following class to allow me to uniquely identify classes in C++, and I was wondering if there are any better ways of going about it. ...
2
votes
1answer
189 views

Ball Entity for a Entity/Component/System Soccer Game - Revision 1

I made some refactorings in my classes. The original code is in this question. In that question I receive the suggestion to create a Factory for the class BallEntity. I myself forgot that BallEntity ...
3
votes
2answers
123 views

Ball Entity for a Entity/Component/System Soccer Game

Here is a code snippet of a class that I be interested to refactor. I was in doubt on how to proceed with the process of instantiation. The original ask was here. After think about it and heard some ...
1
vote
0answers
466 views

Soccer game using libgdx and an Entity System Framework

I'm working in a game as a hobbie. I'm using an Entity/Component/System architecture using Libgdx as Engine and Ashley as Entity Framework. I have a GamePlayScreen in which I initialize my system, ...
1
vote
1answer
7k views

Casting between types for shared_ptr

I'm implementing an Entity-Component-System. Basically, an entity is a wrapper around an ID, a component is just a POD struct, and a System is a class that does work on components corresponding to the ...
3
votes
0answers
429 views

Entity Component System in C++11

An Entity Component System works by grouping various components around a central ID, aka Entity. Entities and Components do not have any code, they are simply POD containers. Rather, the code lies in ...
5
votes
0answers
189 views

Entity component system Lua API

The destruction of the objects are handled by the garbage-collector metamethod. (Does this make sense? This means that an out-of-scope object will stay visible in game until garbage collection.) The ...
5
votes
1answer
2k views

ECS Event/Messaging implementation

I am experimenting with ECS design and I am looking for a solid way to implement a message bus for use between the different systems. Here is a stripped-down version of my current implementation: <...
3
votes
0answers
89 views

Entity component system for text-based console on Windows

I have written this code base on AsciiEngine. How can I improve this code? ...
4
votes
1answer
2k views

ComponentManager - Entity-Component-System architecture in C++

Lately I've been working on a small C++ Entity-Component-System framework. Like most other ECS frameworks the internal data is presented as a table where an entity is a simple row index and each ...
6
votes
0answers
290 views

Pong game built on a minimal entity component system

This simple game is built on the ECS described here: Minimal entity component system, take 2 ...
6
votes
1answer
472 views

Minimal entity component system, take 2

Here's a followup to Minimal entity component system. Please see that question for background. ...
5
votes
0answers
448 views

Minimal entity component system

I was trying to figure out what a minimal ECS might look like in Lua; here's what I came up with. This is based very loosely on darkf/microecs. ...
3
votes
2answers
1k views

Game Engine :: Entity Component Design - Handling Input [closed]

I am currently creating a game engine for educational purposes. ECS Design Pattern The first design pattern I've included is the Entity/Component/System pattern. Therefore I've got a base singleton ...
5
votes
1answer
251 views

Data structure for entities

I am working on an Entity-System-Component engine for games, which basically means an entity is an object that points to components attached to it, and systems retrieve components to modify their data....
11
votes
3answers
4k views

An ECS model for game development

I'm working on a framework that will be used to create simple 2D grid based games. It is using an Entity-Component-System pattern with corresponding manager classes used to control the lifespan of ...
7
votes
1answer
3k views

Entity Component System in C++

I've written an Entity Component System using C++ for my game engine. I'm still inexperienced so I've probably made a lot of mistakes. Thus I've decided to ask here for an honest review. The complete ...
4
votes
0answers
208 views

Collision system in Pong-like game

I am writing a game like Pong. Therefore I am using an entity system approach, so I use a Component-based design. The hardest part until now was to write the collision system. As I just began with ...
4
votes
2answers
522 views

Game engine utilizing a custom graphics system

I just have a somewhat simple question on coding practices. I have never written a large application before and I am currently working on building a game engine in JavaScript. The part that confuses ...
11
votes
1answer
2k views

Component-based system for JavaScript game

I'm creating a JavaScript/WebGL based game and would like you all to take a look at the current entity component system which I created for it. I've used it once before on another project, and while I ...