473,396 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Which is better?

93 64KB
Hey again!

I've made 2 separate systems, an ECS and a Collision detection system for a game. I want an event handling system for handling the communication between components and game management systems (collision detection, ECS and so on). After a bit of prototyping and thinking I've come to two separate ways I can handle this and I'm just curious as of which of these (or possibly any other way) is better.

1. I can have the event handling system deal with entities and give the event to the entity in question. Once received the entity could distribute the event to its proper components, but I see a problem with event duplication if there is multiple components of the same type on the entity in question, plus I'd rather not have the event (or anyone else who will receive the event), know who else got this event (like a target/receiver list or something inside the event).

2. The second way is that I could reference the components them selves directly within the event handling system, but I find the approach messy in a way (because of maintenance and debugging reasons). In my view the event handling system should keep to handling the events and have minimal interaction with the entities and/or components in question which is the soul purpose of the entity.

If you have any opinions or other ideas/solutions, I'd love to hear and I appreciate any help :)
Feb 26 '20 #1
1 2100
dev7060
636 Expert 512MB
Sounds too generic theoretical description of a question to me. It may get better if the OP can provide specific details along with appropriate examples.
Feb 26 '20 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
4
by: Steven T. Hatton | last post by:
You can scroll down to the last line of this post in order to find the question I really want to discuss. I was just pondering the competing applicability of C vs. C++ in certain problem...
16
by: Robert Zurer | last post by:
Can anyone suggest the best book or part of a book on this subject. I'm looking for an in-depth treatment with examples in C# TIA Robert Zurer robert@zurer.com
43
by: Rob R. Ainscough | last post by:
I realize I'm learning web development and there is a STEEP learning curve, but so far I've had to learn: HTML XML JavaScript ASP.NET using VB.NET ..NET Framework ADO.NET SSL
16
by: Steve Peterson | last post by:
Hi I'm curious - which is the better ".NET" method to use if needing to know if an object is Nothing? 1: If IsNothing(myobject) ... or 2. If myobject Is Nothing ...
33
by: Protoman | last post by:
Which is better for general-purpose programming, C or C++? My friend says C++, but I'm not sure. Please enlighten me. Thanks!!!!!
34
by: pamela fluente | last post by:
I would like to hear your *opinion and advice* on best programming practice under .NET. Given that several time we cannot change: MyCollection.Clear into the instantiation of a NEW...
23
by: mike3 | last post by:
Hi. (posted to both newsgroups since I was not sure of which would be appropriate for this question or how specific to the given language it is. If one of them is inappropriate, just don't send...
20
by: mike3 | last post by:
Hi. (Xposted to both comp.lang.c++ and comp.programming since I've got questions related to both C++ language and general programming) I've got the following C++ code. The first routine runs in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.