Skip to main content
7 events
when toggle format what by license comment
Jun 21, 2017 at 19:09 comment added CosmicGiant TIP: Regarding this answer's Tip 2; a different (possibly better) way of doing it is to use a reference to the class-type, instead of a string name. --- You don't get the risk of messing the string with typos or during changes in refactors, because you kinda get type-safety from the compiler; while still getting the same effect of not having to instantiate states every time, or worry about containers/management (well, you do, but it's just a dictionary; same as the string/name approach). Might even save a few bytes of memory (because [class-]reference instead of string)!
Nov 2, 2016 at 23:48 comment added Tanmay Patil Great tips. Glad to see concepts from functional programming in mainstream. 1. Function Composition, 2. Memoization, 3. Higher Order Functions, 3. Monads
Mar 20, 2012 at 19:04 comment added David Gouveia @user8363 No problem! By the way, I learnt most of these tips from an article in Game Programming Gems 5 in case you'd like a reference.
Mar 20, 2012 at 18:29 comment added user8363 However this answer still leaves me in the dark how other approaches would work and I'm still undereducated in the difference between a hierarchical FSM and a stack based FSM and how to apply them to game states, I will take this as a base for my implementation. You explained it very well and it seems rather intuitive. I'm not going to accept this as answer because it doesn't exactly answer my qustion. I don't have enough reputation to vote it up though, otherwise I would. Thanks a lot this really helps me!
Mar 20, 2012 at 1:53 comment added Patrick Hughes All of this is very easy to follow if you've ever used an HP RPN calculator =) Or programmed in Forth. Nice coverage.
Mar 20, 2012 at 1:48 history edited David Gouveia CC BY-SA 3.0
added 1037 characters in body
Mar 20, 2012 at 1:41 history answered David Gouveia CC BY-SA 3.0