Questions tagged [events]
Event is action that is usually happenes "outside" of main program thread, but handled inside of it.
284 questions
2
votes
2
answers
922
views
Is it worthwhile to use events when there’s only one subscriber?
I'm trying to determine the best architectural approach for handling communication in Unity, specifically when the interaction is strictly one-to-one.
The Core Design Conflict
I have five crucial, ...
0
votes
0
answers
45
views
how to implement event system with SDL2?
I'm writing a C++ game engine using SDL2 and I have an SDL event loop, but I'm not really sure what I want to do with these events. I know that I'll have systems that will be interested in these ...
12
votes
1
answer
1k
views
Destroying the parent when all children are destroyed
I have a spell system where a the spell is a self-contained game object handling all the logic. When done, it destroys itself. This works great
Then I added a second game object handling animation, ...
0
votes
0
answers
42
views
How to handle draw events without synchronization issues
So in my game I'm using a message queue for everything, very similar to an event manager or event queue pattern. I've seen that lots of people use them, and they decouple when the event fires and ...
1
vote
0
answers
43
views
How to Handle Intermediate State in Event-Sourced Game Architecture for Complex Command Logic
I'm building a turn-based game using an event-sourced-ish architecture. Here's the basic structure:
A dispatcher on the game engine receives commands from the client and routes them to command ...
0
votes
1
answer
160
views
How to control the order of _input_event and _input?
Suppose I have these two classes
...
0
votes
1
answer
92
views
Assigning action without creating closure
I am trying to create a system for daily events in Unity, but I am facing an obstacle where performance and memory are very sensitive for me,The DailyEvent consists of a list of DailyEventAction, ...
0
votes
1
answer
209
views
How can I connect a signal, with specific signal arguments, to an incompatible function in Godot 4 with the UI?
To clarify, I'm attempting to trigger an event on the entry of the player into an Area3D. This event is handled by an ...
0
votes
1
answer
92
views
Public method doesn't show up as a selectable option in a button's On Click event
I have the following public method in a MonoBehaviour attached to a game object in my scene:
...
1
vote
3
answers
103
views
Interaction system with asynchronous interactions
A common approach to creating an interaction system is to use an IInteractable interface. The Player checks for collisions with ...
0
votes
1
answer
106
views
Best way to code event system that has both one-to-one subscription and one-to-several subscription?
I'm trying to create an event system that can be used for all types of events that happen in my game but I'm running into this following problem.
My player HUD needs to be updated whenever an enemy ...
0
votes
1
answer
498
views
Should I remove the listener from UnityEvent similar to normal C# events?
Do I have to always remove UnityEvent listeners in OnDisable(), when I add them in OnEnable() just like I have always did with normal C# events? Does it affect the performance?
0
votes
0
answers
57
views
UI Toolkit event doesn't let me finish writing the value
I use an integer field to indicate the value of the wanted year and I set a maximum and minimum limit for it and I wanted a function to be called when the wanted year value changes to display the ...
0
votes
0
answers
52
views
How to Prevent Subsystems from Responding to Events from Other Game States
I'm writing a game from scratch in C++, using the book Game Coding Complete as a guide. The engine in the book has an event manager which is used to communicate between the game's systems, such as ...
0
votes
1
answer
294
views
Sanity Check on my Idea for an Event System for game
So, I recently started making a small game from scratch, with no engine used(I'm a beginner at this) and I want to create an event system of my own. I want to check if my general idea for it is okay(...