[plugin] rex_gfsm, [behavior] rex_fsm

Post your completed addons to share with the community

Post » Wed May 07, 2014 2:39 am

plugin: rex_gfsm
behavior: rex_fsm

This plugin could help user describe finite state machine.

User might see my fsm plugin at bejeweled demo before. Now there are document of these plugin/behavior.


Behavior trees for AI: How they work
The blocks could map to "condition: on transfer logic". And the connections to the next blocks is "action: set next state".
Last edited by rexrainbow on Thu Dec 01, 2016 6:07 am, edited 2 times in total.
B
108
S
26
G
267
Posts: 4,456
Reputation: 149,747

Post » Fri Aug 08, 2014 1:58 pm

@rexrainbow : it's really great! It makes the process of creating an FSM-based AI much simpler in C2. Thanks much! Gotta get a better hang of FSMs, but I guess I'll use it in an upcoming AI tutorial :)
B
77
S
22
G
4
Posts: 311
Reputation: 12,714

Post » Thu Sep 11, 2014 8:53 pm

Thanks @rexrainbow for the plugin.
B
157
S
27
G
17
Posts: 910
Reputation: 32,588

Post » Mon May 18, 2015 8:18 pm

Its great! just need to learn it completely. How would i transfer a state from one FSM to another?
B
37
S
9
G
8
Posts: 541
Reputation: 8,554

Post » Mon May 18, 2015 11:58 pm

@xanxion

Call "Action:Request" to trigger current transition logic "Condition:On transfer logic". In this condition, call "Action:Set next state" to change to next state.

Action:Request -> Condition:On transfer logic
Condition:On transfer logic: Action:Set next state



Or call "Action:Go to state" to change state directly without trigger the transition logic.
B
108
S
26
G
267
Posts: 4,456
Reputation: 149,747

Post » Tue Jul 21, 2015 9:00 pm

Hi @rexrainbow -- just wondering, what are the primary benefits of this vs. having an instanced variable on the sprite that control what it does? I'm thinking about this in terms of enemy AI.

Sprite.statevariable = 0 then do X
Sprite.statevariable = 1 then do Y
etc.

Does this result in better performance? Something else?
B
5
S
1
Posts: 20
Reputation: 415

Post » Wed Jul 22, 2015 5:09 am

@HelmetPIg

These plugin/behavior all could be implemented in events. Using plugin might have a few performance improvement. (But this improvement could be ignored imo)

The primary benefit is to describe fsm in event sheet more clearly, which separate logic transfer and entry actions.
B
108
S
26
G
267
Posts: 4,456
Reputation: 149,747

Post » Thu Jul 23, 2015 9:40 am

Thank you rexrainbow!
B
5
S
1
Posts: 20
Reputation: 415

Post » Sat Oct 08, 2016 6:12 pm

Hi @rexrainbow, I know this is an older plugin, but can I ask a question on this please? I'm not sure I see the difference between Go to State and Set Next State. For example, I can't see the difference between these 2 scenarios:

Action: FSM Request
Condition: On FSM Transfer Logic -> Action: Set Next State to "Move"


Action: FSM Request
Condition: On FSM Transfer Logic -> Action: Go to State "Move"


Does the 'Set Next State' actually do anything differently?
B
15
S
5
Posts: 141
Reputation: 1,657

Post » Sun Oct 09, 2016 12:43 am

@SecondDimension

"Action:Go to State" will change state immediately.
"Action: Go to State" is used under "Condition: On FSM Transfer Logic".


The state changing starts from "Action:Request" or "Action:Go to State", the different is
- The next state comes from the input parameter of "Action:Go to State".
- The next state comes from the "Condition: On FSM Transfer Logic" -> "Action: Set Next State"
B
108
S
26
G
267
Posts: 4,456
Reputation: 149,747

Next

Return to Completed Addons

Who is online

Users browsing this forum: Krakcz and 0 guests