|
FSM
Aug 18, 2016 23:10:26 GMT
Post by superbuff on Aug 18, 2016 23:10:26 GMT
Is it possible to run a basic FSM in Sikuli/Ankulua? Or am i doomed to really long nested if statements?
|
|
|
FSM
Aug 19, 2016 0:18:29 GMT
Post by AnkuLua on Aug 19, 2016 0:18:29 GMT
|
|
|
FSM
Aug 19, 2016 6:23:08 GMT
Post by superbuff on Aug 19, 2016 6:23:08 GMT
did that before posting ofcourse, just wasnt sure if it was bound to any methods thanks
|
|
Kako
Contributors
Posts: 105
|
FSM
Aug 19, 2016 8:27:40 GMT
Post by Kako on Aug 19, 2016 8:27:40 GMT
Is it possible to run a basic FSM in Sikuli/Ankulua? Or am i doomed to really long nested if statements? Out of curiosity: What do you need it for / what are building? (trying to learn how this can be useful )
|
|
|
FSM
Aug 19, 2016 16:57:26 GMT
Post by superbuff on Aug 19, 2016 16:57:26 GMT
i've separated logic into their own lua classes and based on what occurs in a game i wont have to run a really long if statement with conditionals. I'll just move from a crafting state to say a use state. if we run out of materials i can make the program switch to a state where it consumes the potions.
FSM isnt very flexibile when it comes to AI systems but it'll let me decouple logic quite nicely and keep the code tight.
|
|
Kako
Contributors
Posts: 105
|
FSM
Aug 19, 2016 19:09:41 GMT
Post by Kako on Aug 19, 2016 19:09:41 GMT
i've separated logic into their own lua classes and based on what occurs in a game i wont have to run a really long if statement with conditionals. I'll just move from a crafting state to say a use state. if we run out of materials i can make the program switch to a state where it consumes the potions. FSM isnt very flexibile when it comes to AI systems but it'll let me decouple logic quite nicely and keep the code tight. Sounds really interesting! Would you mind showing a code example of how you implement this? Cause it still is a bit abstract to me
|
|
|
FSM
Aug 19, 2016 20:37:10 GMT
Post by superbuff on Aug 19, 2016 20:37:10 GMT
Certainly! Though i have more concrete examples in c#(i'm a game developer) Havnet dabbled in Lua too much though it resembles JS in a lot of ways. Still figuring out my dev tools for LUA. Hard to get ankulua testing setup on a mac
|
|
Kako
Contributors
Posts: 105
|
FSM
Aug 20, 2016 21:55:21 GMT
Post by Kako on Aug 20, 2016 21:55:21 GMT
Certainly! Though i have more concrete examples in c#(i'm a game developer) Havnet dabbled in Lua too much though it resembles JS in a lot of ways. Still figuring out my dev tools for LUA. Hard to get ankulua testing setup on a mac If Lua only resembled JS so much that I could do event driven a-sync stuff! That would improve my scripts significantly
|
|
|
FSM
Aug 20, 2016 22:09:36 GMT
Post by superbuff on Aug 20, 2016 22:09:36 GMT
promise based code wouldnt be a bad thing now, perhaps it resembles python more.
|
|