There are 2 issues that need to be addressed, now that the demo was released.
1) I found that not all script files opened are always closed. I'm not completely sure about this, but I made a search for the Open and Close methods of the scripting engine, and I', not sure there were all the matching pairs that should be.
2) When debugging battle mode, and specifically the function Battle->AddEnemy(id), I found that the script file is opened to load the information of id enemy. However it is opened and read several times. I don't remember the reason exactly, but I think it was because the loading of the information was done in the constructor of some object. Since there are involved several temporal objects, the file is opened several times. Maybe there is need to redesign some things in there, such as use pointers for storing references, instead of objects, and manage them dynamically.
For discussion of the code running behind the game
1 post • Page 1 of 1