Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

RPG in a Box

Bring your stories and ideas to life! · By Justin Arnold

[0.3.7] Script editor slowing down

A topic by lectronice created Dec 21, 2016 Views: 107 Replies: 4
Viewing posts 1 to 5
(1 edit)

Hi!

Sometimes when editing complex scripts like the one I posted yesterday, the script editor lags quite a lot, and may take 1 or 2 seconds before updating a value I'm typing. There's a delay between when I press a key and when the character appears on screen. I'm not sure what happens, but it seems to especially occur in the most "distant" function boxes. Typing in boxes close to the start node works normally, but typing in boxes further down the tree is more likely to cause the issue. I don't remember seeing this on my recent laptop (though I didn't test the same script on it), but it's very noticeable on my 4 years old desktop. It happened before the 0.3.7 version, but I couldn't say when exactly.

Hello! I seem to recall running into this back when I made that huge script to show all of the functions at once. I'll add a "to do" to look into this. Thanks for reporting!

I may have just stumbled upon what is causing this issue. I think it is related to the fact that the entire script gets parsed again every time you make an update. So, for example, if you are typing a message in the Display Message node, each character you type triggers the parser to run. With the growth of the parser, it would be more noticeable now too, especially the longer the script gets. At least as a temporary fix I could probably have it not run the parser until the text box loses focus.

Good news :)

While we're on this topic, I've noticed two small issues when typing scripts:

  • When inserting a new function in a quick script which is not empty, you get a semicolon on one line, and the function on the line below.
  • When pasting something, you have to select one or more characters which will be replaced in the line you're aiming at, otherwise your content will be pasted on the line above.

Thanks for letting me know! I will make a note of these bugs.