-
Describe your reason for requesting this feature. What problems are you running into?
-
I've been developing several game prototypes and have found a significant number of, for lack of a better term, "gotchas" when learning PulpScript. I'll list some examples below, but in general I feel like the PulpScript documentation is lacking some rather important details when it comes to:
- how to use & combine functions properly
- how order of events impact what is possible
-
-
How would this request improve your experience with using Pulp?
- Besides devlogs that may or may not get read, I find it a bit frustrating to know that other developers will have to do the same experimentation to get the same knowledge.
- Perhaps if wiki-ifying the Pulpscript page isn't feasible a pinned thread might work?
-
Include any other details you have relating to this request.
-
Here are some specific examples I've run into.
- The concept of a "submenu" is mentioned several places but no examples of how to implement it (could theoretically be any combination of nesting
menu
&option
) -
label
isn't permanent -
frame
and other functions like it have to be used withtell
(unless scripting on an individual tile) - You can
embed
theplayer
tile inmenu
orsay
but you don't get transparency with it - If you want to prevent
menu
closure on select by calling the samemenu
indismiss
you're actually drawing another menu on top of the last with no closure of the first - If you put code after
menu
it'll execute before the menu is closed -
goto
isn't immediate, so if you want togoto
a room and then change how it looks with a function likeswap
that's not possible in one transaction (would have to putswap
in anenter
event) - String concatenation isn't supported with
+=
but is possible with assignment & string interpolation (e.g.var1 = "{var1}{var2}"
) - You can do comparisons between strings and numbers with string interpolation
string=="{int}"
- It's unclear whether race conditions can exist with the existence of
emit
as well asdraw
happening all the time vs.events handling input - It isn't explicitly stated that Booleans aren't supported types
- It says
invalid
is called when the player "selects an empty option," butoption "" then end
is not considered valid input so it's unclear what "empty option" could mean
- The concept of a "submenu" is mentioned several places but no examples of how to implement it (could theoretically be any combination of nesting
-
Troubleshooting an issue for me often involves lots of logging and trying to internalize the order of events. It would be great if there was an explicit list from start to end instead of hints of the order throughout the docs.
-
Note: Sorry if there's a lot of edits! I accidentally hit enter and published this early.