SFML community forums

Help => General => Topic started by: beedaddy on September 28, 2015, 08:33:31 am

Title: Designing a point and click adventure?
Post by: beedaddy on September 28, 2015, 08:33:31 am
Hello all,

I would appreciate any help (or perhaps a pointer to a website with some ideas?) ... I adopted so far the concepts of the (first) SFML Game Development book to a point and click adventure game. That means, a entity (animated sprite) can walk to the position of a (left) mouse click. Or speak for a specified amount of time (right click). The corresponding commands are being sent from a Screenplay-Class (who decides what to do when clicking somewhere). But now I need some mechanism so that the screenplay-class gets notified when the entity has finished speaking (so that for example another entity can then reply something). I hope it's clear what I mean? I'm not sure if this command queue concept is the right thing for my purpose. Perhaps someone has some experience with point and click games and SFML?

Or to cut a long sentence short: I'm stuck with adopting the book concepts to a point and click game. Perhaps the needs are too different. Perhaps someone has any hints or links to some interesting web site about how to design a point and click adventure with sfml?
Title: Designing a point and click adventure?
Post by: eXpl0it3r on September 28, 2015, 08:49:13 am
Why can't the entity send a "finished speaking" command?
Title: Re: Designing a point and click adventure?
Post by: beedaddy on September 28, 2015, 09:24:00 am
Why can't the entity send a "finished speaking" command?
Right now only SceneNodes process commands. My Screenplay ist just like the Player-class from the book. This is part of the problem, because right now this is a one-way road.
Title: Re: Designing a point and click adventure?
Post by: Mario on September 28, 2015, 11:58:46 am
How about having a FIFO queue for things happening, like text to be spoken or the player to walk? As long as there's something in the queue, player input is ignored. When processing these entries, they could send messages for entities to play animations (like speaking).
Title: Re: Designing a point and click adventure?
Post by: beedaddy on September 29, 2015, 10:12:57 am
Thanks for your comments. I implemented now an event mechanism, so that the Entities fire events when they are ready to speak (in my case: right clicks makes the Entity to walk to the destination, afterwards it fires the READY_TO_SPEAK event) or when they finished speaking.