I'm writing my first rpg and I read that it is much better to load maps rather than including them in the compilation because it reduces the .exe size, which makes sense. I'm not to sure how to do that. Here is an example of what my maps look like:
That is saved as a seperate file and is included during the compilation. I was wondering how I could get the map to load when the user enters that area rather than it already being in the .exe.Code:if (map ==1){ vector<string> trail1(8); trail1[0] = " ________ ____ "; trail1[1] = "| / / |"; trail1[2] = "| / / |"; trail1[3] = "| | | |"; trail1[4] = "| | | |"; trail1[5] = "| | | |"; trail1[6] = "| | | |"; trail1[7] = "|_____| |_____|"; trail1[y].replace(x, 1, "X"); for (int index = 0; index <8; ++index) { cout << trail1[index] << endl; } }



LinkBack URL
About LinkBacks


