- Joined
- Oct 25, 2006
- Messages
- 1,175
Hey there.
I'm working on a decent sized project and I need to step up my programmation game.
I have decent programming skills, both in map (GUI) and game (C#, Visual Scripting and C++) development. Though I'm not necessarily comfortable with advanced programming techniques out of game scopes (or techniques which are abstract or belong to the macro-level architecture, IE the engine).
I'm pretty confident in my ability to learn a new language such as LUA or vJass but I'm not familiar with their verbose or code orientation. And I would like to know your opinion on which one would be worth investing time in. I would also have a couple of other questions.
I've went through code examples of both of these languages and vJass instantly appeared more "clear" to me, I feel like I can understand more or less what functions are being fired and ultimately what gameplay events will fire off them.
LUA seems a bit more odd to parse for me, I have read that it didn't declare its variable type, that is probably one of the first thing that confuses me when I'm reading a bunch of code.
But I also read that LUA is "more powerful", though nobody cared to explain on the thread I've diggen up.
Question #1: What would be the main differences between vJass and LUA? Why would one want to learn one over the other?
I'm not looking at making complicated abilities (with independant projectiles) and I'm not looking at making RPG systems with attribute intrication.
I'm more looking towards managing large scale "risk-like" maps with strategy and macro mechanisms such as income, alliances and unit spawning, related to specific towns. I also would like to maybe make some kind of "homemade" AI for this (through LUA or vJass).
Question #2: While parsing the code of people over here, I noticed many people were using the quicker possible variable names (u, temp etc.). Both for LUA and vJass.
Is there a reason for that other than saving typing time?
Question #3: Which one of the two languages would be closer to object oriented programming?
Pseudo code of an example of what I'm looking to achieve:
Thanks in advance for any answer!
I'm working on a decent sized project and I need to step up my programmation game.
I have decent programming skills, both in map (GUI) and game (C#, Visual Scripting and C++) development. Though I'm not necessarily comfortable with advanced programming techniques out of game scopes (or techniques which are abstract or belong to the macro-level architecture, IE the engine).
I'm pretty confident in my ability to learn a new language such as LUA or vJass but I'm not familiar with their verbose or code orientation. And I would like to know your opinion on which one would be worth investing time in. I would also have a couple of other questions.
I've went through code examples of both of these languages and vJass instantly appeared more "clear" to me, I feel like I can understand more or less what functions are being fired and ultimately what gameplay events will fire off them.
LUA seems a bit more odd to parse for me, I have read that it didn't declare its variable type, that is probably one of the first thing that confuses me when I'm reading a bunch of code.
But I also read that LUA is "more powerful", though nobody cared to explain on the thread I've diggen up.
Question #1: What would be the main differences between vJass and LUA? Why would one want to learn one over the other?
I'm not looking at making complicated abilities (with independant projectiles) and I'm not looking at making RPG systems with attribute intrication.
I'm more looking towards managing large scale "risk-like" maps with strategy and macro mechanisms such as income, alliances and unit spawning, related to specific towns. I also would like to maybe make some kind of "homemade" AI for this (through LUA or vJass).
Question #2: While parsing the code of people over here, I noticed many people were using the quicker possible variable names (u, temp etc.). Both for LUA and vJass.
Is there a reason for that other than saving typing time?
Question #3: Which one of the two languages would be closer to object oriented programming?
Pseudo code of an example of what I'm looking to achieve:
Code:
MapInit()
Get all Town Hall unit types
- Store them in a Town[] array
- Assign ID
- Bind for each "when full mana" -> SpawnVillager(TownID)
//
- Bind "on unit attacked" -> Diplomacy(War, InstigatorPlayer, TargetPlayer)
SpawnVillager()
- Empty Town Mana
- Spawn Villager
-> OrderVillager()
-> CalculateTownIncome()
OrderVillager()
- check for missing workers(returns Work)
- if work = X -> SendToLumber(targetVillager)
- if work = Y -> SendToGold(targetVillager)
Diplomacy()
- if parameter = War -> DeclareWar(targetPlayer)
- if parameter = xxx -> www
GetTownIncome(townID, resource)
- getTownIncome (variable of some sort)
- add any resourceType modificators
-> Returns integer()
Thanks in advance for any answer!