Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Designing a point and click adventure?  (Read 2463 times)

0 Members and 1 Guest are viewing this topic.

beedaddy

  • Newbie
  • *
  • Posts: 3
    • View Profile
Designing a point and click adventure?
« 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?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Designing a point and click adventure?
« Reply #1 on: September 28, 2015, 08:49:13 am »
Why can't the entity send a "finished speaking" command?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

beedaddy

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Designing a point and click adventure?
« Reply #2 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.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Designing a point and click adventure?
« Reply #3 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).

beedaddy

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Designing a point and click adventure?
« Reply #4 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.