cephalo
Deity
Ugh. Everytime I have to learn a new language, there's always something that's completely unlike every other language for no good reason at all. With Python it was the god awful significant whitespace, and for lua it's this. Why????? Actually you can start an array at zero, but then you cannot use functions like print or sort on your array because they all assume one. Good luck with that.
Let me tell you how this is going to affect me. I'm about to start a new map script, and because Civ maps tend to wrap in the X direction, lots of stuff that you do involves modulus arithmetic. So if you have a map that is 100x100 tiles and you are on the eastern map edge wanting to continue east and wrap around, you simply add 1 and then say (X = X % width) and it resolves itself. The result will always be a valid X coordinate between 0 and 99. Starting your indices at 1 however totally messes that up. I don't know how I'm going to get my brain around this!
This nightmare is going to recur endlessly for any map scripter, because you constantly have to work with Euclidean coordinates where the origin is at 0,0 and NEEDS to be at 0,0 to make mathematical sense. What a stupid way to ruin an otherwise fine scripting language! Who does this help? I feel sorry for anyone who learns lua as their first programming language because you're never going to be able to model any real mathematical concept, and you will go to your next programming language with the worst sort of habit ever!
Ugh. Storing a 2D map with the origin at 1,1 is something I'm going to have to learn how to do, and ALL the math is going to have to be done differently somehow. I do not look forward to this.
Let me tell you how this is going to affect me. I'm about to start a new map script, and because Civ maps tend to wrap in the X direction, lots of stuff that you do involves modulus arithmetic. So if you have a map that is 100x100 tiles and you are on the eastern map edge wanting to continue east and wrap around, you simply add 1 and then say (X = X % width) and it resolves itself. The result will always be a valid X coordinate between 0 and 99. Starting your indices at 1 however totally messes that up. I don't know how I'm going to get my brain around this!
This nightmare is going to recur endlessly for any map scripter, because you constantly have to work with Euclidean coordinates where the origin is at 0,0 and NEEDS to be at 0,0 to make mathematical sense. What a stupid way to ruin an otherwise fine scripting language! Who does this help? I feel sorry for anyone who learns lua as their first programming language because you're never going to be able to model any real mathematical concept, and you will go to your next programming language with the worst sort of habit ever!
Ugh. Storing a 2D map with the origin at 1,1 is something I'm going to have to learn how to do, and ALL the math is going to have to be done differently somehow. I do not look forward to this.