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
- Clone this repository
- Run
npm install
to install dependencies
- Run
npm run dev
to start the development server
- Open
http://localhost:5173
in your browser
- 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!