archived on Svelte 4 π₯π𦴠games of Snake in Svelte and SvelteKit
β οΈ archived because the code is very experimental/messy and it's just snake - also the images feel off, and I'm not motivated to make good thumbnails
Play: ryanatkn.github.io/svelte-snake-sports
Watch the intro video: youtube.com/watch?v=ciei8H6IOWk
Watch a run of buncheses: youtube.com/watch?v=EorynexNDJI
π | sport | goal |
---|---|---|
classsic | eat many apples | |
ssspeed | eat apples asap | |
buncheses | eat many whole bunches of apples | |
trailsss | eat trails of apples |
Here's the source code for each sport.
caveats:
Windows users will need a Linux VM, see this issue.
npm run dev
# or
gro dev # npm i -g @ryanatkn/gro
npm run build
# or
gro build
Deploy
(build, commit, and push) to the deploy
branch, e.g. for GitHub Pages:
npm run deploy
# or
gro deploy
In 2016 I wrote a tiny snake-game
for an interview in React. Today I use Svelte instead and I continue to enjoy
Snake
for thinking through frontend development patterns.
This project started as
a port
of the React version to my current Svelte patterns (with some experiments and hacks)
and it's growing from there.
This project plans to make many distinct versions of Snake that are interesting in terms of gameplay, game design, and/or technical implementation with Svelte. If we're lucky, it'll be simple enough for beginners to follow along and deep enough to hold the interest of more advanced students like myself.
note: the project from 2016 uses Create React App and has no lockfile, and given that I wish not wake eldritch npm horrors, I am not going to try to run the code, and I advise you not to try, so much so that I won't even directly link the repo (though it's trivially inferred; also it's archived/readonly)
on the web: ryanatkn.github.io/svelte-snake-sports
Svelte β SvelteKit β Vite β esbuild β uvu β TypeScript β ESLint β Prettier β Felt β Gro & more
music by Alexander Nakarada (serpentsoundstudios.com, CC-BY-4.0):
generated images by DALL-E:
public domain β The Unlicense