Giter Site home page Giter Site logo

nkd's Introduction

NKd

A simple game to explore rust, wasm, and quicksilver.

Topic Area:

Game

Vision:

Two-dimensional game with keyboard control using rust and web assembly. Player can move, interact with items, collect points, complete and possibly save levels. Beware of bees.

Credits

Quicksilver crate, and it's many dependancies, wasm and rust communities.

Tomas Sedovic's quicksilver tutorial a friendly introduction to using quicksilver and rendering games.

Use:

Note: some extensions break js rendering canvas, private modes of firefox on windows and chrome on linux appear to consistently work. 

Linux:

To build for Ubuntu 18LTS targeting wasm you need:

  • rust

    curl https://sh.rustup.rs -sSf | sh

  • gcc (to compile proc-macro2), libssl (for cargoweb)

    sudo apt install gcc libssl-dev

  • webassembly (supported bytecode)

    rustup target add wasm32-unknown-unknown

  • cargo-web (does all the wasm-js stuff for us!)

    cargo install cargo-web

  • clone this repo (or download files)

    git clone https://github.com/igaul/NKd.git

Web browser
  • compile

    cargo web start to test locally (deploy to just build files)

Linux computer
  • compile

    cargo run --release

(For other distros there are some dependancy conflicts) Some features are only availible in cargo (rustc) compilation, not in browser version, such as inventory updates, due to rerendering image.

Game Play

Move around the board encountering obstacles and puzzles, searching for a gem on each level, collecting gem wins level. Helpful items can be purchased from the market.

For playing demo level: 'x' and 's' increase money and energy, 'm' pops up market, press key to purchase item

Current State

Sticking with one codebase for native and browser forces some design changes along with inexperience creating games, the wasm version does not currently display missing items or full inventory as in linux version. Was not able to make Atlas functional.

Long term project vision include more levels, terrain, and chalanges, along with game menu and settings menu. Making separate pages(menu, game, win/lose), etc...

nkd's People

Contributors

igaul avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.