The gameplay loop is what unites all games and game engines, although it may be veiled within the engine, replaced by abstractions or handler functions (callbacks). (Part 1.1)
Incidentally, in my view, it reproduces the common belief that a game has to be structured as a main loop that might be hidden to the programmer in which case s/he has to associate actions(handler functions) to events. This example attempts to prove that it's not always the case.
Here, for example, is how the showMessage function would work:
$MessageLabel is a field defined by the programmer in Godot.
The showIn(p_message, p_place) function shows the message p_message in the field p_place.
waitSeconds(2) waits 2 seconds.
When the 2 seconds are elapsed, the second branch waitSeconds(2) is finished and so the parallel block is exited (because of exitWith branch 2) and the other branch (the first one) is definitely interrupted (because my parallel exitWith branch N does so).
The interruption of the first branch showIn(p_message, $MessageLabel) makes the $MessageLabel invisible.
A native representation of HTML tags is a good idea: I'll have to do that.
For ...---, I wanted a big split symbol between branches (||========) and a small split symbol between the two steps inside a branch (...---). ... because the branch continues and --- to mark a smaller split than ==========.
I like this overview.
Incidentally, in my view, it reproduces the common belief that a game has to be structured as a main loop that might be hidden to the programmer in which case s/he has to associate actions(handler functions) to events. This example attempts to prove that it's not always the case.
Thank you for your kind wish! 🙂
Thanks 🙂
Here, for example, is how the
showMessagefunction would work:$MessageLabelis a field defined by the programmer in Godot.showIn(p_message, p_place)function shows the messagep_messagein the fieldp_place.waitSeconds(2)is finished and so theparallelblock is exited (because ofexitWith branch 2) and the other branch (the first one) is definitely interrupted (because myparallel exitWith branch Ndoes so).showIn(p_message, $MessageLabel)makes the$MessageLabelinvisible.Yes, it's very different from what is done in G'MIC. Here, the language is preferably adapted to user interactions. There aren't many in G'MIC. 🙂
Yes, that's why I hope others will be able to join me. In the meantime, you can try FuncSug in the Playground. 🙂
Thank you, Kissaki, for the crossposting :)
Thank you for your very useful feedback :)
A native representation of HTML tags is a good idea: I'll have to do that.
For
...---, I wanted a big split symbol between branches (||========) and a small split symbol between the two steps inside a branch (...---)....because the branch continues and---to mark a smaller split than==========.I intend to add a syntaxic sugar for:
that would be:
Thank you very much for your feedback. 🙂