Skip to content

Code4Community/CodeStrikers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Strikers

Overview

Code Strikers is a browser-based soccer programming game built with HTML, CSS, and JavaScript. Players control an attacker using code commands to move, avoid defenders, and score goals across multiple levels. The game features:

  • Multiple levels with increasing difficulty
  • 1v1 mode for local multiplayer
  • Upcoming AI agent (reinforcement learning) for single-player challenge

How to Play

  1. Select a Level: Use the level dropdown to choose a level or mode.
  2. Write Code: In most levels, type code commands in the code editor to control your player. Available commands:
    • moveRight() – Move 1 space right
    • moveLeft() – Move 1 space left
    • moveUp() – Move 1 space up
    • moveDown() – Move 1 space down
    • shootBall() – Shoot the ball 4 spaces right
  3. Run Your Code: Click Run to execute your code and watch your player move.
  4. Score Goals: Avoid defenders and score by shooting the ball into the goal.

Game Levels

Level 1

Move right until close to the goal and shoot to score. No defenders.

Level 2

Two defenders in front of the goal. Move around them, then shoot to score (no loops required).

Level 3

More difficult: introduces while loops and inFront(). Move around defenders to score.

Level 4

Defenders move up and down. Time your movement and shoot to score!

Level 5

Advanced challenge (details in-game).

JavaScript Bot

Face off against an AI-controlled javascript defender will test your code and skills against a smart, learning opponent.

1v1 Mode

Play against a friend locally:

  • Player 1: Use WASD keys
  • Player 2: Use Arrow keys Score goals to win! The scoreboard tracks each player's score.

Features

  • Animated soccer field and sprites
  • Code editor with syntax highlighting
  • Real-time feedback and error checking
  • Multiple levels and increasing difficulty
  • 1v1 local multiplayer
  • (Coming soon) AI agent for single-player challenge

How to Run

  1. Open index.html in your browser.
  2. Click Start to begin.
  3. Select a level and start coding!

Assets

All images and assets are in the assets/ folder.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5