Coding the hangman game on PsychoPy

Hello!
I am trying to create the hangman game on PsychoPy. Since it runs on Python, I’ve been trying to paste and edit different Python hangman codes into the coder, but none of them are running. So obviously I’m being oblivious to something here. Advice?

1 Like

What kind of error messages are you getting? Do these games come with their own display systems that you have translated into the PsychoPy visual library? Are they using libraries that are not part of the PsychoPy standalone install?

1 Like

Hello!

This demo might be helpful? hangman [PsychoPy]

You can access the files used to make that here.

Note it runs in builder with code snippets rather than straight python (which is why it works online too)

Becca

3 Likes

sorry I am level 0 in coding, but if I understand correctly then yes, using some libraries, for which I had to use the “import” command. And I did keep getting error messages about display and also the “not defined” one, even though I defined all I could think of.
I’m going to try to mimic the code in the other answer and if that fails, do something less awesome than hangman. Thank you for offering advice <3

Hi, this is fantastic, feeling very hopeful! Thank you so much for providing your work. I’m new to this (psychology student, never coded before), so I’d just like to ask you, that if I mimic your work and adjust the snippets to match my needs - should I refer to you somewhere (readme?) to avoid doing wrong by you and avoid plagiarism? Sorry if this question is weird or offensive and thank you loads.

1 Like

Thank you for asking. Here is my recommendation of how to cite PsychoPy code:

2 Likes

Hello! you couldn’t find it because I hadn’t yet loaded it to pavlovia! Of course please do use it however you wish!

Becca