I say tomato.png you say Tomato.png
/Sometimes, way back in the past, software writers set massive traps that we still fall into today. Like when someone at Microsoft wanted to make MS-DOS seem different to Unix so they used backslash “\” for filename separators rather than forward slash “/”. Or that other time, when someone else (or maybe the same person - who knows) thought it might be a wizard wheeze to make MS-DOS not care about the case of filenames so that Fred and fred were regarded as the same file.
This piece of genius still haunts us today. For example, when you put the web pages that you tested on your PC up onto GitHub and then find that they don’t work because you’ve said “tomato.png” in the code and the file is called “Tomato.png”.
Now, we’ll gloss over the stupidity that caused the file to be called “Tomato.png” in the first place - mainly because that is my stupidity. Let’s focus on how hard it is to fix. If you rename the file on your PC (which is hard enough because you can’t just rename Tomato to tomato - you have to go Tomato->temp->tomato) GitHub doesn’t see this change in filename name as a change in your project and so it won’t push the changes into the server. I could change the filename to “Tomato.png” in the program code, but all my other files start with a lower case letter and I’m loth to be inconsistent. I do have some pride left.
In the end I’ve fixed this by changing the name of the image file to “redtomato.png” which does reflect a change and also makes the game futureproof in that if I fancy adding some blue tomatoes later I now have a naming convention I can use.
If you’re not sure why I want to have tomatoes in my game take a look here. See what kind of high score you can get. My maximum so far is 740.