Go to file
iceiix 0471eb3a82 Use web-sys for web backend (#444)
A small step for #446 🕸️ Web support, use web-sys to interface to the web.
Previously, we would try to use glutin on the web, which is not supported;
now glutin is only used on native: fixes #171 could not find Context in platform_impl.

winit is still used on both, but the GL context is created with web-sys and glow
(on the web), and created with glutin and used with glow (on native). stdweb is
no longer used, being replaced by web-sys.

Substantial refactoring to allow reusing the code between web/native:

* settings: use VirtualKeyCode from winit, not reexported from glutin
* std_or_web: remove broken localstoragefs/stdweb, add File placeholder
* render: disable skin_thread on wasm since we don't have threads

* gl: use glow types in gl wrapper (integers in native, but Web*Key in web)
* gl: web-sys WebGlUniformLocation does not implement Copy trait, so glow::UniformLocation doesn't so gl::Uniform can't
* gl: refactor context initialization, pass glow::Context to gl::init for consistency between native/web
* gl: update to glow with panicking tex_image_2d_multisample web-sys wrapper

* glsl: use shader version in GLSL for WebGL 2 and OpenGL 3.2

* shaders: add explicit float/int type conversions, required for WebGL
* shaders: specify mediump precision, required for WebGL
* shaders: specify fragment shader output locations for WebGL

* main: refactor handle_window_event to take a winit window, not glutin context
* main: handle resize outside of handle_window_event since it updates the glutin window (the only event which does this)
* main: use winit events in handle_window_event not reexported glutin events
* main: refactor game loop handling into tick_all()
* main: create winit window for WebGL, and use winit_window from glutin
* main: restore console_error_panic_hook,  mistakingly removed in (#260)
* main: remove force setting env RUST_BACKTRACE=1, no longer can set env on web

* www: index.js: fix wasm import path
* www: npm update, npm audit fix
* www: update readme to link to status on #446 🕸️ Web support
2020-12-26 13:43:21 -08:00
.cargo Enable static CRT (in git), closes #318 2020-07-05 11:20:34 -07:00
.github/workflows Update to Rust 1.48 (#424) 2020-11-24 19:35:55 -08:00
blocks Use `matches!` for bool match (clippy match_like_matches_macro) 2020-10-10 16:22:46 -07:00
protocol Use web-sys for web backend (#444) 2020-12-26 13:43:21 -08:00
resources resources: use writeln macro, fixing write_with_newline 2020-06-29 17:50:08 -07:00
shared Reformat all source with cargo fmt (#335) 2020-06-21 12:17:24 -07:00
src Use web-sys for web backend (#444) 2020-12-26 13:43:21 -08:00
std_or_web Use web-sys for web backend (#444) 2020-12-26 13:43:21 -08:00
www Use web-sys for web backend (#444) 2020-12-26 13:43:21 -08:00
.gitignore Add rustfmt backup files to .gitignore, from #337 2020-06-21 12:32:11 -07:00
.travis.yml Add support for compiling WebAssembly wasm32-unknown-unknown target (#92) 2019-03-03 08:32:36 -08:00
Cargo.lock Use web-sys for web backend (#444) 2020-12-26 13:43:21 -08:00
Cargo.toml Use web-sys for web backend (#444) 2020-12-26 13:43:21 -08:00
LICENSE-APACHE Duel license under MIT and ApacheV2 2016-03-26 17:34:47 +00:00
LICENSE-MIT Duel license under MIT and ApacheV2 2016-03-26 17:34:47 +00:00
README.md Update readme, add link to discussion forum and Freenode channel 2020-12-20 16:21:02 -08:00

README.md

Stevenarella

Build Status

Multi-protocol Minecraft-compatible client written in Rust.

Don't expect it to go anywhere, just doing this for fun.

Images

Steven on Hypixel Steven

In action: http://gfycat.com/NeedyElaborateGypsymoth

Community

IRC channels: #stevenarella on irc.freenode.net, or #stevenarella on irc.esper.net.

Discussion forum: https://github.com/iceiix/stevenarella/discussions.

Protocol support

Game version Protocol version Supported?
1.16.4 754
1.16.3 753
1.16.2 751
1.16.1 736
1.16 735
1.15.2 578
1.15.1 575
1.14.4 498
1.14.3 490
1.14.2 485
1.14.1 480
1.14 477
19w02a 452
18w50a 451
1.13.2 404
1.12.2 340
1.11.2 316
1.11 315
1.10.2 210
1.9.2 109
1.9 107
15w39c 74
1.8.9 47
1.7.10 5

Stevenarella is designed to support multiple protocol versions, so that client development is not in lock-step with the server version. The level of support varies, but the goal is to support major versions from 1.7.10 up to the current latest major version. Occasionally, snapshots are also supported.

Forge servers are currently supported on 1.7.10 - 1.12.2.

Support for older protocols will not be dropped as newer protocols are added.

Downloads

Windows, Ubuntu Linux, and macOS users can download pre-compiled builds from GitHub Actions. (Click the artifacts drop-down and select your platform.)

Dependencies

Requires Rust stable version 1.48.0 or newer.

Debian/Ubuntu

sudo apt-get install libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-composite0-dev

Alpine Linux

sudo apk add openssl-dev xcb-util-dev

Building

Compile and run:

cargo run --release

Just compile:

cargo build --release

For progress on web support, see www/.

Running

Standalone

Just running Stevenarella via a double click (Windows) or ./stevenarella (everything else) will bring up a login screen followed by a server list which you can select a server from.

Contributions

Stevenarella is an OPEN Open Source Project:

Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.

Rules

There are a few basic ground-rules for contributors:

  1. No --force pushes or modifying the Git history on the master branch.
  2. Non-master branches ought to be used for ongoing work.
  3. External API changes and significant modifications ought to be subject to an internal pull-request to solicit feedback from other contributors.
  4. Internal pull-requests to solicit feedback are encouraged for any other non-trivial contribution but left to the discretion of the contributor.
  5. Contributors should attempt to adhere to the prevailing code-style. Please install and run cargo fmt before merging any changes.

Changes to this arrangement

This is an experiment and feedback is welcome! This document may also be subject to pull-requests or changes by contributors where you believe you have something valuable to add or change.

Credits

Thanks to @thinkofname for the original Steven (Rust), which Stevenarella is an updated and enhanced version of.

License

Dual-licensed MIT and ApacheV2