Messenger

My implementation of messenger pattern without GCAllocation and performance of 1.7 ms for 100 senders and 10 000 listeners (by Wokarol)

Messenger Alternatives

Similar projects and alternatives to Messenger

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better Messenger alternative or higher similarity.

Messenger reviews and mentions

Posts with mentions or reviews of Messenger. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-12-27.
  • Combat Effect System in C#
    2 projects | /r/gamedev | 27 Dec 2021
    I haven't fully read through everything, but if you want to avoid hard references to objects and still be able to communicate, you can use messaging. Now, I wouldn't recommend Unity's SendMessage as it's pretty slow and also not type safe (you just pass a string as parameter), but you can find libraries that handle it in a more safe and efficient way. I really like this one, which combines the mediator and the observer pattern. Every object that either wants to send or receive messages just needs a reference to the same messenger object. The library offers a global static instance that you can use like you use singletons, but you can also create instances for more local scopes. I wrote more about it here in this comment:
  • Designing systems in Unity
    1 project | /r/gamedev | 12 Dec 2021
    - Do you want to completely decouple systems from each other, but still want to be able to communicate between them? You can use a messenger system (for example a combination of mediator pattern and observer pattern. I can highly recommend this library - it has one global static object that is accessed for sending messages and subscribing to message types. You can also create additional instances to have separated message domains. Then every object that either wants to send or receive messages just needs a reference to the messenger object).
  • Is using Singleton to update game stats like score counts and total killed enemies a good thing ? or is there a better alternative ?
    2 projects | /r/gamedev | 15 Sep 2021
    There is the option to implement a messaging system. I personally use: https://github.com/Wokarol/Messenger
  • Design patterns/best practices for large menu systems?
    1 project | /r/Unity3D | 29 Mar 2021
    You could try it with a messaging system where the sender doesn't have to know about the recipient and vice versa. This keeps things pretty flexible in case you want to exchange the logic later. One possible library that I use for it is https://github.com/Wokarol/Messenger which combines the observer pattern with the mediator pattern, so you have one static Messenger instance that is the point of communication between senders and recipients, without any kind of coupling between the two.
  • How Should I Start A Simple Multiplayer Online
    1 project | /r/gamedev | 7 Feb 2021
    People will usually say to avoid dependencies, but there has to be a place to manage global game state in a card game, like who's turn it is, which turn phase they are in (draw phase etc.). I think a manager script is right for that. If you are concerned about hard dependencies, you could use events and messages for communication instead. You could also use one central manager for the communication via messages so that no object needs to have a hard reference to any other object, for example by using this library that combines observer and mediator pattern: https://github.com/Wokarol/Messenger
  • How to handle managers using SOLID Principals?
    1 project | /r/Unity3D | 29 Dec 2020
    Instead of using a manager, you could use a combination of observer pattern + mediator pattern as in this very handy messenger class from this repository that I can highly recommend: https://github.com/Wokarol/Messenger
  • A note from our sponsor - SaaSHub
    www.saashub.com | 1 May 2024
    SaaSHub helps you find the best software and product alternatives Learn more →

Stats

Basic Messenger repo stats
6
6
0.0
almost 5 years ago

The primary programming language of Messenger is C#.


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com