Learning Goal #8
3JS Interactive Environments
Students will be able to design an interactive game environment with controllable avatars and unique objects.
Part 1: Scoreboard & Help Menu
Read MoreEvery game environment is built around time, and points, and scores. But up to this point, you’ve never plugged a scoreboard into your code. During this activity, you will not be making any objects that can be scored, but you will still set up a game environment with a scoreboard. It’s not perfect, but it’s a start.
Step 1:
Open Notepad++ and save a new document called “streetturtle.html” in your LG8_gamejs Folder.
Step 2:
Copy/paste this source code into your document.
Step 3:
Open your page with Chrome, then create a split screen so you can see your code on one side and your avatar on the other.
Step 4:
For now, leave the lamps alone, but feel free to change the colors of your turtle or the color of your background. After a few minutes, we will get started. You will be coding with the teacher on this activity.
Part 2: Lost in the Desert
Read MoreNow that you have a pretty good idea of how game environments are set up, this is a good time to practice building a game environment. The purpose of this challenge is to see if you can use all of the things you just learned over the last several lessons to create or design a dry, desert environment. You might want to create a few cactus trees and maybe even a small pool of water, but you’re setting up a new environment. Your avatar might be a futuristic robot or a creepy skeleton. Use any of the resources from the last few lessons to set up your design, but save it as lostinthedesert.html. Again, start by creating a new document, saving it as “lostinthedesert.html” in your LG8_gamejs folder, then challenge yourself to use what you know to build a desert-ish environment.