Skip to content

ttulka/2d-videogame-in-assemblyscript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2D Video Game in AssemblyScript

A small demo 2D video game running in a web browser powered by WebAssembly.

Breadcrumb Lost

Disclaimer: This was never intented to be a real game. The purpose is to demonstrate programming games from scratch in AssemblyScript.

📖 Read the whole tutorial on my blog.

Check out alternative technical approaches:

Build

Install package

npm install

Compile to WebAssembly

npm run asbuild:optimized -- --memoryBase 40000

Run

npx ws -p 1234

Open http://127.0.0.1:1234 in a web browser.

Play

Play online at https://ttulka.github.io/breadcrumblost/

Desktop only.

Breadcrumb Lost

It is easy for children to follow breadcrumbs to get back home. But what about the poor breadcrumbs?!

Help a lost breadcrumb find its way home without getting wet or eaten.

Controls

  • UP jump
  • RIGHT go right
  • LEFT go left

Develop

Convert images to AssemblyScript byte arrays

node image2array.js assets/image.png > assembly/assets/image.ts

Copyright

Assets taken from https://kenney.nl/assets/pixel-platformer

About

Demo 2D videogame in AssemblyScript 🚀

Topics

Resources

License

Stars

Watchers

Forks

Languages