7

I am implementing an Entity System for my game. I am aiming for a larger procedurally generated world. The world will be filled by AI entities where "on screen" and "near screen" entities will be updated regularly, while the "far away" entities will only be updated sometimes.

My initial thought was to implement a message queue... which is filled during a loop and invoked after the loop, but before the next loop. Then I read this, in there there is an answer mentioning Blackboards(the one with 12 votes), but I haven't been able to find anything detailed on Blackboards.

The question is what exactly are they and what would I gain by using them when compared to message queue ?

My language of choice is CSharp.

Orvel
  • 173
  • 1
  • 3
  • http://en.wikipedia.org/wiki/Blackboard_system. Essentially, it's a common meeting place for exchanging information. – House Mar 25 '14 at 18:34
  • So the Blackboard is a "solution". Isn't that just a copy of the existing data ? – Orvel Mar 25 '14 at 18:47
  • Kind of. But that's what messages are too, until their processed. – House Mar 25 '14 at 18:48
  • I was thinking of a message queue as an action/func list (not sure if it's a good idea). Basically as delayed method calls with its parameters. – Orvel Mar 25 '14 at 18:51
  • That could work. Why delay it? – House Mar 25 '14 at 18:55
  • If I decided not to delay it. Wouldn't this create a bunch of problems, where deleted entities wouldn't get updated when they should? – Orvel Mar 25 '14 at 19:24
  • Input: John shoots George, George shoots Mike, Mike shoots John. Loop: George dies, George can't shoot Mike because he is dead, Mike can't shoot John because he is also dead – Orvel Mar 25 '14 at 19:26
  • They should all be dead... This was just a stupid example. – Orvel Mar 25 '14 at 19:28
  • 1
    I'm not suggesting you delete the entities. Ideally they'd be marked for death, and removed at the end of the loop (after updating). However, that's a bit off topic for this question. Does my answer below answer your question? – House Mar 25 '14 at 20:31
  • 1
    When you're ready, you can mark it as accepted. However, I'd suggest you wait at least a day, see if you can get more answers. – House Mar 25 '14 at 20:41

1 Answers1

4

Blackboard systems started in AI programming. Their context in Entity systems is less of a problem solving role, and more of a "place to exchange information" role.

The implementation of the blackboard system can very a lot. Even to the point that you wouldn't be able to tell the difference between that and a message que. It's just a known place to put information that all the entities have access to.

I wouldn't worry too much about the exact definition. Many things game development are just loose guidelines, not rules. And actually the main thing you should be getting from that other thread is to focus on the simple solution. There's no need for a complex system, when a simple one will do just fine.

House
  • 73,224
  • 17
  • 184
  • 273