I've been waiting for someone who knows what they're doing to make a randomizable AI war map. As soon as Pilchard debuts his, we'll have four(by my count) contenders ready to rumble! Unfortunately, no one has made an acceptable arena so I thought I'd take a look at it.
What would make a good AI war map? In my opinion:
1- It should be an "organic" style layout vs. a "grid" layout-if for no other reason than Grid designs are boring to watch. Of course, a grid design is a worthy challenge for AI, but organic designs I think contain greater complexity and nuance.
2- It should contain perfect symmetry in all aspects so that each AI faction is on equal ground. Annikk's Organic AI war map and collapsoul's WebWideWar map do not allow an even playing field due to their lack of perfect symmetry. In Annikk's map, you can easily replay the map by switching starting positions, but this requires fiddling with the code and requires extra time.
3- It should be easily customizable for number of AI opponents. This would require the ability to be sectorized evenly in two dimensions.
4- It should also be customizable in number of asteroids, and asteroid stats- while maintaining the perfect symmetry and complete fairness to each AI faction.
5- It should be easily transformable so that one map can be used for different configurations.
I believe it would be quite possible to fulfill all of these requirements. Collapsoul's WebWideWar map is a fantastic blueprint for how it could be done. Even without the user-interface that he created (but which I could never hope to recreate), I have a pretty good idea how to implement my basic concept.
Unfortunately, at a very, very early and preliminary proof-of-concept stage, I've encountered a show-stopping problem. Despite creating a symmetrical asteroid field, the send-distances are displaying an odd bilateral bias. In other words, the hoped-for symmetry is proving elusive.
Attached are two simple and somewhat unstable maps showing what I'm talking about. They are not in any way intended to be representative of the ultimate direction or methods I intend, but merely test-beds to see if the premise will work.
Both maps crash frequently, and may have trouble initiating due to "stack overflow". I think the overflow could be from my method used to check for overlapping asteroids. I don't know enough about Lua or programming to figure out a better method right now, but that is beside the point. The real mystery right now is why the send distances are not symmetrical.
The "preview" map was just a test to try out different variables and test out the practicality of my idea.
The other map creates the actual asteroid field, representing a four-AI battlefield. If you click on the asteroids in each sector, you will soon see that the quadrants are not all equal, despite the relative coordinates and stats of the asteroids being the same. The send-distances are screwed up. This, of course, is unacceptable. Unless I can solve this problem, further effort on this would be useless.
Does anyone understand why this occurs or know of a solution? I've noticed this same problem to one degree or another in every map I've ever made. Could the presence of the player-owned asteroid be a disrupting influence? It seems to be, but I don't know how to eliminate it. If any of you programmers are bored and want to make a proper AI war map your own way don't think I'd mind! Even if I solve this issue, it will probably take me many months to work on this.