LA: To program on Twine.
LO1: Be able to add programming elements on Twine.
LO2: Develop our programming skills.
Intent: Learn programing fundamentals and be able to prototype our stories.
Implementation: Twine
Impact: Learning the programming fundamentals.
Soft skills: Communication, Navigation.
Industry: Game programmer, software designer, game testing.
English & Math: Programming, decibel math, SPAG
Starting another option
For Twine you can make detailed stories with player options. To create options all you need to do is put the option in [[here]].Â
Adding an image
To make our stories more interesting you need to add in some images. For this you can add this line of code:
<img src="">
In the speech marks you need to copy the image link address to an image online, for example:
<img src="https://www.suffolk.ac.uk/app/uploads/2022/06/ExceptionalStudentExperience.jpeg">
This is what it looks like when you test it.
Adding your own an image
If you are wanting to create your own art or use your own pictures there are a couple more steps to take into consideration. First off you need to put the images onto an itch.io page through add screenshots.
<img src="https://img.itch.zone/aW1hZ2UvMzg4ODk1OC8yMzIwMjU5MS5qcGc=/347x500/0W8ILF.jpg">
Make sure you page is published and you if your screenshots are not visible you are going onto 'edit theme' and changing the 'screenshots' option from 'Auto' to 'Sidebar'.
The key puzzle
To make a key puzzle for our game we need to do a bit of coding with a bool. Bools are yes or no and in this case that is:
(set: $hasKey to true) = you have the key!
(set: $hasKey to false) = you don't have the key!
When we use this logic we need to make sure in the first block of our story we are setting $hasKey to false. This is because we want the player to find it. If we ever return to this node in the story it will always set $hasKey to false so be careful.
This is where you will need to use an if statement to check if the player has the key or not!
If they have not got the key the only option that will show is pick up they key, once they have it the only option that will show is unlock the door.
For picking up the key it is as simple as setting $hasKey to true and the going back to the hidden door.