Chess board not working
my chess board looks like this for some reason and i dont think its suppose to be like that
I m think game cant load files (piece images, fonts, etc)
That looks like a font issue. If I'm not wrong, the chess pieces are text too and they're getting hidden because the font doesn't work for you for some reason.
That looks like a font issue. If I'm not wrong, the chess pieces are text too and they're getting hidden because the font doesn't work for you for some reason.
I m try to delete font files (they inside resource folder) and get same font, but my pieces didn't disappear. Still the problem is reading the file.
Try check YOURE_REPOS_FOLDER\Chess-Challenge\Chess-Challenge\bin\Debug\net6.0\resources and tell me what's in it
Ok turns out I was wrong the chess pieces are all in a png. But yeah as creastive said it looks like there's something wrong with the resources.
after net6.0 there is no resources
Try check
YOURE_REPOS_FOLDER\Chess-Challenge\Chess-Challenge\bin\Debug\net6.0\resourcesand tell me what's in it
after net6.0 there is no resources
Try check
YOURE_REPOS_FOLDER\Chess-Challenge\Chess-Challenge\bin\Debug\net6.0\resourcesand tell me what's in it
Open VS and find OPENSANS-SEMIBOLD.ttf, sdf.fs, Fens.txt and Pieces.png in solution explorer
then for each file look down, set "Build action" to "Embedded resource" and set "copy" to "always copy", then try run again
i found the files but how do i do what u said?
after net6.0 there is no resources
Try check
YOURE_REPOS_FOLDER\Chess-Challenge\Chess-Challenge\bin\Debug\net6.0\resourcesand tell me what's in itOpen VS and find
OPENSANS-SEMIBOLD.ttf,sdf.fs,Fens.txtandPieces.pngin solution explorer then for each file look down, set "Build action" to "Embedded resource" and set "copy" to "always copy", then try run again
textures and fonts still do not work after setting params you mentioned
Then just copy them manually
copy folder repos\Chess-Challenge\Chess-Challenge\resources to repos\Chess-Challenge\Chess-Challenge\bin\Debug\net6.0\resources
Still does not work. Ive tried to reinstall project too
tried it didnt work
strange... Do you have Chess-Challenge\Chess-Challenge\bin\Debug\net6.0\resources\Pieces.png file?
yes
launch \Chess-Challenge\Chess-Challenge\bin\Debug\net6.0\Chess-Challenge.exe
I have a theory that VS simply doesn't have enough permissions to copy the files and read them after the program starts.
your theory is wrong. I have solved it but idk what was the problem:
- Path is too long
- Path includes non english letters
After moving main dir to root folder it loads correctly
After moving main dir to root folder it loads correctly
What exactly do you mean by that? I'm having this same issue and nothing i do seems to do anything
Check the entire path to the project, and in the project, if there are bad characters in the paths it could cause the resources, fonts, sprites, ect... not to load properly
Thanks! Turns out one accent in the name of a folder was killing visual studio