- Joined
- Sep 9, 2013
- Messages
- 178
- Reaction score
- 40
- First Language
- German
- Primarily Uses
- RMMV
So, I use a lot of scripts in my game, that have more than the very limited 12 script lines.
Now I wanted to know which of these two options is the better practice?
Option A:
Use a javascript shortener site, shorten the code to a single line and paste it into the script event command. And of course have a readable version in notepad++ or another program.
Option B:
Use a function inside my own plugin and call that function with a script event command.
I have some questions about option B.
1) Does it hit the performance more if the engine needs to find the function inside the plugins instead of just running a one-liner-script?
2) Will it be bad if I have about 1000 lines of different functions and constants in my plugin? Or is the engine fast enough to breeze through the functions and effectively skip all functions that are not currently called without a noticable performance loss?
3) Are functions able to utilize every commands that are also available in script commands or do some of them need parameters passed? Example: event.tileId or something like that.
Now I wanted to know which of these two options is the better practice?
Option A:
Use a javascript shortener site, shorten the code to a single line and paste it into the script event command. And of course have a readable version in notepad++ or another program.
Option B:
Use a function inside my own plugin and call that function with a script event command.
I have some questions about option B.
1) Does it hit the performance more if the engine needs to find the function inside the plugins instead of just running a one-liner-script?
2) Will it be bad if I have about 1000 lines of different functions and constants in my plugin? Or is the engine fast enough to breeze through the functions and effectively skip all functions that are not currently called without a noticable performance loss?
3) Are functions able to utilize every commands that are also available in script commands or do some of them need parameters passed? Example: event.tileId or something like that.