Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added de-DE/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions de-DE/code/code-project-example/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print("Hello, world")
4 changes: 4 additions & 0 deletions de-DE/code/code-project-example/project_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: "Code Project Example"
identifier: "code-project-example"
type: 'python'
build: false
Binary file added de-DE/images/avery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added de-DE/images/backdrop_editor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added de-DE/images/backdrop_menu_paint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added de-DE/images/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added de-DE/images/kabaddi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added de-DE/images/opponent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added de-DE/images/rename-opponent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added de-DE/images/rename-player.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added de-DE/images/scratch-thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added de-DE/images/sprite-choose.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added de-DE/images/stage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added de-DE/images/variables.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions de-DE/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
title: Kabaddi!
hero_image: images/banner.png
description: Make a game inspired by kabaddi, where the player must tag opponents and avoid being caught, while managing a countdown timer
version: 1
listed: true
copyedit: true
last_tested: "2025-01-01"
steps:
- title: What you will make
- title: Set up the Stage
completion: engaged
- title: Set up the player and controls
- title: Add opponents
- title: Tagging and being caught
completion: internal
- title: Make the kabaddi timer
- title: Challenge
challenge: true
- title: What next?
completion: external
24 changes: 24 additions & 0 deletions de-DE/step_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## What you will make

Make a game inspired by [kabaddi](https://en.wikipedia.org/wiki/Kabaddi), where the player must cross a line, tag opponents, and avoid being caught, while managing a countdown timer by repeatedly pressing the space bar.

### Rules:

- Use the arrow keys to tag opponents.
- Opponents will chase you, but cannot cross the green line.
- You can only touch one opponent at a time. If you touch more than one opponent at a time, they have caught you and you will lose a life.
- You must press the space bar **at least once every second** or you will lose a life.

\--- print-only ---

![The finished game.](images/kabaddi.png)

\--- /print-only ---

\--- no-print ---

<div class="scratch-preview">
<iframe allowtransparency="true" width="485" height="402" src="https://scratch.mit.edu/projects/embed/1175744884/?autostart=false" frameborder="0"></iframe>
</div>

\--- /no-print ---
110 changes: 110 additions & 0 deletions de-DE/step_2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
## Set up the Stage

To set up the game, you will draw the green line and make all the variables you will need.

\--- task ---

First, paint the green line. This will set a safe zone for the player.

![The 'Paint' option highlighted in the 'Choose a Backdrop' menu.](images/backdrop_menu_paint.png)

In the **Backdrops** editor, draw a vertical green line across the canvas at around x = –100 (between the left edge and the centre). The line should have a thickness of 20 pixels.

![The Backdrops editor with a green vertical line drawn across the canvas on the left-hand side.](images/backdrop_editor.png)

\--- /task ---

\--- task ---

Create two variables, `lives`{:class='block3variables'} and `opponent tagged`{:class='block3variables'}.

![The 'Variables' blocks menu with 'lives' and 'opponent tagged' ticked.](images/variables.png)

These variables will control scoring, and they will be used to identify when the player has won or lost.

\--- /task ---

\--- task ---

Write the game 'start' script:

![The Stage with a vertical green line across the centre.](images/stage.png)

```blocks3
when green flag clicked
set [lives v] to (5)
set [opponent tagged v] to (0)
```

\--- /task ---

\--- task ---

Create a new `broadcast`{:class='block3events'} with the message `start`, and add the `broadcast`{:class='block3events'} block to the bottom of your script:

```blocks3
when green flag clicked
set [lives v] to (5)
set [opponent tagged v] to (0)
+broadcast (start v)
```

This is the message that you will use to start all the sprites in the game.

\--- /task ---

Next, add the counters for both `lives`{:class='block3variables'} and `opponent tagged`{:class='block3variables'}, to control winning and losing the game.

\--- task ---

Create two new `broadcast`{:class='block3events'} messages, `win` and `lose`.

\--- /task ---

\--- task ---

Add this code to the bottom of your script:

![The Stage with a vertical green line across the centre.](images/stage.png)

```blocks3
when green flag clicked
set [lives v] to (5)
set [opponent tagged v] to (0)
broadcast (start v)
+forever
if <(opponent tagged) = (7)> then // Tagging 7 opponents means the player wins
broadcast (win v)
wait (3) seconds
end
+end
```

\--- /task ---

\--- task ---

Add the code for running out of lives:

```blocks3
when green flag clicked
set [lives v] to (5) // The player has 5 lives at the start
set [opponent tagged v] to (0)
broadcast (start v)
forever
if <(opponent tagged) = (7)> then
broadcast (win v)
wait (3) seconds
end
+if <(lives) = (0)> then
broadcast (lose v)
wait (3) seconds
+end
end
```

\--- /task ---

In the next step, you will make the controls for the player.

\--- save ---
99 changes: 99 additions & 0 deletions de-DE/step_3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
## Set up the player and controls

Add a player sprite and make it move around.

\--- task ---

Delete the **Sprite1** sprite — click on the **Delete** icon on the thumbnail:

![The Scratch cat sprite thumbnail with the name Sprite1, with a 'Delete' icon.](images/scratch-thumbnail.png)

\--- /task ---

\--- task ---

Use the **Choose a Sprite** menu to add a **player** sprite. Choose anything you like — in this example, we will use the **Avery Walking** sprite:

![The 'Choose a Sprite' icon highlighted.](images/sprite-choose.png)

Rename the sprite `Player`.

![The sprite name set to 'Player' in the Sprite pane.](images/rename-player.png)

![The Avery Walking sprite is now named Player.](images/avery.png)

\--- /task ---

\--- task ---

Create the 'start' script for the player:

![The Player sprite.](images/avery.png)

```blocks3
when I receive [start v]
set size to (25)%
go to x:(-160) y:(0)
wait (1) seconds
```

This makes sure that the player begins in the correct position and scale.

\--- /task ---

\--- task ---

Add arrow key movement:

![The Player sprite.](images/avery.png)

```blocks3
when I receive [start v]
set size to (25)%
go to x:(-160) y:(0)
wait (1) seconds
+repeat until <(lives) = (0)>
if <key (up arrow v) pressed?> then // allows player to move up
change y by (10)
end
if <key (down arrow v) pressed?> then // allows player to move down
change y by (-10)
end
if <key (right arrow v) pressed?> then // allows player to move right
change x by (10)
end
if <key (left arrow v) pressed?> then // allows player to move left
change x by (-10)
end
+end
```

\--- /task ---

\--- task ---

Add code to stop the game if the player wins or loses:

![The Player sprite.](images/avery.png)

```blocks3
when I receive (lose v)
say [TRY AGAIN!] for (2) seconds
stop [all v]

when I receive (win v)
say [YOU WIN!] for (2) seconds
stop [all v]
```

\--- /task ---

\--- task ---

**Test your code.** Click on the green flag and make sure you can control the **Player** sprite.

\--- /task ---

In the next step, you will make opponents who will chase the player!

\--- save ---
97 changes: 97 additions & 0 deletions de-DE/step_4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
## Add opponents

Make opponents appear and chase the player.

\--- task ---

Add an **opponent** sprite. In this example, we will use the **Characters 1** sprite (with the costume **character1-e**):

![The 'Choose a Sprite' icon highlighted.](images/sprite-choose.png)

Rename the sprite `Opponent`.

![The sprite name set to 'Opponent' in the Sprite pane.](images/rename-opponent.png)

![The Characters 1 sprite is now named Opponent.](images/opponent.png)

\--- /task ---

\--- task ---

Add a setup script for the **Opponent** sprite:

![The Opponent sprite.](images/opponent.png)

```blocks3
when I receive [start v]
set size to (25)%
set rotation style [left-right v]
hide // This prepares the sprite to clone itself without showing it
repeat (7)
create clone of [myself v]
end
```

\--- /task ---

\--- task ---

Give each clone a random appearance and position:

![The Opponent sprite.](images/opponent.png)

```blocks3
when I start as a clone
switch costume to (pick random (1) to (13))
go to x:(pick random (-100) to (240)) y:(pick random (-180) to (180))
show
repeat until <(lives) = (0)>
point towards (Player v) // Each clone will chase the player
turn right (pick random (-70) to (70)) degrees
move (2) steps
if on edge, bounce
end
delete this clone
```

\--- /task ---

\--- task ---

**Test your code.** Click on the green flag and watch the opponents rush towards the player!

\--- /task ---

\--- task ---

Now, add this new code **inside** your `repeat until`{:class="block3control"} `lives`{:class="block3variables"} `=`{:class="block3operators"} `0` loop, so that if the opponents touch the green line, they are moved away:

```blocks3
when I start as a clone
switch costume to (pick random (1) to (13))
go to x:(pick random (-100) to (240)) y:(pick random (-180) to (180))
show
repeat until <(lives) = (0)>
point towards (Player v) // Each clone will chase the player
turn right (pick random (-70) to (70)) degrees
move (2) steps
if on edge, bounce
+ if <touching color ( #00ff00)?> then
change x by (100)
change y by (pick random (-180) to (180)
end
end
delete this clone
```

\--- /task ---

\--- task ---

**Test your code.** Click on the green flag and watch the opponents rush towards the player, but bounce off the green line.

\--- /task ---

In the next step, you will make the player be able to tag opponents, and make the opponents be able to catch the player.

\--- save ---
Loading