Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Which do you think is better and why? (Use of alias)

If you were going to write a script that modified several rgss methods, what would be better overall: to use alias and ,then, just add the new defs in the script, or instruct the user to overwrite the originals in the editor? The second case would seem to make for a slightly tighter set of code and would not require checking to see what is aliased later (you shouldn't have to jump around through code to see how a method is defined) On the other hand, if you needed to remove the script, or just wanted to test it, it would seem like the alias method would make this easy by centralizing everything; moreover, if the user chose to keep it, they could overwrite the originals if they so chose. What are your thoughts? Any substantive reasons to prefer one over the other?
 

Atoa

Member

Something i always tell people: NEVER EVER tells people to rewrite the original scripts, unless it's for personal use.

If you making scripts to submit into forums or something like that, you must consider that there's people that are totally newbie in terms of scripts, and the more plug-and-play the script is, the better.

Even if you need to rewrite an whole method, it would be better make an new section with the rewrited method.
 
I agree, the gains of not using alias are very low, just a small speed improvement, i think, and the f12 bug?, the rest, is better with it.

If you are modifying a very high rendiment script, maybe... but.

Even if you need to rewrite an whole method, it would be better make an new section with the rewrited method.

Why?
 
I tend to agree, I figure if people wanted to overwrite it they could. However, it seems bad that it obscures where the method def is; which incidentally was the problem with using goto. Im torn as it seems good for rgss, but bad in general. But I agree strongly with the plug and play aspect.
 
Yep, aliasing is definately the way to go for released scripts - not only because it makes scripts plug-and-play, but also because it clearly illustrates to people what needs to be changed and where. That way, even when two scripts change the same method and someone wants to 'hard-code' it (I'll just take over that term now :p ), they know what to do with it without much looking through, trying to figure out where to copy code from and why, always wondering if they missed something.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top