playMaker

Author Topic: FSM Compounds  (Read 2421 times)

Flying Robot

  • Sr. Member
  • ****
  • Posts: 293
  • Od ton yebo redro
    • View Profile
    • Flying Robot Studios
FSM Compounds
« on: May 09, 2013, 05:37:00 AM »
It's really hard to manage complex FSMs. It'd be great if states could be selected and grouped together into a compound. A box which upon double clicking can go inside and edit the states and then come out again. These compounds can have mutiple ins and outs.

It'd be very helpful in managing complex FSMs.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2487
  • Yup.
    • View Profile
    • Cleverous
Re: FSM Compounds
« Reply #1 on: May 09, 2013, 05:53:19 AM »
Something like this was mentioned not too long ago, I still think it would be useful to have.

It wouldn't need to have any effect on the wiring, just be able to collapse a group of states into a compound or whatever you want to call it so that it isn't cluttering up the view. It could just look like a big fat state with the same left/right wire input/output when it is collapsed.

Flying Robot

  • Sr. Member
  • ****
  • Posts: 293
  • Od ton yebo redro
    • View Profile
    • Flying Robot Studios
Re: FSM Compounds
« Reply #2 on: May 09, 2013, 06:40:35 AM »
Yes, this is implemented in Softimage ICE. Extremely helpful in arranging/managing the graphs. Also, these compounds can be exported and imported.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3278
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: FSM Compounds
« Reply #3 on: May 09, 2013, 01:58:10 PM »
I like this idea. The tricky part is the multiple inputs when collapsed, since there isn't an existing precedent for that in the editor already. Would the inputs be labeled with the state they go to? Would the collapsed box show transition events, or just arrows out of the contained states?

Does anyone feel like mocking up a picture of how they see this working? :)

Flying Robot

  • Sr. Member
  • ****
  • Posts: 293
  • Od ton yebo redro
    • View Profile
    • Flying Robot Studios
Re: FSM Compounds
« Reply #4 on: May 09, 2013, 08:24:03 PM »
I just mocked up something. State Compounds need to have multiple inputs and multiple outputs. The input matching the states they are fed into and output matching the transitions they are coming from.

What do you think?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2487
  • Yup.
    • View Profile
    • Cleverous
Re: FSM Compounds
« Reply #5 on: May 09, 2013, 08:35:12 PM »
I'd be happy if it just started as a single block and everything tied in at the same point for now. That would give us something to experiment with.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3278
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: FSM Compounds
« Reply #6 on: May 09, 2013, 11:21:05 PM »
I just mocked up something. State Compounds need to have multiple inputs and multiple outputs. The input matching the states they are fed into and output matching the transitions they are coming from.

What do you think?

I find it a little confusing...

What if it just showed the states with input and output links? No transition events. So at runtime you'd still see the active state highlighted in the stack of states.

To see the transition events you have to open the compound.

The other thing I'm not sure about with this kind of grouping:

Don't you have to leave space in the graph for the expanded compound? So do you end up with widely spaced compound nodes? How does it work in ICE?

Thanks for the mockup! :)

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3278
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: FSM Compounds
« Reply #7 on: May 09, 2013, 11:22:32 PM »
I'd be happy if it just started as a single block and everything tied in at the same point for now. That would give us something to experiment with.

This might be a good baby step, just to see how it feels. But I have the same question as above about the layout...

Flying Robot

  • Sr. Member
  • ****
  • Posts: 293
  • Od ton yebo redro
    • View Profile
    • Flying Robot Studios
Re: FSM Compounds
« Reply #8 on: May 10, 2013, 06:01:05 AM »
Quote
I find it a little confusing...

What if it just showed the states with input and output links? No transition events. So at runtime you'd still see the active state highlighted in the stack of states.

To see the transition events you have to open the compound.

The other thing I'm not sure about with this kind of grouping:

Don't you have to leave space in the graph for the expanded compound? So do you end up with widely spaced compound nodes? How does it work in ICE?

Thanks for the mockup!

I don't think you have to see every states and transitions on the compound. That way it'll become very difficult, specially if inside the compound complex branching is going on.

Inputs and Outputs should be the way forward. Inputs can optionally reflect the name of the states it's going into and outputs can optionally relfect the events/transitions it's getting out from.

You can go into the compound, make edits and come back out.

To explode a compound in ICE, we have to make space. I'll try to illustrate with some screenshots.

Sjones

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: FSM Compounds
« Reply #9 on: May 12, 2013, 12:40:38 PM »
I think that Lane has a good idea for now, baby step and just have stuff collapsed, I was going to also suggest this however I had couldnt think of a good way to demonstrate the multiple in's & out's cleanly and efficiently