Re:Why Developers Never Use State Machines (2011)
by vvanders on Monday February 26, 2018 @10:20PM
(#16470852)
Plenty of imperative domain spaces use state machines, gamedev and the like come to mind in particular.
[ Parent
| on HN ]
Re:Why Developers Never Use State Machines (2011)
by pdelbarba on Monday February 26, 2018 @11:14PM
(#16471030)
Similarly with embedded development. We use them for just about everything from communications to scheduling. I think the subtext here is that state machines are just rarely used for web/mobile...
Re:Why Developers Never Use State Machines (2011)
by vvanders on Tuesday February 27, 2018 @12:23AM
(#16471265)
Yup, I'm in the middle of writing a packet radio protocol and it's mostly just nested state machines.
Re:Why Developers Never Use State Machines (2011)
by DCoder on Monday February 26, 2018 @11:43PM
(#16471121)
One simplistic state machine in web/mobile is mouse/swipe motion handling – mousedown transitions into "in motion" state, mousemove tracks that state, mouseup transitions into "finished motion" state, runs event handlers, and transitions again into "idle" state.
Re:Why Developers Never Use State Machines (2011)
by jjjensen90 on Tuesday February 27, 2018 @12:40AM
(#16471320)
Definitely true for gamedev in my experience. I don't think I've worked in a game code base of nontrivial size without seeing some implementation of state machines.
Re:Why Developers Never Use State Machines (2011)
by PeterisP on Tuesday February 27, 2018 @06:04AM
(#16472476)
The "some implementation" probably is part of the problem - if there was a good generic implementation included in the standard library so that it could and would be used in language tutorials (especially in languages where rolling nice state machine code is tricky), then developers would use them much more.
Re:Why Developers Never Use State Machines (2011)
by vvanders on Tuesday February 27, 2018 @12:29PM
(#16475674)
The problem with that is each system has slightly different requirements. Scripting state machines vs animation state machines are going to have very different constraints and end-goals.
[edit]
For example here is UE3's anim tree[1] editor vs Kismet[2].
[1] https://docs.unrealengine.com/udk/Three/AnimTreeEditorUserGu...
[2] https://docs.unrealengine.com/udk/Three/KismetUserGuide.html