• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

2 questions: Trigger Efficiency and JASS

Status
Not open for further replies.
Level 8
Joined
Apr 30, 2009
Messages
338
1: Is it more efficient to have few lines of complicated code, or many lines of simple code for a given effect?

2: Is there any better way to get the hang of JASS than creating GUI triggers with temporary global variables, that you convert to custom text and insert locals? I'm pretty much learning functions based on this.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
1: Is it more efficient to have few lines of complicated code, or many lines of simple code for a given effect?

What you are asking makes no sense. In the end it comes down to how much the computer has to exeecute. More complicated natives are less efficent than simpler ones. Eg dealing damage to a unit via triggers is more demanding than creating a location object. A good rule of thumb to follow though is to use as few native calls as possiable to achieve a certain effect and avoid looping too much code.

2: Is there any better way to get the hang of JASS than creating GUI triggers with temporary global variables, that you convert to custom text and insert locals? I'm pretty much learning functions based on this.
You can easilly learn JASS by looking at other peoples work if that is what you mean. However if you really want to learn it easilly, I advise learning 2-3 real programming languages like C++, java or python.
 
Status
Not open for further replies.
Top