Skip to main content

Questions tagged [entity]

The tag has no usage guidance.

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

How do I design a "Chores" or "Errands" system?

I have a number of entities running around in my game, and I am running into a headache trying to design and implement a system for them to both generate and assign the tasks. More than anything else, ...
Raven Dreamer's user avatar
0 votes
0 answers
39 views

Entity initialization in an online game

How do online games handle creation of new entities? I currently have an EntityFactory class that requires an ID (specifying the entity type). A bunch of subroutines are executed to determine exactly ...
Kaeru's user avatar
  • 3
0 votes
0 answers
785 views

How to handle various collision effects within an Entity Component System?

Let's say we have three enemies, a bear trap, a fire trap, and a minotaur. When you walk over the bear trap, the game spawns an invisible entity that, upon the player colliding with it, slows the ...
Ryan Peschel's user avatar
0 votes
1 answer
431 views

Cannot decide between using a MessageBus and entities for events in my ECS game

For example, let's say that the player walks into an enemy and in response, a chain of events should occur (such as: his score goes up, the enemy dies, a cinematic starts, etc.) I see two "proper&...
Ryan Peschel's user avatar
1 vote
0 answers
165 views

How to manage data relationships when designing a crafting system?

I'm trying to determine all the items, crafting methods and recipes to put in my game, and the relationships between them. I need a tool that allows me to do this both top down (boat needs sails and ...
Teeracroptus's user avatar
1 vote
1 answer
2k views

Is there a way to make the enemy start its pathfinding once the player is in a certain distance than the enemy

I am currently using A stars' pathfinding code here: https://arongranberg.com/astar/. So I didn't create any scripts, and used the scripts provided by astar. But the problem here is that even though ...
user avatar
1 vote
1 answer
2k views

How to delete Unity Hybrid ECS Entities?

I'm trying to get into Unity's Hybrid ECS feature. Creating and Manipulating Entities has worked fine so far for me, but somehow I can't find a viable option to delete Entities which works 100% of the ...
BloodEchelon's user avatar
1 vote
1 answer
852 views

How can I make an entity invulnerable to fall damage?

I've been using minecraft forge 1.12 to make a mod that gives the user super-jumping abilities. However, I've been having trouble making the player invincible to fall damage. I've tried to use a ...
Picachieu's user avatar
  • 117
1 vote
1 answer
305 views

Network limitation in multiplayer game

I have a multiplayer cooperative game (PVE) in where there can be up to 200 enemies at a time (somewhere around that) and I was wondering how devs generally synchronize these? I already have packets ...
justanotherdev's user avatar
0 votes
1 answer
171 views

Java - Entity Collision only working for last index of the Entity Array

I am in the early stages of creating a Java 2d platformer / sidescroller game where the Entity class requires (at this point) basic Rectangle bounds collision detection. In my code I check to see if ...
Ryan's user avatar
  • 41
3 votes
1 answer
401 views

How would a server handle sending entity updates to clients?

Lately I've been looking into networking and sockets and made small test programs to get the basics down. So far I've made a TCP turn-based game from where I learnt a lot and helped me getting some ...
Dennis Björk's user avatar
1 vote
2 answers
2k views

Should entities auto-register to systems based on their component signature?

I see all the upside in entities registering automatically for basic components. If an entity has a Renderable component, it should be registered to a list that's used by a Renderable System. If an ...
Danny Yaroslavski's user avatar
0 votes
0 answers
687 views

Nested Entities in Entity Component Systems (ECS) [duplicate]

Say I have an entity that has these components: -Transformation -Visual Imagine that these components can nest: If I have a parent transformation component, a child transformation relies on the ...
Danny Yaroslavski's user avatar
1 vote
2 answers
396 views

The most correct/efficient way to update millions of entities that change over time in an mmo?

We have a server and a database in the cloud. We have a game where each player can grow a farm on a massive x,y grid. Each hour is a grow cycle. All players can harvest anyone's plants. Player A ...
scranley's user avatar
  • 115
1 vote
1 answer
806 views

Creating Multiple Render System to Draw Different Entities in Entity-Component-System

When creating ECS based game engine, do you (or can I) create multiple rendering systems? Let's say I have an Entity class which is the basic unit in my engine, all it can do is add, remove and get ...
dovicz's user avatar
  • 191
