Title says it all.
The biggest thing ZScript lacks is the ability to handle arrays. This is a huge problem in making code scalable and prevents scripters from reasonably working with large amounts of data.
My interest is in enemies that produce "bullet hell," or dozens of shots on the screen at once. I don't have enough FFCs to make each bullet and FFC, but I could use draw functions, integers, and a check for Link's location to simulate FFCs moving around. Which would be great, but without arrays I have to make perhaps hundreds of ints and then tediously copy and paste them all into one long, convuluted code.
With arrays, this would be much easier because I could stick the whole shebang into a for loop. It just steps through the integer variables determining the location of each projectile and draws them accordingly. (With structures, this would be even more slick, but I digress.)
I'm at a loss as to how to code an array. Even a simple linked list requires the ability to instantiate, which I don't think ZScript can do. So I post this thread in the hopes that some data structures folks can help out. Anyone know an algorithm for making an array out of functions available in ZScript?
For now, I'm going to simulate what I need using the only dynamic array provided in ZScript - the list of enemies on the screen indexed by the order in which they were spawned. So I get a dynamic array consisting of enemies, and I can hide data in their hit points. (For instance, enemy1->HP could be XXXYYY, where X is the projectiles' X coordinate and Y is the projectile's Y coordinate). But this has some serious limitations: (1) nothing can die or the index gets shifted; and (2) large numbers of enemies slow my scripts down to a crawl due to collision checking.
EDIT: Upon reflection, the items on screen also make up a dynamic array... but items don't have internal integers like hit points and they react unfavorably with the player.
So... any thoughts?