Search found 8 matches
- Fri Jun 07, 2019 1:08 am
- Forum: Libraries and Tools
- Topic: RUBI Gamestate Stack
- Replies: 15
- Views: 15502
Re: RUBI Gamestate Stack
This way, you don't need to clobber the functions with 'if handled then return end'; you just return true when handled, and that stops propagation, which looks clean to me. I think that in most cases, you'll want the background draw() to be executed, therefore the cases where you need to check self...
- Thu Jun 06, 2019 3:10 pm
- Forum: Libraries and Tools
- Topic: RUBI Gamestate Stack
- Replies: 15
- Views: 15502
Re: RUBI Gamestate Stack
It wasn't my idea, it was in s-ol's library actually. I liked the design. You're the one who brought it to me. Anyways, I'm having a hard time deciding my approach. A messaging system sounds interesting but I don't see use for it on normal callbacks like update, draw, etc, and there's a special pro...
- Thu Jun 06, 2019 2:33 am
- Forum: Libraries and Tools
- Topic: RUBI Gamestate Stack
- Replies: 15
- Views: 15502
Re: RUBI Gamestate Stack
I've now taken a look at other similar libraries. Yours is the only one I see that has separate event handlers while running in the background, which seems interesting. However, I wonder if it wouldn't be better calling the same callbacks but letting them know whether they're on the background or n...
- Wed Jun 05, 2019 11:00 pm
- Forum: Libraries and Tools
- Topic: RUBI Gamestate Stack
- Replies: 15
- Views: 15502
Re: Lovely Scene Stack
From a state transition standpoint, I think it's mostly a DPDA. You really just have one active state, the one at the top of the stack. The fact that you invoke callbacks on the others doesn't have an influence on the structure of the state machine. I don't think it's nondeterministic. The term non...
- Wed Jun 05, 2019 6:24 pm
- Forum: Libraries and Tools
- Topic: RUBI Gamestate Stack
- Replies: 15
- Views: 15502
Re: Lovely Scene Stack
FWIW, conceptually I don't think it's a nondeterministic finite automaton, as NFAs have deterministic equivalents. I think it's a deterministic pushdown automaton. PDAs are automata with a state and a stack. I prefer to call them states (although a more accurate term could be screens), because the ...
- Mon Jun 03, 2019 5:11 pm
- Forum: Libraries and Tools
- Topic: RUBI Gamestate Stack
- Replies: 15
- Views: 15502
Re: Lovely Scene Stack
logic is uncaring; that said, future prospects are extending your lib with other functions that may be useful; that way it won't be just another generic/simple state manager on the block! :3 I've been in the game industry for many years and by far the most common way of managing game 'states' (whic...
- Fri May 31, 2019 6:55 pm
- Forum: Libraries and Tools
- Topic: RUBI Gamestate Stack
- Replies: 15
- Views: 15502
- Thu May 02, 2019 4:16 am
- Forum: Libraries and Tools
- Topic: RUBI Gamestate Stack
- Replies: 15
- Views: 15502
RUBI Gamestate Stack
A gamestate stack is a way of handling game logic. Each gamestate receives the normal Love2D callbacks (update, draw, ...) and a few special stack related callbacks. The catch is that a gamestate can block these callbacks to gamestates under it (with blockDraw, blockUpdate and blockInput), which wil...