2 votes
2 answers
1k views

How to convert and handle (controlling) OOP game objects via ECS?

I'm having hard time converting OOP game objects to Ashley ECS framework. I have a character, gun & a bullet class. The character uses the gun as weapon, the gun class has a fire method that ...
ronscript's user avatar
  • 501
3 votes
1 answer
1k views

Handling data logic on libgdx ai state machine or in ashley system?

In this below example, I've combined libgdx ashley and AI state machine. Do you think it's a good idea to handle the logic in state machine or stick on handling the data logic on System? ...
ronscript's user avatar
  • 501
1 vote
0 answers
522 views

What is the proper way of creating bullet in libgdx ashley ecs framework?

I'm still thinking, how do I properly pool a bullet in libgdx ashley? Because the PooledEngine is available, which the Entities, ...
ronscript's user avatar
  • 501
2 votes
2 answers
1k views

Entity System and "composite" entities

I'm new to the Entity Component System pattern and there's something I cannot figure out. Let's say I have the following entity: ...
morcmarc's user avatar
2 votes
0 answers
325 views

When NOT to use ECS architecture? [closed]

I'm familiar with the notion of entity-component-system architecture, and its advantages over traditional class trees. That being said, are there scenarios where one wouldn't want to use entity-...
JesseTG's user avatar
  • 1,077
3 votes
1 answer
6k views

Updating a multithreaded Entity-Component-System

I am currently trying to implement an (sort-of) Entity-Component-System. I've got the gist of it, that is, how an ECS is supposed to work. So far i have 4 classes in my design (not yet fully ...
tubberd's user avatar
  • 265
2 votes
1 answer
191 views

How to propagate component updates? (Changing components at runtime)

Whenever an entity is being added to an entity controller (which is essentially just a bag of entities), I scan through it's components to figure out if I need to register additional entity processors ...
artganify's user avatar
  • 469
1 vote
0 answers
278 views

XNA Collision In An Entity Part System

I've hit a loss in creating a "game engine" in XNA, I'm extremely confused over how to approach collision in an Entity-Part System ( following this as a reference ). I can make all the entities with a ...
Zombleh's user avatar
  • 11
0 votes
2 answers
205 views

entity component - get object from entity system without knowing it's ID

Ive been building a game using a Entity Component system, but im having a bit of an issue finding a specific object in my entity system without knowing the Entity's Id. My game is organized in ...
iNFiNiTY's user avatar
0 votes
1 answer
134 views

How to read a custom map format [closed]

I am trying to create a custom map format for my own little 2D RPG, so my question is rather how do I manage reading and creating a custom map format properly and flexible. First off, I am writing my ...
Thyrrac's user avatar
  • 13
8 votes
1 answer
6k views

Intersystem communication in a ECS game

Apologies if this question has been answered before, but after relentless searching I couldn't find anything. As many, I've recently jumped on the ECS-bandwagon, and I am currently killing some time ...
trmd's user avatar
  • 81
3 votes
1 answer
297 views

How can I derive hierarchical draw ordering for entities in an entity system?

How do you implement hierarchical render order in an entity system? For example: two player entities each carry a gun entity. If you set the player entities to zindex = 0 and the gun entities to ...
Jules's user avatar
  • 31
2 votes
2 answers
459 views

Data model design using Core Data and Spritekit

I have a entity called Item, and every item can have two or three bonuses... What would be a good model design in this situation. I can think of something like: To have many optional attributes ...
Whirlwind's user avatar
  • 123
0 votes
1 answer
474 views

How do I efficiently deal with entities moving between chunks?

I am working on a game in which entities need to be stored in chunks. This is the basic chunk format: public static Entity [row][column][entities] chunkEntities; ...
Progo's user avatar
  • 163
0 votes
1 answer
308 views

Handle Entities & Collision in large numbers [closed]

I am creating a simple 2D maze game and I am a little confused about entities & collision detection. At the moment, my entity class is an abstract class containing position, velocity, sprite and ...
Caithrine's user avatar
0 votes
2 answers
2k views

Undefined reference error when trying to access a component using ECS [closed]

