Back to Web Dev For Beginners

Create a new keyboard game

4-typing-game/typing-game/assignment.md

latest3.3 KB
Original Source

Create a new keyboard game

Instructions

Now that you've mastered the fundamentals of event-driven programming with the typing game, it's time to unleash your creativity! You'll design and build your own keyboard-based game that demonstrates your understanding of event handling, DOM manipulation, and user interaction patterns.

Create a small game that uses keyboard events to accomplish specific tasks. This could be a different kind of typing game, an art application that paints pixels to the screen on keystrokes, a simple arcade-style game controlled with arrow keys, or any other creative concept you can imagine. Get creative and think about how different keys can trigger different behaviors!

Your game should include:

RequirementDescriptionPurpose
Event ListenersRespond to at least 3 different keyboard eventsDemonstrate understanding of event handling
Visual FeedbackProvide immediate visual response to user inputShow mastery of DOM manipulation
Game LogicInclude scoring, levels, or progression mechanicsPractice implementing application state
User InterfaceClear instructions and intuitive controlsDevelop user experience design skills

Creative project ideas to consider:

  • Rhythm Game: Players press keys in time with music or visual cues
  • Pixel Art Creator: Different keys paint different colors or patterns
  • Word Builder: Players create words by typing letters in specific orders
  • Snake Game: Control a snake with arrow keys to collect items
  • Music Synthesizer: Different keys play different musical notes or sounds
  • Speed Typing Variants: Category-specific typing (programming terms, foreign languages)
  • Keyboard Drummer: Create beats by mapping keys to different drum sounds

Implementation guidelines:

  • Start with a simple concept and build complexity gradually
  • Focus on smooth, responsive controls that feel natural
  • Include clear visual indicators for game state and player progress
  • Test your game with different users to ensure intuitive gameplay
  • Document your code with comments explaining your event handling strategy

Rubric

CriteriaExemplaryAdequateNeeds Improvement
FunctionalityA complete, polished game with multiple features and smooth gameplayA working game with basic features that demonstrates keyboard event handlingA minimal implementation with limited functionality or significant bugs
Code QualityWell-organized, commented code following best practices with efficient event handlingClean, readable code with appropriate use of event listeners and DOM manipulationBasic code structure with some organization issues or inefficient implementations
User ExperienceIntuitive controls, clear feedback, and engaging gameplay that feels professionalFunctional interface with adequate user guidance and responsive controlsBasic interface with unclear instructions or poor responsiveness
CreativityOriginal concept with innovative use of keyboard events and creative problem-solvingInteresting variation on common game patterns with good use of event handlingSimple implementation of a basic concept with minimal creative elements