svelte-game-template Svelte Themes

Svelte Game Template

Videogames with SvelteKit

svelte-game-template

Make awesome games easily using Svelte and SVG.

Why?

  • no need for a separate rendering engine - graphics are literally just SVG elements
  • effortless integration of HTML UI elements such as buttons and input boxes
  • seamless, dynamic formatting using CSS
  • easy to deploy to any static hosting service
  • take advantage of Svelte's powerful reactivity system and built-in animations

Features

  • Game loop with deltaTime
  • Page navigation with smooth transitions
  • Preloading assets
  • Audio autoplay policy
  • Keyboard input

Getting Started

  1. Clone this repository
  2. Run npm install to install dependencies
  3. Run npm run dev to start the development server
  4. Open http://localhost:5173 in your browser
  5. Edit the code in src/routes and save to see the changes live

Compiling

To compile the game, run npm run build.

If you made a project using this template, feel very free to share it here!

Top categories

Loading Svelte Themes