I'm trying to access the x and y values from PositionComponent in my MovementComponent but I get this error and I just can't ...
Marko Kitonjics's user avatar
4 votes
1 answer
2k views

Where should I put the SDL_Renderer* using the ECS with SDL2 and C++?

So I'm still learning about ECS (Entity Component System) and whenever I'm thinking about the architecture and actual implementation, I just can't figure out where should I put the SDL_Renderer*. So ...
Marko Kitonjics's user avatar
18 votes
4 answers
5k views

Cache misses and usability in Entity Systems

Lately I have been researching and implementing an Entity System for my framework. I think I read most articles, reddits and questions about it that I could find, and so far I think I am grasping the ...
Grimshaw's user avatar
  • 3,121
1 vote
1 answer
253 views

How can I resolve component types in a way that supports adding new types relatively easily?

I am trying to build an Entity Component System for an interactive application developed using C++ and OpenGL. My question is quite simple. In my GameObject class I have a collection of Components. I ...
John's user avatar
  • 201
2 votes
4 answers
2k views

Executing Components in an Entity Component System

Ok so I am just starting to grasp the whole ECS paradigm right now and I need clarification on a few things. For the record, I am trying to develop a game using C++ and OpenGL and I'm relatively new ...
John's user avatar
  • 201
0 votes
1 answer
774 views

How to send components in an ECS System?

I'm trying to send a CreateEntity packet from a server to client, but I can't figure out how to send the information about components over the network. I gave each component an ID, but then I realized ...
Tips48's user avatar
  • 321
3 votes
2 answers
390 views

Should entities store other other entities that they spawned?

How should a game entity add another game entity to the game world? For example, an entity shooting a missile (which is another entity), means the new Missile will ...
Aviv Cohn's user avatar
  • 913
2 votes
1 answer
889 views

Where to put my entity component messaging functionality?

I've done my research and read as many articles and posts on messaging and ECS's as I could find to help me get mine working. However, I'm at a roadblock on how to get my messag functionality to be ...
Stephen Panagiotis's user avatar
0 votes
1 answer
228 views

Entity System handle graphics/textures [duplicate]

I use in Java Artemis(entity system library) and Slick2D(graphics library) for a game. Now I wonder me, how I should handle graphics(sprites, textures...). In the demos of the page from Artemis it was ...
user2933016's user avatar
2 votes
1 answer
369 views

Making more complicated systems(entity-component-system model question)

I'm using a model where entities are collections of components and components are just data. All the logic goes into systems which operate on components. Making basic systems(for Rendering and ...
user avatar
0 votes
2 answers
1k views

Slick2D - Entities and rendering

I have been trying to create my very first game for quite a while, followed some tutorials and stuff, but I am stuck at creating my entity system. I have made a class that extends the Entity class and ...
ntakouris's user avatar
  • 172
2 votes
2 answers
1k views

Why do my update and draw loops throw a concurrent access exception?

I've taken up the challenge of creating a basic 2D side-scrolling monster truck game for my little brother. It seems easy enough in theory, but jumping into Java out of XNA feels strange. My game ...
Lost_Soul's user avatar
3 votes
3 answers
4k views

Effective way to check if an Entity/Player enters a region/trigger

I was wondering how multiplayer games detect if you enter a special region. Let's assume there is a huge map that is so big that simply checking it would become a huge performance issue. I've seen ...
OpenAI goto hell's user avatar
10 votes
3 answers
4k views

How to progress an entity-component gamestate in a turn-based game?

So far the entity component systems I've used have worked mostly like Java's artemis: All data in components Stateless independent systems (at least to the degree that they don't require input on ...
Aeris130's user avatar
  • 121
2 votes
1 answer
1k views

Collision Resolution: How to avoid Interpenetration/Tunneling Caused by Prior Collision Handling? [duplicate]

My game processes world collisions followed by entity collisions. The problem here is that entities can break through walls the next frame when world checks are run again as a result of the prior ...
user600003's user avatar
12 votes
2 answers
956 views

How to handle entity path-finding and movement in a large networked world?

Considering the image above with tiles split into 32x32 boxes, I have an entity which is marked to 'aggro' nearby players that come close to it. I'd like this monster to ideally chase the player (and ...
Vaughan Hilts's user avatar