I am trying to share a game with my friends where they can use codes to unlock certain items, however I am worried that they will be able to discover all the codes just by looking at the source code. (I'm planning to place qr codes all over town and make them look for them.)
I know the whole point of the website is to allow everyone to share their code with each other but I am just trying to conceal specific passwords so the game cannot be cheated.
You can use a hash function like sha-3, (or an older one, it doesn't actually need to be cryptographically secure) but you would have to implement it yourself. Someone who reads the source could still bypass the check, but cannot retrieve the code.
And someone who views the project can remove the flag. That may be a good idea for this project just to make it look cleaner, but it isn't security. There is not, and should not be, any way to hide the actual code. Even in compiled languages, it is just a lack of debug symbols. If you want to, you can randomize all your block names, but it isn't compiled, so it would still be readable enough: as it should be.
you can't make it impossible for them to figure out (the computer still needs to be able to do it with your instructions) but you can make it difficult
if i understand correctly the only thing you're trying to hide is qr codes, so what i would do is make a large image with random black and white pixels, and in certain places put the contents of the qr codes in the image (remove the 4 square markers! they should be replaced with more random pixels)
after that what you can do is keep track of the locations of where the qr codes are in the project, then use the pen to cut out the relevant section and put the markers back on it
of course, if you really need to hide it you should come up with more of your own tricks too, it's not much of a secret if everyone that reads this knows how it works (it's also pretty fun to try and figure out how you can hide things well)