Hey everyone! See if you can bear with me:

The reason for all this is because, I am porting an old A* code from George's AUM all the way from A6. In the script, it uses a big array to store path information, its a big array that should be big enough to hold Max_nodes*Max_nodes. So since a Var array cannot exceed 999999 slots, the maximum amount of nodes I can have in the level is roughly 999, since 999*999 = 998,001.(in a test level, I kept the max nodes to be around 980 just because). My test AI pathers can run around this huge level perfectly fine (aside from adding local avoidance). I am a little hesitant to move to a different pathfinding code just yet, because I know this one already, and I can get it working if I keep the node count under that limit, and I am perfectly fine with that. I can just increase the range at which nodes can connect to each other, as well as be stingy within reason when placing nodes in the level. (I have downloaded Superku's pathfinding, and I will be trying that in a new project when I get to that point as well.)

But I want to see how far I can potentially go with this current pathfinding, mainly in how many nodes I can push. At one point, I was able to have 1600 nodes, and have the AI's run around correctly as well! But the problems here was that:

1. Path calculation for 1600 nodes took a long time, so I was looking into ways to save paths for each level beforehand. (I have found a way to do this using game_save with SV_info, and with array names ending with _i. Using memcpy seen in another thread, I was able to copy the saved array into the working array. But this also got me thinking about how data types are stored and read)

2. I wasnt using sys_malloc, and if I wanted to save the game, I ran out of memory!

3. The code would crash randomly at the start, and at times it would crash and give me seemingly random errors in unrelated functions, which meant memory wasnt being managed right.

So thats why Im looking to see how big an array I can get, which will let me know how many nodes I could feasibly attain. If I can correctly allocate a big array, as well as be able to find any position in it using the multidimensional maths, I could then see if I can add more nodes.

It may not be feasible to have 4000 nodes in your level for a finished commercial game, because you have GUI, graphics, animation, physics, sound, music, input, collision detection, all competing. But if Im doing foundational stuff, I would like to try to see how far I can get it now, and when I have the worst case scenario running correctly, I can worry about pulling back when it comes time to make an actual level.

Last edited by jumpman; 05/26/17 04:18.