Skip to content

Your First Game

Let's build a complete game step by step.

What We're Building

A classic Snake game with:

  • Moving snake
  • Food collection
  • Score tracking
  • Game over state

Step 1: Create the Game

Open PlayCraft and type:

Create a snake game with a green snake on a dark background

Wait for the AI to generate the code. You should see a basic snake appear in the preview.

Step 2: Add Controls

Add arrow key controls to move the snake

Now you can move the snake with your keyboard.

Step 3: Add Food

Add red food that appears randomly. When the snake eats it, grow longer.

Step 4: Add Score

Add a score counter in the top-right corner. +10 points per food.

Step 5: Add Game Over

End the game if the snake hits the wall or itself. Show "Game Over" with final score.

Final Result

You now have a complete, playable Snake game!

What's Next?

Try adding:

  • "Add increasing speed as score goes up"
  • "Add a high score that persists"
  • "Add sound effects"
  • "Make it mobile-friendly with touch controls"

Build games with AI