Below is a code example that was causing problems. The loop processed sectorsM and sectorsS, but when the it came to sectors, it crashed on the != operator in the inner loop:
vector sectors;
vector sectorsS;
vector sectorsM;
vector* actSectorSet;
for (int i=0; i<3; i++) {
switch(i) {
case 0: actSectorSet = §orsM break;
case 1: actSectorSet = §orsS break;
case 2: actSectorSet = §ors break;
}
for (vector::iterator iter = actSectorSet->begin(); iter!=actSectorSet->end(); iter++) {
...
}
}
In the end I added one more vector to be used instead of the malfunctioning one and it magically worked. Really a strange bug.
While fighting with both MSBuild.exe and STL vectors not really much has been done. But at least the sectors were optimized. If you looked on the video in previous log, you could notice that there were only sectors with same size, creating thus a regular grid. This was naturally resulting in browsing through many (several hundreds) tiny sectors, reducing the speed significantly. So sectors of 6 different scales has been brought in, reducing the total amount of sectors to be drawn at one moment to 117 in full 3D generating.
I was thinking about bringing another video or a picture, but instead of putting another technical render with grey lines around sectors and placeholding blobs for stars I'll wait till the next entry, when I want come up with planets for the already generated stars. That will be finally something more interesting to watch at.
Have a nice week and see you with the next dev log.
Petr Marek