JujuAdams/Scribble

Question about regenerator methods.

Closed this issue · 2 comments

Just want to make sure I understand the section in the manual regarding regenerator methods to avoid doing anything inefficient. Is it ok to run a regenerator method on a scribble object every frame / in the draw event so long as the values being used for it are the same?

For example if my draw event includes:
text_scrib.align(halign,valign).draw(x,y)

It's only going to create potential performance issues if I'm constantly changing the values of halign or valign, right?

Also the same section mentions that Scribble shouldn't be used for fast changing text like score, health points etc. Is this where Scribble Junior would be helpful or should I stick to GameMaker's built in text rendering for that stuff?

Thanks!

  1. Regenerator methods won't add extra cost if the values passed into them don't change.
  2. For very fast text you should use native functions, yes. Scribble Junior has a convenience function for this.

Thanks! Time to refactor some of my code 😅