Saturday, February 2, 2019

Coding Text-Based Gaming in ELA #NCTEChat

I am always looking for different ways to engage students in ELA classrooms. As a gamer, I've been looking for a fun way to engage student gamers in the classroom and I think I have found a very fun way to do that.

One of the oldest types of computer games were text based Role Playing Games (RPGs). You would be given test based descriptions of what was happening and you would have to type what you wanted to do next. You could travel from one place to another by typing in "go west" or some other direction. You could pick things up and use them as needed as long as you typed the instructions. I thought that creating a text-based RPG would be a great lesson for students for a few reasons;

  • Story-telling - Students need to work on telling stories. Creating a narrative around a game they are creating is a fun way to practice their writing skills. Building a plot, creating a protagonist and antagonist, and working on their descriptive writing are skills that writing for a game can help enhance.
  • Proofreading - Proofreading code to make sure everything is where it needs to be to run properly is crucial. These proofreading skills need to constantly be practiced. The importance of punctuation in coding is the same as the importance of punctuation in standard writing.
  • Interactive - Writing a game and being able to play it and share it with friends to play is a more interactive way to write. Any errors in writing that are found while playing can be shared and debugged later. 
  • Differentiated - Writing the code for this game can become a very complex game or a very simple game depending on the person writing the code. This allows all different skill level writers the chance to explore story-telling through code in ways that meet their skill set. 
  • It's different - Sometimes, it is good to do a bit of writing that is different than just sitting and writing. This offers a nice way to change the pace of the classroom writing students are used to doing. 
The more that you have your students doing this, the more benefits you will find. Below are the steps I took to laying out the lesson. 

Note: You do not have to know how to code to do this lesson. Do not let the code scare you away. 

Day 1:

I introduced the Raspberry Pi RPG tutorial program to the students. This link is shared on Google Classroom so all students can access it. The program is very nice because it does not ask students to understand the bits of code that are provided, it only asks students to fill in some blanks and recopy what is already given to them. The tutorial is really helpful because it allows the students to work ahead if they are quicker in understanding what needs to be done. The tutorials takes students to an online code program called Trinket. You can have students create a free account so they can save their code and come back to it later. 

As a class, we work together to add one room to the program. By the end of one class period, the students should have added one room to their game. They are asked to try and add another room before the next class meeting. 

Day 2: 

For the second class meeting, we will have students learn to add an item to pick up as part of their game and we will add a monster. The tutorial walks the students through all of this and makes it easy for them to copy and paste in the Trinket website. 

For the next class meeting, I ask that the students have an item and a monster added to their game and 5 total rooms. 

Day 3:

For the third class meeting, we will focus on how you can win your game. After finishing their game, we discuss the different types of stories that you could tell with this type of computer game. Mystery, adventure, space adventure, spooky, etc are all possibilities. The students are asked to start brainstorming a story that they would be able to create a maze-based game around. 

Day 4:

Students are asked to start mapping out their maze that will fit in the narrative of their story. By drawing out their maze room by room, it will make it easier to code. I drew out my map to help me and it made the overall design much easier to code. 

Days 5-7:

Students should be coding their game around the narrative they have created. This is where they can have fun and create the game they really want. By Day 7, they should have something that can be tested with other students in the room. 

Days 8 and 9:

Final proofreading and debugging should take place and the games should be ready to share with the class. Trinket allows users to share links to their games so others can remix them and try them out. Posting those links in a Google Doc or in Google Classroom would be helpful. 

Depending on your students, this can be done more quickly or you can spread it out over time. Since the tutorial is self-paced, this could be something you have students work on a little bit each day. 

Here is the game I created. It is far more complex than the ones that students are working on, but I thought I would really have a go at it. [Update: I added a search feature that can allow players to search rooms for extra treasure that is randomly pulled from a list, but there are rooms rigged with traps, so a search of a room with a trap will cause death unless you have found an amulet to protect you. There is so much more I can add and tweak. I'm becoming a little obsessed with it.]


The game is still a work in progress, but if you want to take a look underneath the hood of this code, follow this link.

If you have any questions, please do not hesitate to reach out to me on Twitter or leave a comment below. I have some very excited students working on this lesson and some of them have told me they have over 10 rooms after only a couple of days. I can't wait to see what they come up with and share them out with the community.  

1 comment:

  1. Hey Nick! This especially cool in the area of ELA and do trust, this will be borrowed!

    Take care,
    Dawn

    ReplyDelete

Please post your thoughts here. Thanks!