snake-svelte Svelte Themes

Snake Svelte

A snake game with Svelte

Snake-svelte

About

A simple Snake game made with JS and Svelte for a workshop during our formation at Becode.
A demo is available here.

Collaborators

Project

The repository served as a base for a Svelte initiation during a 3h workshop.
It consists of multiple branches showcasing every step of the project.

Main branch

The main branch showcases the finished game with features we planned to present. It was used as a demo for the workshop.

Dev branch

The dev branch was used for live coding during the workshop. It contains every feature made live with workshop attendees.

Step branches

There are 7 steps, each step consist of a fonctionnal and displayable part of the game:

  • step1: structure of the project and the files, with no logic
  • step2: Game component displaying the game area
  • step3: Snake component displaying a static snake with a position in the game area based on props
  • step4: Food component displaying a static food with a random position
  • step5: Game loop and movements logic
  • step6: Collision logic and game lost screen
  • step7: Eating and growing logic with bonuses (score, restart button)

Build branch

A static branch to deploy a demo on GitHub pages.

Top categories

Loading Svelte Themes