Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda 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

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 3

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

Awesome!

Completion rate improved to 6.67

bookAdding Enemies

Deslize para mostrar o 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

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 3
some-alt