How do I update text on the screen in real time?
Drawing dynamic text?
Learning JavascriptIt depends. Assuming it's in a class you made, you'll almost definitely be clearing and redrawing a bitmap with the text every frame from your update function. That said, clearing and redrawing a bitmap every frame is not a very optimal solution.
What about checking for value changes then only clear and redraw if there was a change?
It's probably the best you can do, if it's dependent on that value, yeah. The general rule is that you can make things faster at the expense of using more RAM, so if it doesn't use an absurd amount of RAM, you could draw each state and keep them in memory, displaying them when needed. This has the benefit that, at run-time, state changes would be almost instant. However, as a tradeoff to that, it takes more time to startup as you prepare each state, and you'll be using more memory to keep copies of each state around instead of remaking them as they're needed.
Original thread: https://forums.rpgmakerweb.com/threads/drawing-dynamic-text.88538/