RPG Maker Forums

definite_lee
definite_lee
Interesting, but what would stop a player from just changing their computer time settings like this to alter the flow of the game?
Galenmereth
Galenmereth
Nothing. It’s just an example to show a live updated Switch that runs performantly without a need for a parallel process event :)
Bonkers
Bonkers
Very impressive!
??????
??????
functionality wise - awesome. programming wise - ewww, evals...
Galenmereth
Galenmereth
Actually not evals! I wrap the commands in a new anonymous Function with the string as content, and a “use strict”; prefix, so that both error debugging and runtime safety is significantly improved
Galenmereth
Galenmereth
ie. Function(‘“use strict”; ’ + command)();

This causes any errors to show a proper stack trace
Galenmereth
Galenmereth
Technically it is still evaluating a string as code and not optimal, but at least this is scoped a bit more safely. I wish there was a better way but alas.
??????
??????
lol yea I figured it would be the wrapped functions, but its still an eval as you say :p
Don't get me wrong, I've done similar in the past myself... :D
Galenmereth
Galenmereth
MV internally does it with the "Script" event commands as well, so in that context I'd say it's OK. But yeah, generally to be avoided as much as one can. Especially if the input can in any way come from the end user (player), then it's absolutely verboten ;)
  • Like
Reactions: ??????

Latest Threads

Latest Profile Posts


It's my cute little ghost~
Minecraft Dungeons is a great example of a game that's much simpler than other games in its genre but almost as equally immersive and fun to play. Lotta RPGmaker devs could learn from that lesson.
Well, it's been a while since the last time I came here... Is there a JS scripting FAQ? I'd like to know what it's capable of achieving, and how :rswt
I love the Time Fantasy tiles, but haven't played anything made with it yet. Can anyone recommend me something?
Vote for what I show more indepth on Twitter tomorrow from the MZ default resources

Forum statistics

Threads
99,358
Messages
964,459
Members
130,970
Latest member
ArcticStorm7
Top