Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Adding Enemies | Developing an Adventure Game Catch the Carrot
Build Games with Cursor AI

bookAdding Enemies

The field is no longer safe. Now the rabbit has to dodge moving enemies in each lane while trying to reach the carrot.

In this step, we're adding danger while still staying kid-friendly. Here's what changes on the play screen: Enemies in lanes.

  • Each horizontal lane should have an enemy (like a fox or a wolf);
  • Each enemy moves left β†’ right β†’ left in a loop, always sliding across its lane;
  • Enemies never stop, they keep drifting across on their own.

Collision rule.

  • If the rabbit touches an enemy, the run fails;
  • Show a friendly message like "Caught! Try Again" and a restart button;
  • After the restart, reset the rabbit back to the bottom of the field.

Winning still works.
Reaching the carrot at the top should still trigger the "You got the carrot!" message from the previous step.

question mark

What happens if the rabbit touches an enemy in our app?

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 3

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Awesome!

Completion rate improved to 6.67

bookAdding Enemies

Swipe to show menu

The field is no longer safe. Now the rabbit has to dodge moving enemies in each lane while trying to reach the carrot.

In this step, we're adding danger while still staying kid-friendly. Here's what changes on the play screen: Enemies in lanes.

  • Each horizontal lane should have an enemy (like a fox or a wolf);
  • Each enemy moves left β†’ right β†’ left in a loop, always sliding across its lane;
  • Enemies never stop, they keep drifting across on their own.

Collision rule.

  • If the rabbit touches an enemy, the run fails;
  • Show a friendly message like "Caught! Try Again" and a restart button;
  • After the restart, reset the rabbit back to the bottom of the field.

Winning still works.
Reaching the carrot at the top should still trigger the "You got the carrot!" message from the previous step.

question mark

What happens if the rabbit touches an enemy in our app?

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 3
some-alt