Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tiles not loading #2

Open
Scubadooper opened this issue Feb 28, 2021 · 1 comment
Open

tiles not loading #2

Scubadooper opened this issue Feb 28, 2021 · 1 comment

Comments

@Scubadooper
Copy link

My daughter has typed the programme in from MagPi, having solved the syntax errors (missing colon, missing bracket, improper indenting of if and else statements, etc.) I now have the following error message:

pathTiles = [image.load('images/'+tiles[i]+'_way.png') for i in range(1,9)]
pygame.error: Couldn't open images/start_way.png

Checking the code from the magazine against the wfmag.cc code I noticed that there are several differences, such as use of "way" as opposed to "path", importing floor from the math library at the start, some constant and variable names. As the magazine uses:

pathTiles = [image.load('images/'+tiles[i]+'_path.png') for i in range(1,9)]

I have tried both, however it clearly isn't calling the right image file name. I don't know where to look for the pgzero library to see if I can find the correct file names.

Can anyone point me in the right direction?

@Scubadooper
Copy link
Author

Solved it myself.

Downloaded the zip file from here and saved them in the folder with her code, and corrected what I assume to be the "Clbuttic" mistake of referencing "_path" file names instead of "_way". In the process I'm learning myself, though it's frustrating not having the guidance to get there quickly.

The article in Wireframe (and in my case MagPi) could really do with better instructions (e.g. do to github.com/Wireframe-46... download the .zip file, save the images folder in the same folder as your code, etc.) Also there needs to be better proofreading of the printed code (clearly noone typed the programme in to test it, happy to help if you want testers) as the find/replace that changed "way" to "path" in the variables changing the image file names is problematic.

I really appreciate what you guys are doing, this type of resource is excellent for teaching kids how to code. It is low barrier of entry (there's no need for additional hardware, etc.) simple, quick, and instant reward of having the game to play. However, simple errors that mean there is no reward in playing the game mean that it can easily turn children off - it happend to me as a child, I would hate for it to happen to others (fortunately I'm there to help for my children!)

I can see that there is a lot more that can be done with these programmes as a resource, drilling down into the sub-routines, guidance on what parts of the programme do, expanding on the resources (drawing the images, etc.), going into what the code libraries do, etc. It would be great to build on them to create eductional resources.

Happy to help, talk about what could be done with them, etc. if anyone from Wireframe wants to. I think that there is a way to develop the business plan/model that could open up additional revenue to do more good! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant