GithubHelp home page GithubHelp logo

conveyor's Introduction

Conveyor game

This is all Rahn's idea, you can blame him I'm just the code monkey!

desktop mode

watch mode

cargo watch -q -c -x 'run --features bevy/dynamic_linking'

run

cargo run --features bevy/dynamic_linking

wasm mode

trying to get this working for all the browser kids

dependencies

You will need a few things installed on the dev machine:

https://bevy-cheatbook.github.io/platforms/wasm.html

rustup target install wasm32-unknown-unknown
cargo install wasm-server-runner

https://rustwasm.github.io/wasm-bindgen/reference/cli.html

cargo install -f wasm-bindgen-cli

Local running

cargo run --target wasm32-unknown-unknown

Bundle game for release

note: currently fails on my windows box complaining about missing c compiler dependencies but works on the github actions toolchain which is good enough for me

cargo build --release --target wasm32-unknown-unknown --features = tiled/wasm

Create web assets

The following command will create js and wasm

wasm-bindgen --no-typescript --out-dir wasm --target web .\target\wasm32-unknown-unknown\release\conveyor.wasm

View locally

not really set up to do this easily, but if you copy the assets tree into the wasm folder you can run the game via a local http server

python -m http.server

itch.io

Deployed as draft currently, if you really want to try it here's a secret URL:

https://the-trav.itch.io/conveyor?secret=mHY5xzc2ZragwWTbl8C0X8Tr8

It's more set up for auto deployment to itch.io via butler. For my own memory sake, I had to:

  1. First create the project at itch.io
  2. Run a local docker container containing butler
  3. Do the login so it registered its own API key, (that's probably against my account and I can use for future projects)
  4. Then I put that key in the github secrets for the action
  5. Run the butler push
  6. go to the itch project page, edit the game, set the channel I uploaded to html5 play in browser

Weird pixel borders on tiles

Related to bevyengine/bevy#8150 the bevy texture atlas seems to have problematic sampling at the edges.

I've found that if I use tile maps with any spacing, at some zoom levels the renderer picks the wrong pixel and you get the padding from the tile map showing through making your game look like it's gone through a wire mesh.

There's some talk about MSAA fixing it, however I haven't had any luck there. Using individual sprite files also could fix it, but there are warnings around doing that with wasm deployments

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.