Git Product home page Git Product logo

dom-adventure-game's Introduction

DOM Adventure Game

Starter code for a text-based adventure game in the browser. Follow the project instructions to create your fork and build your own!

Setup

When we first learned JavaScript, we made a text-based game to practice the basic building blocks of programming languages like loops, conditionals, and functions. But it could only be played on the command line. Let's update it with our new skills! We'll create a web-based interface and practice working with the DOM and Browser Events.

  1. Click the Fork button in the top right to make your own copy of the repository.
  2. On your own repo, click the green Code button and copy the repo's git URL. It should have your GitHub username in it.
  3. Open your terminal and navigate to your folder for projects: cd ~/code
  4. Use git to download your repo using the copied URL: git clone <URL>

To submit the project:

  1. As you are working, use the Edit-Add-Commit workflow to track your changes with git.
  2. When you are done, you can push all the commits to GitHub at once with the git push command.

Requirements

Make sure you follow the original requirements for how the game functions. The JavaScript logic will be a bit different though.

  • The entire game should take place in one web page. Instead of using links to navigate to different pages that could contain a scene, you'll use DOM methods to rebuild the one page as the user plays.
  • You should use at least three different browser events. Here are some options:
    • Clicking a button element to decide a direction
    • Pressing a key to preform an action
    • Submitting a form input to provide an answer
    • Setting a timeout to create a countdown
  • Only show one scene at a time. As the user gets to a new scene in the game, you should use DOM methods to remove the old scene description and show the next.

Grading

  • 15 pts for following the requirements.
  • 5 pts for a game that runs without errors.
  • 5 pts for well commented code.
  • 5 pts for following code style guidelines.

dom-adventure-game's People

Contributors

gabecurran avatar zachfedor avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.