[resolved]Processing speed in events vs scripts

Started by Sase, February 25, 2016, 05:57:54 pm

Previous topic - Next topic

Sase

February 25, 2016, 05:57:54 pm Last Edit: February 25, 2016, 06:51:35 pm by Sase
I'm making a stamina system to Blizz-ABS, and I'm wondering if the game runs smoother if I write it into a script instead of parallel process common event.
I know (in theory) how to write the syntax into a script, but I don't know if the correct classes and how to actually make it work.

Here is a skeleton of the common event I would be using, but before I finish it I would like to know the answer to this Q.

https://gyazo.com/512ffa77b7005d42dd7858140c7770b9

Zexion

I don't think events impact performance too much compared to scripting. There are just certain things that are easier via script e.g making a battle system that has tons of different variables. Events that use pictures can also be greatly improved by either removing the need for 100 pictures for a health bar (one for each percentage) or by allowing them to be manipulated (rotated, resized, etc.) In your case, it would be the same either way unless you wanted to apply it to npcs aswell.

KK20

Events are pretty much translated into Ruby code anyways. That translation process would probably slow it down in theory, but it's hardly noticeable. You're not really doing anything resource intensive anyways (basic arithmetic) that warrants converting the event to a script.

Just remember that Wait commands are doubled. If running a 40FPS game (which is the default), a Wait of 20 frames is 1 second. Of course you could just remove the * 2 if you wanted.

  #--------------------------------------------------------------------------
  # * Wait
  #--------------------------------------------------------------------------
  def command_106
    # Set wait count
    @wait_count = @parameters[0] * 2
    # Continue
    return true
  end

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Sase

Thanks, I'll just keep using the common event then.

@KK20 that's weird, didn't even know that.