Coder Social home page Coder Social logo

Chess board not working about chess-challenge HOT 20 OPEN

seblague avatar seblague commented on June 10, 2024
Chess board not working

from chess-challenge.

Comments (20)

WithoutNameIdeas avatar WithoutNameIdeas commented on June 10, 2024 2

Thanks! Turns out one accent in the name of a folder was killing visual studio

from chess-challenge.

CREAsTIVE avatar CREAsTIVE commented on June 10, 2024

I m think game cant load files (piece images, fonts, etc)

from chess-challenge.

just-a-hriday avatar just-a-hriday commented on June 10, 2024

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.

from chess-challenge.

CREAsTIVE avatar CREAsTIVE commented on June 10, 2024

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.

from chess-challenge.

CREAsTIVE avatar CREAsTIVE commented on June 10, 2024

Try check YOURE_REPOS_FOLDER\Chess-Challenge\Chess-Challenge\bin\Debug\net6.0\resources and tell me what's in it

from chess-challenge.

just-a-hriday avatar just-a-hriday commented on June 10, 2024

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.

from chess-challenge.

Idk141414 avatar Idk141414 commented on June 10, 2024

after net6.0 there is no resources

Try check YOURE_REPOS_FOLDER\Chess-Challenge\Chess-Challenge\bin\Debug\net6.0\resources and tell me what's in it

from chess-challenge.

CREAsTIVE avatar CREAsTIVE commented on June 10, 2024

after net6.0 there is no resources

Try check YOURE_REPOS_FOLDER\Chess-Challenge\Chess-Challenge\bin\Debug\net6.0\resources and 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

from chess-challenge.

Idk141414 avatar Idk141414 commented on June 10, 2024

i found the files but how do i do what u said?

from chess-challenge.

manfromfms avatar manfromfms commented on June 10, 2024

after net6.0 there is no resources

Try check YOURE_REPOS_FOLDER\Chess-Challenge\Chess-Challenge\bin\Debug\net6.0\resources and 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

textures and fonts still do not work after setting params you mentioned

from chess-challenge.

CREAsTIVE avatar CREAsTIVE commented on June 10, 2024

Then just copy them manually
copy folder repos\Chess-Challenge\Chess-Challenge\resources to repos\Chess-Challenge\Chess-Challenge\bin\Debug\net6.0\resources

from chess-challenge.

manfromfms avatar manfromfms commented on June 10, 2024

Still does not work. Ive tried to reinstall project too

from chess-challenge.

Idk141414 avatar Idk141414 commented on June 10, 2024

tried it didnt work

from chess-challenge.

CREAsTIVE avatar CREAsTIVE commented on June 10, 2024

strange... Do you have Chess-Challenge\Chess-Challenge\bin\Debug\net6.0\resources\Pieces.png file?

from chess-challenge.

Idk141414 avatar Idk141414 commented on June 10, 2024

yes

from chess-challenge.

CREAsTIVE avatar CREAsTIVE commented on June 10, 2024

launch \Chess-Challenge\Chess-Challenge\bin\Debug\net6.0\Chess-Challenge.exe

from chess-challenge.

CREAsTIVE avatar CREAsTIVE commented on June 10, 2024

I have a theory that VS simply doesn't have enough permissions to copy the files and read them after the program starts.

from chess-challenge.

manfromfms avatar manfromfms commented on June 10, 2024

your theory is wrong. I have solved it but idk what was the problem:

  1. Path is too long
  2. Path includes non english letters

After moving main dir to root folder it loads correctly

from chess-challenge.

WithoutNameIdeas avatar WithoutNameIdeas commented on June 10, 2024

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

from chess-challenge.

CaptainDeathead avatar CaptainDeathead commented on June 10, 2024

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

from chess-challenge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.