Skip to content
Vim Snake Game powered by web assembly
TypeScript JavaScript Go HTML CSS Makefile
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
functions
src
static
.env_example
.firebaserc
.gitignore
Makefile
README.md
firebase.json
package.json
reference.go
yarn.lock

README.md

WASM Snake

Vim Snake 2.0 is written in Go and compiled to Web Assembly.

I originally built this site in 2013 using my extremely limited knowledge of javascript and ruby/sinatra. It was trivial to cheat and so the leaderboard was meaningless. This rewrite fixes those issues and taught me a bunch about new web technologies.

Development

Front end

Create a .env file with environment variables shown in .env_example

yarn build single build or yarn startfor development

WASM Code

make to build (also watched and built by yarn start)

Firebase functions

Set environment vars:

firebase functions:config:set score.secret="same secret as in .env"

cd functions then yarn deploy to deploy

TODO

  • Add ctrl + [ keybinding for insert mode
  • Show "i" to eat food when running over food
You can’t perform that action at this time.