The program I needed to make:
For my Part 3 investigation, I wanted to have a working game showing an octopus simulation game based on the Tamagotchi/Nintendogs style where the only interaction the player has with the character is through GUI buttons on their screen. In the past, I had only made sections of this game to demonstrate particular features, e.g. how to use cameras; how to use GUI buttons; how to use creatables to simulate food for the octopus.
I wanted to be able to demonstrate to my pupils different aspects of the Kodu programming environment and the best way for me was to have a working game that they could use, interact with and decompose. Being able to see a working model, they would have a clearer idea of its capabilities and know how they could implement their own ideas. This would be a very different type of program for my pupils as their experience of Kodu to this point had involved the user controlling a character in a world generally using WASD or arrow keys. Buttons had not been used and a simulation game would be a new and different experience for them to program.
How it begins:
The game begins and after 3 seconds and a cut scene begins to explain the basic features of the game: you have to look after Ollie the octopus by pressing the GUI buttons. You are informed that the cameras are controlled using the keys 0-4 (1-4 being different cameras in first person view and the 0 key taking a third person view from each camera). Pressing the black button allows the simulation game to start and you are taken back to the main tank where pressing 0 will zoom out and give you a clear view of Ollie’s tank.
The GUI buttons in my game:
- Start game
- Feed octopus
- Clean tank
- Lights off
- Lights on
Ollie the octopus is a blue octopus. Every 10 seconds, the water changes to green. This is a quick time period which I chose for testing and demonstrating to my pupils. This would need changing for an actual game. This time period is used to demonstrate cause and effect in the game.
The octopus has a meter over its head indicating happiness. The meter has a total of 50 points. For every 5 seconds in dirty water, health is damaged 5 points. The player can clean the tank by pressing the blue button. Again the timings here are really short. In a real game, the simulation of the tank becoming dirty would happen over a longer timeframe but 20 seconds is sufficient for demonstrating to pupils what happens, why and how to resolve it.
Whilst his health is greater than or equal to 25 (half health bar), the octopus wanders around the tank and he remains a blue octopus. Once the health bar drops below 25, the octopus changes colour to yellow.
Food – The octopus eats fish to stay healthy. The fish are creatables created by the clam. Once created, the fish wander around the tank. The clam can create up to 10 fish at a time. The octopus automatically moves towards any fish it sees and eats them. Eating a fish heals Ollie’s health by 5 points per fish so it is a quick way to make Ollie feel better. Any fish that are in a dirty tank die immediately. They were programmed to do this by recognising that if the water type was green (dirty) they will vanish. This encourages the user to clean the tank.
Game ends when the health bar reaches 0.
Pressing the yellow ‘socialising’ button creates a red octopus friend to play with Ollie. Only one red octopus friend can be created at one time. The red octopus is a creatable that has been programmed to move towards the blue octopus when it sees one. After 20 seconds, the red octopus will disappear. In a real version of this game, the time period that the red octopus would stay for would be increased. For every 5 seconds that Ollie sees the red octopus, its health bar raises by 5 points.
- Press 1 to view 1st person view from stick 1
- Press 2 to view 1st person view from stick 2
- Press 3 to view 1st person view from stick 3
- Press 4 to view 1st person view from stick 4
- Press 0 to resume a 3rd person view from outside the tank
The cameras are created using the stick object. I changed its settings to make it invisible and programmed each stick to view the world in 1st person.
This starts after 3 seconds and explains the basics of the game. When the user clicks on the black button at the top, it goes back to the tank and starts the game.
One problem was that when you pressed the black button to start the game, the view from stick 1 was first person. I programmed the clam to say a full screen message that appears when the black button is pressed. Although the users have been told the buttons to control the cameras in the cut scene, this extra hint helps them to start the game with a helpful reminder.
The inclusion of a cut scene was important for my pupils too as I wanted them to see that there was more that you could do with Kodu and cut scenes are a good way of making a storyline clear.
Ollie exercises by playing with a football. A football object is a creatable that is programmed to be created when the green ‘exercising’ button is pressed. Only one ball can appear at one time and it will disappear after 20 seconds. In a real game, this would be a longer time period. Ollie the blue octopus is programmed to move towards the football when he sees it. He is also programmed to hold the ball when he bumps it. For every 5 seconds that the octopus can see the football, his health heals by 5 points.
Lighting around the octopus tank
The sky in the world is set as blue.To simulate day and night, the purple button will turn off the lights (make the sky change to black) and the pink button will turn on the lights (make the sky change to blue).
To simulate real life, the health bar can change at a random time to a random number.
Testing my program
|Test||What should happen?||If test result was not as expected, how did you debug it?|
|Pressing the red button (feed octopus) in clean water||The clam should create up to 10 fish. The octopus should move towards the fish and eat them||NA – worked as expected|
|Pressing the red button in dirty water||The fish should vanish immediately||NA – worked as expected|
|Wait 3 seconds at the start of the game||A cut scene should begin||It started as expected but timings of the different comments from the fish and octopus had to be changed slightly. The speech bubbles were overlapping and hard for the user to read so I switched the comments from the fish to be displayed in full screen prompt boxes. This was better aesthetically. Also they don’t go away until the user clicks on them so that helps to ensure they understand the instructions for the game.|
|Press 0||Switch to a third person view from outside of the tank.||It worked as expected. I added 3rd person cameras from each of the 4 cameras around the tank as 1st person is a nice feature but you can’t see through the water easily.|
|Press 1,2,3,4||Switch to 4 different cameras||NA – worked as expected|
|Check the colour of the water in the tank after 20 seconds||Every 20 seconds the water should change colour to green. Every 5 seconds, the health bar should deplete||NA – worked as expected|
|Press blue button (clean tank) when the water is green||Water should change to become clear. Health bar should increase with every 5 seconds of clean water||NA – worked as expected|
|Deplete health bar to below half full||Octopus should be yellow when health bar is below half full||The octopus is yellow but through the green water, that can be hard to see. Could improve this in future with a speech bubble/prompt box to inform the user of the octopus’ poor health|
|Wait for the octopus to become ill/unhappy and the health bar to deplete fully||The game should end||NA – worked as expected|
|Press green button (exercise)||A ball should appear. Octopus should move towards it and hold it.||Worked as expected although when the tank was dirty, the octopus couldn’t see through the water to see the ball so didn’t move towards it|
|Wait for 20 seconds after the ball appears||The ball should disappear||NA – worked as expected|
|Press blue button (clean tank)||When the tank is green, it should change colour to become clear and the health bar should increase||NA – worked as expected|
|Press the yellow (socialise) button twice||It should only allow one red octopus to appear and it should disappear after 20 seconds||NA – worked as expected|
|Press the yellow (socialise) button once||One red octopus should appear and follow the blue octopus (Ollie) around the tank||A potential issue is that the tank is quite small and if Ollie is at the edge of the tank when the yellow button is pressed, the red octopus can be created outside of the tank. This is a glitch with Kodu and so nothing can be done other than increasing the world and trying not to press the buttons when close to the edge of the tank.|
|Press purple button (lights off)||The sky should instantly change to black||NA – worked as expected|
|Press pink button (lights on)||The sky should instantly change to blue||NA – worked as expected|
This programming project has allowed me to make a working model to support my pupils with a range of complex ideas. Rather than having small sections, there is a working simulation program using GUI buttons that shows some of the potential features of the software for pupils. It gives them enough to understand how aspects of the programming works and to build upon it with their own imaginative ideas.