Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


I don't understand how to implement event system different from event receiver version


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 Broadleaf   Members   -  Reputation: 154

Like
0Likes
Like

Posted 15 December 2012 - 03:58 AM

Hi, i'm new here, and to programming too.
I hope someone could give me dangling pointer.

I've seen implementations of event system of two types:
based on event receiver, and based on event/subscriber method.

Althrough i clearly see the benefits from the last, i can't create complete
understanding of it.

Wait,wait, i must begin from different angle.
I must say why i don't like the idea of centralized receiver, where every change must be recompiled.

So i begin (if you're already bored, that's right, i'm quite boring person(and messed up in the head), please sorry for that).
I'm fan of dwarf fortress for a long time. But our relations are very unstable though. Doesn't matter.
Dwarf fortress imprinted in my mind the concept of tokens. If you're not familiar with it, ill describe:
figure a text file containing roughly the next:

[human]
[head]
[left hand]
[right hand]
and so on..
[giant]
[tough]
[slow]
[low intelligence]
etc

now imagine you change this file

[mutant_human]
[head]
[head]
[blind]
[3 legs(just shorter)]
etc

The thing is, this (most of the times) will work in game. You really can add or reduce amount of different tokens,
and game will eat this and produce some great amounts of death fun.

Impressed with such flexible system i decided to use something very similiar, firstly because of independence.
And as every noob genius, i ran into the wall of misunderstanding of concepts.
As topic says - i don't understand how to implement event system different from event receiver version.

I don't understand, for example, can i minimize the use of mediums in messages?
Can i directly send a message to another object, without making it heavy class?
Can such system be implemented using absract class derivation?

I know, that this is too much questions, but it's really a matter of one string to point me.
I know there are many others who run in same kind of problem, and they can help just by saying
something smart beyond reason.

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS