I noticed the CreateSharedMemArea function on the callback class...
how does it work? Can i store different data types in that area? anyone tried using it?
Because so far it seems pretty pointless since AIs can easily share variables (and probably arrays and pointers, havent tested that but im pretty confident it works), which works for speeding up things like loading/saving data (only 1 AI does it, checks flag) and sharing enemy and allied information.
If all that can already be done, without juggling about data in a limited, confusing thing why does that function exist?
Shared AI memory
Moderators: hoijui, Moderators
yeah so they are like world peace, a great idea but it just aint gonna happen
glad i havent missed anything important in my plans yet!
but sometimes shared vars is plain annoying! I had 2 KAIs allied and one kept building cons and the other kept building attack units since they shared the units and this coincidence happened. Its all fun and games having one KAI doing the economy and the other attack/defence until after the fifth minute where the military AI has such a small base it gets crushed and then its 1v2

glad i havent missed anything important in my plans yet!
but sometimes shared vars is plain annoying! I had 2 KAIs allied and one kept building cons and the other kept building attack units since they shared the units and this coincidence happened. Its all fun and games having one KAI doing the economy and the other attack/defence until after the fifth minute where the military AI has such a small base it gets crushed and then its 1v2
You can use it to share any kind of data. If you have an array of some sort, it is pretty easy to put that array into shared memory. Like AF said, I used it for the mex positions. You could also use to have common attack teams, understanding about metal patches, reservations of prime real estate, or anything else.
We really should have a thread for discussing how the different AI's could have a common communication interface.
We really should have a thread for discussing how the different AI's could have a common communication interface.