Commit Graph

170 Commits

Author SHA1 Message Date
iceiix ecf829c544
Update dependencies: reqwest, serde, serde_json (#755)
* Bump reqwest to 0.11.13. Closes #751

* Bump serde to 1.0.152. Closes #752

* Bump serde_json to 1.0.91. Closes #753
2022-12-31 17:45:27 -08:00
iceiix 3043b0ab02
Update dependencies: image, flate2
* Bump flate2 to 1.0.25. Closes #748

* Bump image to 0.24.5. Closes #749
2022-12-31 17:23:10 -08:00
iceiix 96ff1c5c15
Update deps: base64 (#745), winit (#744) (#747)
* Update base64 to 0.13.1. Closes #744

* Update winit to 0.27.5. Closes #745

* cargo update
2022-11-25 09:14:37 -08:00
ice_iix ab5f87effd Update to Rust 1.64.0 2022-10-30 15:31:24 -07:00
ice_iix 46535904bc Update to Rust 1.63.0 2022-10-30 15:22:31 -07:00
ice_iix de0891b1da Update to Rust 1.62.0 2022-10-30 15:11:24 -07:00
iceiix 620ff3a167
Update dependencies from dependabot (#742)
* Bump web-sys to 0.3.60. Closes #725
* Bump wasm-bindgen 0.2.83. Closes #726
* Bump reqwest 0.11.12. Closes #728
* Bump image 0.24.4. Closes #730, closes #733
* Bump winit 0.27.4. Closes #736
* Bump zip 0.6.3. Closes #737
* Bump serde_json 1.0.87. Closes #739
* Bump getrandom 0.2.8. Closes #740
* Bump serde 1.0.147. Closes #741
* Bump num-traits 0.2.15. Closes #734
* Update Cargo.lock
2022-10-23 16:57:28 -07:00
iceiix bbbe58a112
Update to Rust 1.59.0 (#718)
* Update to Rust 1.59.0

* Fix clippy::single_char_pattern in console, ui/logo

* Fix clippy::needless_late_init in load_block_entities
2022-08-28 08:27:39 -07:00
iceiix adb71c7caa
Update dependencies: image, serde, serde_json (#707)
* Bump image to 0.24.3. Closes #702

* Bump serde to 1.0.142. Closes #704

* Bump serde_json to 1.0.83. Closes #705
2022-08-06 17:33:27 -07:00
iceiix 2e224a77f9
clipboard: update to fork updating x11-clipboard for xcb (#701)
Using https://github.com/aweinstock314/rust-clipboard/pull/89
2022-07-30 17:11:36 -07:00
iceiix ba3cf43f93
Update dependencies: glutin 0.29, winit 0.27, and more (#700)
* Update to glutin 0.29.0, winit 0.27.0. Closes #695
Change true/false to CursorGrabMode::Locked/None for set_cursor_grab
https://github.com/rust-windowing/winit/releases/tag/v0.27.0
> Breaking: Window::set_cursor_grab now accepts CursorGrabMode to control grabbing behavior.

* Update web-sys to 0.3.59. Closes #699

* Update flate2 to 1.0.24. Closes #698

* Update zip to 0.6.2. Closes #697

* Update to log 0.4.17. Closes #696
2022-07-30 15:54:49 -07:00
iceiix e00e249793
Update dependencies (#694)
* Update rand to 0.8.5. Closes #665

* Update web-sys to 0.3.55. Closes #637

* Update glow to 0.11.2. Closes #641

* Update to structopt 0.3.26. Closes #652

* Update to crossbeam-deque 0.8.2. Closes #680

* Update crossbeam-utils to 0.8.11. Closes #681

* Updaet tokio to 1.16.1. Closes #682

* protocol: Update tokio to 1.19.2. Closes #683, closes #684

* Update reqwest to 0.11.11. Closes #685

* Update getrandom to 0.2.7. Closes #686

* Update wams-bindgen to 0.2.81. Closes #687

* Update serde_json to 1.0.82. Closes #689

* Update serde to 1.0.140. Closes #693
2022-07-30 14:49:30 -07:00
iceiix 2fd10442bb
Update to Rust 1.58.1 (#669) 2022-03-06 14:19:46 -08:00
iceiix 3b43c7661f
Update to Rust 1.58 (#661) (fixes #650)
* Bump Rust version to 1.58

* Update to Rust 1.58 in CI and readme

* Cargo.toml: fix typo for rust-version (https://doc.rust-lang.org/cargo/reference/manifest.html#the-rust-version-field)

Co-authored-by: Ben Reeves <benwolverine2019@gmail.com>
2022-02-05 16:13:51 -08:00
iceiix 21a1b64a14
Merge pull request #639 from iceiix/rust2021
Update to Rust 1.57.0 and 2021 edition
2021-12-24 10:53:27 -08:00
ice_iix 2cec81fd06 Cargo.toml: add minimum supported rust_version 2021-12-24 09:37:01 -08:00
ice_iix a90a6af7c2 Update to Rust 2021 2021-12-24 09:32:56 -08:00
iceiix c8cb29e1fa
Update dependencies: flate2, dirs, structopt, instant, serde... (#636)
* Bump flate2 to 1.0.22. Closes #614

* Bump wasm-bindgen to 0.2.78. Closes #616

* Bump dirs to 4.0.0. Closes #617

* Bump console_error_panic_hook to 0.1.7. Closes #622

* Bump structopt to 0.3.25. Closes #623

* Bump instant to 0.1.12. Closes #624

* Bump serde to 1.0.132. Closes #634

* Bump serde_json to 1.0.73. Closes #633

* Bump reqwest to 0.11.8. Closes #635

* Update Cargo.lock
2021-12-24 09:04:43 -08:00
dependabot[bot] 83bbb9fe4f
gl: Update to glow 0.11.0 (#594)
* gl: update for newtype wrappers Default impl

* build(deps): bump glow from 0.10.0 to 0.11.0

Bumps [glow](https://github.com/grovesNL/glow) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/grovesNL/glow/releases)
- [Commits](https://github.com/grovesNL/glow/commits)

---
updated-dependencies:
- dependency-name: glow
  dependency-type: direct:production
  update-type: version-update:semver-minor
2021-09-01 19:21:49 -07:00
ice_iix 0d5feb9454 build(deps): update serde, wasm-bindgen, web-sys
Bump serde to 1.0.129. Closes #604
Bump wasm-bindgen to 0.2.76. Closes #595
Bump web-sys to 0.3.52. Closes #591
2021-08-29 18:44:00 -07:00
dependabot[bot] 96809a1848
build(deps): bump serde from 1.0.126 to 1.0.127 (#586)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.126 to 1.0.127.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.126...v1.0.127)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-15 18:43:03 -07:00
dependabot[bot] 3eb735eb48
build(deps): bump wasm-bindgen from 0.2.74 to 0.2.75 (#585)
Bumps [wasm-bindgen](https://github.com/rustwasm/wasm-bindgen) from 0.2.74 to 0.2.75.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/compare/0.2.74...0.2.75)

---
updated-dependencies:
- dependency-name: wasm-bindgen
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-15 18:42:54 -07:00
dependabot[bot] a35b9d241f
build(deps): bump serde_json from 1.0.64 to 1.0.66 (#579)
* build(deps): bump serde_json from 1.0.64 to 1.0.66

Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.64 to 1.0.66.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.64...v1.0.66)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* protocol: update to serde_json 1.0.66

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ice_iix <ice_ix@protonmail.ch>
2021-08-01 06:39:35 -07:00
iceiix a25a2382b0
Update to rsa_public_encrypt_pkcs1 0.4.0 (#577)
* Update to rsa_public_encrypt_pkcs1 0.4.0

* cargo update
2021-07-18 17:23:15 -07:00
iceiix fd5290fa4f
Update reqwest, structopt, instant. Closes #561, #574, #574 (#576)
* Update to reqwest 0.11.4. Closes #561
* Update to structopt 0.3.22. Closes #574
* Update to instant 0.1.10. Closes #575
* Update cargo.lock
* protocol: update Cargo.lock
2021-07-18 09:44:37 -07:00
iceiix 9712387ec0
Update to winit 0.25, glutin 0.27. Closes #541 (#546) 2021-07-18 09:07:50 -07:00
ice_iix 26a22750d5 Cargo.toml: split debug info for faster builds
https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#splitting-debug-information
2021-06-18 19:32:26 -07:00
ice_iix e980bfc940 Cargo.toml: use new resolver = 2
https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#cargos-new-feature-resolver
In my testing, the target release binary is 136 bytes smaller (insignificant).
2021-06-18 19:32:26 -07:00
iceiix a48a6f5a99
Update zip, glow, rand, rand_pcg (#557)
* Bump zip to 0.5.13. Closes #551

* Bump glow to 0.10.0. Closes #552

* Bump rand to 0.8.4. Closes #555

* Bump rand_pcg to 0.3.1. Closes #554
2021-06-18 14:01:08 -07:00
iceiix 63c9d81687
Update to glow 0.9.0. Closes #532 (#545) 2021-05-25 08:13:07 -07:00
iceiix 9e570d953d
Update web-sys, getrandom dependencies (#547)
* Bump web-sys to 0.3.51. Closes #543

* Bump getrandom to 0.2.3. Closes #544

* Update Cargo.lock
2021-05-25 08:10:51 -07:00
dependabot-preview[bot] 7611a52374
build(deps): bump wasm-bindgen from 0.2.71 to 0.2.74 (#538)
Bumps [wasm-bindgen](https://github.com/rustwasm/wasm-bindgen) from 0.2.71 to 0.2.74.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/compare/0.2.71...0.2.74)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-05-17 20:24:33 -07:00
iceiix 0563757cb0
Update dependencies: byteorder, reqwest, zip, dirs, serde (#540)
* Bump byteorder to 1.4.3. Closes #522

* Bump reqwest to 0.11.3. Closes #529

* Bump zip to 0.5.12. Closes #530

* Bump dirs to 3.0.2. Closes #533

* Bump serde to 1.0.126. Closes #539

* Update Cargo lock
2021-05-16 21:13:50 -07:00
iceiix abbc58b9ef
deps: update reqwest, wasm-bindgen, serde_json, image (#516)
* Bump reqwest to 0.11.1, closes #504

* Bump wasm-bindgen to 0.2.71, closes #513

* Bump serde_json to 1.0.64, closes #514

* Bump image to 0.23.14, closes #515

* cargo update
2021-03-06 16:47:38 -08:00
iceiix 7dcbac2a5d
Update dependencies: serde, log, rand, flate2, image (#502)
* cargo update all modules

* Bump serde to 1.0.123. Closes #496

* Bump wasm-bindgen to 0.2.70. Closes #497

* Bump log to 0.4.14. Closes #498

* Bump rand to 0.8.3. Closes #499

* Bump flate2 to 1.0.20. Closes #500!

* Bump image to 0.23.13. Closes #501
2021-02-06 13:49:49 -08:00
dependabot-preview[bot] 1a257e2e90
build(deps): bump glow from 0.7.1 to 0.7.2 (#493)
Bumps [glow](https://github.com/grovesNL/glow) from 0.7.1 to 0.7.2.
- [Release notes](https://github.com/grovesNL/glow/releases)
- [Commits](https://github.com/grovesNL/glow/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-21 19:32:43 -08:00
ice_iix d60a495425 deps: update getrandom, serde (#491, #490)
Bump getrandom to 0.2.2, closes #491
Bump serde to 1.0.120, closes #490
2021-01-20 15:29:06 -08:00
iceiix c7bdb60d85
CI enhancements: .app bundling, build .wasm (#486)
Updates to enhance GitHub Actions continuous integration:

* ci: add macOS app bundle packaging using cargo-bundle, closes #352 
based on https://github.com/EndlessSkyCommunity/ESLauncher2/blob/master/Cargo.toml
* ci: add web target, building using wasm-pack (for #446) 
* ci: refactor and cleanup targets, split out instead of using matrix

* main: save config in consistent OS-specific dirs::config_dir()
Instead of storing and loading in the current working directory, change
to a consistent dedicated configuration directory. This is necessary for
.app launching since cwd is set to /. To preserve compatibility with
existing installations, if conf.cfg exists in cwd then it will be used instead,
but otherwise we will use the operating system specific config dirs:
// Lin: Some(/home/alice/.config)
// Win: Some(C:\Users\Alice\AppData\Roaming)
// Mac: Some(/Users/Alice/Library/Application Support)

* macos: add icons based on screenshotted logo
* macos: add Cmd-Q to quit
2021-01-18 19:05:29 -08:00
dependabot-preview[bot] 2f08e14b1c
build(deps): bump rand from 0.8.1 to 0.8.2 (#473)
Bumps [rand](https://github.com/rust-random/rand) from 0.8.1 to 0.8.2.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/0.8.1...0.8.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-15 16:41:07 -08:00
ice_iix bb4fb9eb8b Update byteorder, log, serde dependencies
Bump byteorder to 1.4.2, closes #470
Bump log to 0.4.13, closes #471
Bump serde to 1.0.119, closes #472
2021-01-12 19:13:21 -08:00
iceiix 8bd233c3db
Update reqwest, getrandom, rand (#464)
Update getrandom to 0.2.1. Closes #460
Update rand to 0.8.1. Closes #462
Update reqwest to 0.11.0. Closes #463
2021-01-07 17:29:09 -08:00
dependabot-preview[bot] 98bd7f004b
build(deps): bump serde_json from 1.0.60 to 1.0.61 (#456)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.60 to 1.0.61.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.60...v1.0.61)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-01 08:02:30 -08:00
iceiix 352f1965af
Update rand to 0.8.0, add getrandom js for web (#450)
* Add getrandom with js feature for JavaScript web compatibility

* Update to rand 0.8.0, closes #440

* Update to rand_pcg 0.3.0, closes #434

* Update rsa_public_encrypt_pkcs1 to 0.3.0, updates rand 0.8.0
2020-12-27 16:14:11 -08:00
iceiix 503a98d7a8
Use instant over std::time, for wasm compat (#449)
Replace std::time with the `instant` crate, which bridges to std::time on
native but on wasm calls performance.now() instead of panicking.

A step towards 🕸️ Web support #446

* logo: replace SystemTime/UNIX_EPOCH with Instant
2020-12-27 15:06:03 -08:00
iceiix b8b4cb07a7
Disable multisampled textures, glTexImage2DMultisample (#447)
Steven used multisampled textures from the beginning, but this caused
incompatibilities: https://github.com/Thinkofname/steven/issues/74.
Subsequently fixed by increasing the number of samples, but increasing
it beyond the limit caused more incompatibilities, so it was clamped to
the maximum samples reported as supported by the system.

Fast-forward to now, as part of adding WebGL support (#446), the use of
multisampled textures via the glTexImage2DMultisample() call is
unsupported on this platform. Replace the following:

* glTexImage2DMultisample -> glTexImage2D
* TEXTURE_2D_MULTISAMPLE -> TEXTURE_2D
* sampler2DMS -> sampler2D

This disables the custom multisampling anti-aliasing algorithm (MSAA)
implemented in the chunk fragment shader, increasing compatibility:

* Update to glow release, remove image_2d_sample()

MSAA may be added back at a later date using multisampled renderbuffers
instead, see #442.
2020-12-27 10:14:39 -08:00
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
iceiix 0aa062f4b8
Use glow, GL on Whatever (#262)
Replaces the use of gl_generator with the glow wrapper:

* Add glow dependency, based on glow 0.6.1

* Pin version of glow fork for https://github.com/iceiix/glow/pull/1 until #442 renderbuffer

* Remove gl module, steven_gl

Porting details:
* Initialize glow in src/gl/mod.rs
* Call gl methods on glow context
* glow uses camelcase
* Import glow::HasContext trait, finds draw_elements etc.
* Fix mismatched types, glow uses Option and &str instead of raw pointers
* Fix uniform_location, glow already returns Some(u32)
* uniform_location: convert i32 to u32 for Uniform
* Fix attribute_location
* Fix shader creation Result u32 type 
* Fix passing GLvoid and 2d/3d
* Fix missing Options type mismatches
* Offsets are i32 in glow, not GLvoid
* Fix clear_buffer using _f32_slice
* Delete methods are singular not plural
* glBufferData -> buffer_data_u8_slice
* buffer_sub_data_u8_slice
* Update more glow method wrapper names found by reviewing glow native platform
* Remove unused multi_draw_elements, can be replaced by draw_elements in a loop and it has no WebGL equivalent
* glow implements glMapBufferRange
* Remove unused read_buffer
* glow's deletes automatically pass 1 and take no reference
* shader_source() accepts &str directly; removes last of std::ptr
* Pass uniform Option<u32>
* Fix bool passing normalized parameter
* Fix draw_buffers parameter
* Stop unnecessarily returning context from gl::init
* Getting shader info is unsafe 
* Unwrapping static mut is unsafe
* Use unsafe raw pointers for global mutable context
* Fix initializing GL objects wrappers from glow wrappers
* Unbinding framebuffers uses None
* Uppercase global to fix warning
* Shaders return Some instead of None
* Unbox the context to a raw pointer
* Use tex_image_2d_multisample added in glow fork 
* Implement uniform_location, fixing unwrap None failed
* Add tex_sub_image_3d, using PixelUnpackData::Slice
* set_matrix4: transmute the Matrix4 since it is repr(C)
* get_pixels -> get_tex_image -> glGetTexImage, with PixelPackData::Slice
* Wrap sub_image_2d (glTexSubImage2D) and fix warnings
* Implement set_float_multi_raw and set_matrix4_multi, using from_raw_parts
2020-12-25 10:00:22 -08:00
iceiix 9bc10c1100
Update to glutin 0.26.0 + winit 0.24.0 (#334)
* Update for ModifiersChanged event

* Consistently use logical position and size

CursorMoved gives us a PhysicalPosition, which needs to be converted
to LogicalPosition to properly track the mouse movement. Change the
width/height passed to be a LogicalSize instead of a PhysicalPosition,
matching the LogicalPosition.
2020-12-20 08:18:39 -08:00
ice_iix 5d0fb7fa64 Update dependencies: reqwest, serde/json, structopt...
Closes #425 build(deps): bump wasm-bindgen from 0.2.68 to 0.2.69
Closes #426 build(deps): bump structopt from 0.3.20 to 0.3.21
Closes #427 build(deps): bump serde_json from 1.0.59 to 1.0.60
Closes #428 build(deps): bump serde from 1.0.117 to 1.0.118
Closes #433 build(deps): bump reqwest from 0.10.9 to 0.10.10
2020-12-19 17:48:13 -08:00
ice_iix f3faae383e Bump image to 0.23.12 (closes #422) 2020-11-24 19:02:18 -08:00
ice_iix da137ca9b4 Update deps: cfg-if, serde/_json, structopt...
Bump cfg-if to 1.0.0 (closes #412)
Bump serde to 1.0.117 (closes #416)
Bump serde_json to 1.0.59 (closes #413)
Bump structopt to 0.3.20 (closes #414)
Bump flate2 to 1.0.19 (closes #420)
Bump reqwest to 0.10.9 (closes #423)
2020-11-24 19:02:18 -08:00
ice_iix ab4600011d Update image and base64 dependencies
Closes #396 bump image from 0.23.6 to 0.23.10
Closes #404 bump base64 from 0.12.3 to 0.13.0
2020-10-10 12:39:44 -07:00
ice_iix d9399015cd Update deps: log, reqwest, serde_json, flate2, structopt...
Closes #372 bump log from 0.4.8 to 0.4.11
Closes #387 bump reqwest from 0.10.6 to 0.10.8
Closes #391 bump wasm-bindgen from 0.2.64 to 0.2.68
Closes #403 bump serde_json from 1.0.56 to 1.0.58
Closes #405 bump flate2 from 1.0.16 to 1.0.18
Closes #409 bump structopt from 0.3.15 to 0.3.19
2020-10-10 12:04:21 -07:00
ice_iix f5f61e071e Update flate2, serde_json, wasm-bindgen; +gl/protocol
Bump flate2 to 1.0.16, closes #350
Bump serde_json to 1.0.56, closes #349
Bump wasm-bindgen to 0.2.64, closes #348
gl: Bump libc to 0.2.71
protocol: Bump hex to 0.4.2
protocol: Bump aes to 0.4.0
protocol: Bump cfb8 to 0.4.0
protocol: Bump num-traits to 0.2.12
2020-07-05 08:45:34 -07:00
ice_iix 287fb3feca Update sha-1 dependency to 0.9.1. Closes #342
* Remove unused top-level sha-1 dependency since it was moved to the
protocol crate
2020-06-28 09:15:01 -07:00
ice_iix c167d70aea Update serde and base64 dependencies
Update to serde 1.0.114, closes #340
Update to base64 0.12.3, closes #341
2020-06-28 09:02:38 -07:00
ice_iix 41f8be6b90 Update to image 0.23.6, closes #333 2020-06-20 15:04:59 -07:00
iceiix a6bff21de8
Update to glutin 0.22.0 and winit 0.20.0 release (#268)
Thanks to @mwkroening (#317) and @martijnberger (#323) for helping fix this update.

* Update to glutin 0.22.0 and winit 0.20.0 release, removing alpha pinning

* scale_factor() replaces hidpi_factor()

* Listen for ScaleFactorChanged, separate from Resized event

* Fix getting physical size of window

* Fix logical mouse event coordinates
2020-06-20 13:55:45 -07:00
ice_iix 9b2147c895 Update structopt, base64, zip, serde_json, reqwest, flate2, byteorder
Update to structopt 0.3.15, closes #330
Update to base64 0.12.2, closes #329
Update to zip 0.5.6, closes #328
Update to serde_json 1.0.55, closes #327
Update to reqwest 0.10.6, closes #321
Update to flate2 1.0.14, closes #303
Update to byteorder 1.3.4, closes #285
2020-06-20 11:49:21 -07:00
ice_iix dece047cd7 Remove clipboard crate git dependency, back to 0.5.0
The git dependency was only for wasm32-unknown-emscripten support:
https://github.com/aweinstock314/rust-clipboard/pull/62
but #92 changes to using wasm32-unknown-unknown instead, a better
supported path (though still incomplete in this project, see #171)
2020-02-02 08:29:20 -08:00
ice_iix ed7f06b1a8 Update deps: serde_json, structopt, image, rand, num-traits, reqwest
Closes #276 Bump serde_json from 1.0.44 to 1.0.45
Closes #274 Bump structopt from 0.3.7 to 0.3.8
Closes #273 Bump image from 0.22.3 to 0.22.4
Closes #272 Bump rand from 0.7.2 to 0.7.3
Closes #270 Bump num-traits from 0.2.10 to 0.2.11
Closes #269 Bump reqwest from 0.10.0 to 0.10.1
2020-02-02 08:19:15 -08:00
ice_iix bda0009a6f Add Cargo.toml for new steven_protocol crate. Closes #167 (#278)
Completes the move of the protocol implementation into a new
crate, named steven_protocol, in the protocol/ subdirectory.

* Add Cargo.toml for steven_protocol

* Add steven_protocol entrypoint in protocol/src/lib.rs

* Use steven_protocol in main

* Remove protocol in main, replaced by steven_protocol

* Remove unused dependencies moved into steven_protocol
2020-02-02 07:47:11 -08:00
iceiix 87e0726f3f
blocks: split macro into multiple functions, fast! (#267)
Improves fix for #184, whereas #255 reduced optimizations,
we now address the underlying compiler limitation and split out
the one massive lazy_static! initialization function, into
one function per block in the block_registration_functions module.

Previous build time, with opt-level=1:

% time cargo build --release
   Compiling steven_blocks v0.0.1
    Finished release [optimized] target(s) in 21.24s
cargo build --release  31.80s user 0.71s system 152% cpu 21.276 total

With this change, opt-level=3 and the function splitting fix:

% time cargo build --release
   Compiling steven_blocks v0.0.1
    Finished release [optimized] target(s) in 30.80s
cargo build --release  40.26s user 0.86s system 133% cpu 30.850 total

Full optimizations are expectedly slightly slower, but this is still
much much _much_ faster than before this refactoring, where this crate
would take up to an unbelievable 5 hours (and tens of GB of RAM). Long
story short, we're now back to full optimizations and stable Rust.

Thanks to dtolnay on the Rust programming language forum for suggesting
this technique, https://users.rust-lang.org/t/5-hours-to-compile-macro-what-can-i-do/36508/2
2020-01-09 20:08:28 -08:00
ice_iix 90f7d9afd9 Update sha-1 and zip dependencies
Closes #263 Bump sha-1 from 0.8.1 to 0.8.2
Closes #265 Bump zip from 0.5.3 to 0.5.4
2020-01-07 19:31:10 -08:00
iceiix a020ed6f2c
Update to glutin 0.22.0-alpha5, remove wasm_stub (#260)
Update from glutin 0.21.x fork to glutin 0.22.0-alpha5 and corresponding
compatible version of winit. This removes our custom temporary wasm_stub
branches, back to mainline glutin and winit, and is a step towards WebAssembly
compatibility, most importantly merging the game loop and event loops as
required by winit _which now supports wasm_. Not yet functional on the web
because other web dependencies have to be added, see #171 and #34, but native
functionality is preserved.

* Update for 0.22 glutin API changes:

* Move game logic into event loop, run() replacing poll_events()

* Specify fullscreen Borderless mode

* Pass generic parameter of Event through handle_window_event
* hidpi_factor() replaces get_hidpi_factor()
* with_inner_size() replaces with_dimensions()
* No longer need to unwrap() LogicalSize
* set_cursor_grab/visible() replaces grab/hide_cursor()

* Fix modifiers deprecated warnings by destructuring only event fields we use, ignoring the rest with '..'

* Remove unnecessary mutability from events_loop

* Listen for ModifiersChanged event, fixing deprecated modifiers field

* Change to stdweb for web backend, replacing web-sys

* Pin to glutin =0.22.0-alpha5 and winit =0.20.0-alpha6
2020-01-05 17:56:32 -08:00
iceiix 8ab981f3ad
Update to reqwest 0.10.0. Closes #259
* Bump reqwest from 0.9.22 to 0.10.0

* Use blocking reqwest API instead of futures, for now
2020-01-05 10:38:21 -08:00
ice_iix b307843d2b Change to PCG random number generator algorithm
See http://www.pcg-random.org/ for benefits of PCG over xorshift
Updates #236 #183
2020-01-05 10:01:44 -08:00
ice_iix 6c32fce5a3 Update rand to 0.7.2 and rand_xorshift 0.2.0. Closes #236, closes #183 2020-01-05 09:49:03 -08:00
ice_iix cfbcf71b40 Bump image from 0.21.3 to 0.22.3. Closes #238 2020-01-05 09:10:59 -08:00
ice_iix 3f5f02db93 Update dependencies: base64, flate2, num-traits, and more (#257)
* Closes #237 Bump base64 from 0.10.1 to 0.11.0

* Closes #241 Bump flate2 from 1.0.12 to 1.0.13

* Closes #245 Bump num-traits from 0.2.8 to 0.2.10

* Closes #248 Bump serde_json from 1.0.41 to 1.0.44

* Closes #249 Bump serde from 1.0.102 to 1.0.104

* Closes #251 Bump web-sys from 0.3.30 to 0.3.33

* Closes #254 Bump structopt from 0.3.3 to 0.3.7

* Bump cfg-if from 0.1.9 to 0.1.10

* `cargo update` all modules
2020-01-05 08:00:55 -08:00
ice_iix e04ee876f3 Nightly rust, steven_blocks: reduce optimizations in release. Fixes #184 (#255)
Reduce to "basic optimizations" for the steven_blocks module, so it
doesn't take hours of time and gigabytes of memory to compile. The main
program and other code still builds with full optimizations in release
mode, to accomplish this, the profile-overrides feature is required so
we also switch to nightly Rust (to be switched to 1.41+ in #258).

* Update to rustc 1.42.0-nightly (760ce94c6 2020-01-04)

* Update builds.sr.ht to use +nightly

* Override opt-level=1 for steven_blocks using profile-overrides
2020-01-05 07:16:10 -08:00
ice_iix 3946f22863 Update serde, image, hex, lazy_static, structopt..
* serde 1.1.0.2, closes #233
* image 0.21.3, closes #221
* hex 0.4.0, closes #225
* lazy_static 1.4.0, closes #217
* structopt 0.3.3, closes #231
  * Requires rustc 1.36+, updated in previous commit
* reqwest 0.9.22, closes #230
* cargo update, closes #219
2019-11-02 14:24:50 -07:00
ice_iix 80006d9212 Update web-sys, zip, flate2 dependencies
Closes #209 Bump web-sys from 0.3.25 to 0.3.26
Closes #210 Bump zip from 0.5.2 to 0.5.3
Closes #211 Bump flate2 from 1.0.9 to 1.0.11
2019-08-17 13:34:32 -07:00
ice_iix 862c40c59d Update dependencies: web-sys, reqwest, log, serde
Closes #196 Bump web-sys from 0.3.24 to 0.3.25
Closes #200 Bump reqwest from 0.9.18 to 0.9.19
Closes #202 Bump log from 0.4.6 to 0.4.8
Closes #203 Bump serde from 1.0.94 to 1.0.98
2019-08-11 16:18:57 -07:00
ice_iix 8c0350eb7c Update web-sys, flate2, structopt, serde/json, and minor deps
Closes #187 Bump web-sys from 0.3.22 to 0.3.24
Closes #188 Bump flate2 from 1.0.7 to 1.0.9
Closes #189 Bump structopt from 0.2.16 to 0.2.18
Closes #190 Bump serde from 1.0.92 to 1.0.94
Closes #192 Bump serde_json from 1.0.39 to 1.0.40

`cargo update` updates smallvec (and others) used by collision:
Closes #193 [Security] Bump smallvec from 0.6.9 to 0.6.10
2019-07-02 19:08:50 -07:00
ice_iix 115560ce82 Update byteorder, serde, image, reqwest
Closes #181, closes #178, closes #179, closes #180
2019-06-10 17:09:19 -07:00
dependabot-preview[bot] f52913ee86 Bump structopt from 0.2.15 to 0.2.16 (#172)
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.2.15 to 0.2.16.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.2.15...v0.2.16)
2019-05-31 09:24:49 -07:00
iceiix 836ab9f126
wasm: Fix operation not supported on std::fs. Closes #115 (#166)
* Add new web-based std::fs replacement, localstoragefs:

https://github.com/iceiix/localstoragefs

* Add std_or_web to switch between std::fs (native) or localstoragefs (web)

* Update www readme for new missing glutin/winit links, opens issue #171
2019-05-29 08:21:56 -07:00
ice_iix 3eee3e9163 Fix dual-license MIT/Apache-2.0 syntax in Cargo.toml 2019-05-29 08:13:38 -07:00
dependabot-preview[bot] ef334643cc Bump num-traits from 0.2.7 to 0.2.8 (#165)
Bumps [num-traits](https://github.com/rust-num/num-traits) from 0.2.7 to 0.2.8.
- [Release notes](https://github.com/rust-num/num-traits/releases)
- [Changelog](https://github.com/rust-num/num-traits/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-traits/compare/num-traits-0.2.7...num-traits-0.2.8)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-24 19:00:29 -07:00
dependabot[bot] 51aa361bbc Bump num-traits from 0.2.6 to 0.2.7 (#162)
Bumps [num-traits](https://github.com/rust-num/num-traits) from 0.2.6 to 0.2.7.
- [Release notes](https://github.com/rust-num/num-traits/releases)
- [Changelog](https://github.com/rust-num/num-traits/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-traits/compare/num-traits-0.2.6...num-traits-0.2.7)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-22 17:29:39 -07:00
ice_iix c6b753bc9a Update to patched glutin wasm_stub allowing compiling for wasi
Includes 1e48d3216e

Progress towards #115, fixes the missing glutin symbols when compiling
with cargo +nightly build --target wasm32-wasi
2019-05-22 17:28:27 -07:00
iceiix fd7add3f17
wasm: log output to browser JavaScript console (#163)
Logging from the `log` facade goes to the colorized in-game GUI console (opened with the backtick key), as well as standard output using `println!` on the native build. To make this work on the wasm build, web-sys is used to access the `console` object, to call `console.log`, `console.warn`, and so on corresponding to the log levels. Extends #92, fails later (see also #115) but now outputs the starting up message:

[main.rs:206][INFO] Starting steven

* Add println! logging to console.log on wasm

* Initialize logger before config (called 'console variables' for some reason) to avoid having to disable it to reach the first logging statement

* Add web-sys crate for browser console access, wasm32-only

* Refactor logger to call println_level on both web/native

* Add multiple log levels, console.warn etc., matching console_log crate

https://github.com/iamcodemaker/console_log#details
2019-05-22 16:12:43 -07:00
iceiix 8071db668c
Update to glutin 0.21.0. Closes #157 (#160)
Updating the glutin dependency to a 0.21.0-based branch, based on the migration guide at:
https://gentz.rocks/posts/glutin-v0-21-0-migration-guide/

* Remove glutin::ContextTrait

* Create window with ContextBuilder instead of WindowedContext::new

* Add .window() accessor on WindowContext, since it now dereferences to Context

In order to not break wasm32-unknown-unknown compilation, a minor fork is used of glutin v0.21.0 and a corresponding version of winit: https://github.com/iceiix/glutin/pull/1 https://github.com/iceiix/winit/pull/2
 - with stubs to compile (but not run, see issue #115)
2019-05-19 17:58:08 -07:00
dependabot[bot] 381815ce22 Bump reqwest from 0.9.16 to 0.9.17 (#158)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.16 to 0.9.17.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.16...v0.9.17)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-19 11:35:47 -07:00
dependabot[bot] f8e59a74bb Bump wasm-bindgen from 0.2.43 to 0.2.44 (#159)
Bumps [wasm-bindgen](https://github.com/rustwasm/wasm-bindgen) from 0.2.43 to 0.2.44.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-19 11:35:09 -07:00
dependabot[bot] b244406850 Bump cfg-if from 0.1.7 to 0.1.9 (#154)
Bumps [cfg-if](https://github.com/alexcrichton/cfg-if) from 0.1.7 to 0.1.9.
- [Release notes](https://github.com/alexcrichton/cfg-if/releases)
- [Commits](https://github.com/alexcrichton/cfg-if/compare/0.1.7...0.1.9)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-15 07:57:45 -07:00
iceiix c8e13c38bd Fix movement fixed-point packets, misplaced players on 1.7/8 (#140)
Movement packets were handled incorrectly, because although the fields are specified as integers they are actually fixed-point values, which need to be converted to floating-point before use. These fields were converted with `as f64`, but they actually need to be scaled. To fix this add several new types, FixedPoint5 for 5-bit fractional fixed-point and FixedPoint12 for 12-bit. Both are parameterized by an integer type: FixedPoint5<i32> and FixedPoint5<i8> for 1.7.10/1.8.9, FixedPoint12<i16> for 1.9+. This moves the calculation into the packet field parsing, so it no longer has to be calculated in src/server/mod.rs since the scaling is taken care of as part of the field type. This fixes the long-standing invisible or actually misplaced players bug on 1.7.10 and 1.8.9, closes #139.

* Add new FixedPoint5<T> type for 1.7/8, https://wiki.vg/Data_types#Fixed-point_numbers

* Add FixedPoint12<i16> for 1.9+, moving type conversion into packet type

https://wiki.vg/index.php?title=Protocol#Entity_Relative_Move

* Add num-traits 0.2.6 dependency for NumCast to use instead of From

* Use FixedPoint5<i32> in spawn object, experience orb, global entity, mob, player, teleport

* Use FixedPoint5<i8> and FixedPoint12<i16> in entity move, look and move

* Update packet handling bouncer functions, using f64::from for each conversion
2019-05-11 13:28:25 -07:00
iceiix 185f3d0297
Update cgmath and collision. Closes #97, closes #126 (#138)
* Update cgmath and collision. Closes #97, closes #126

* Update steven_blocks cgmath/collision

* Run cargo update
2019-05-10 15:39:56 -07:00
ice_iix 99a4e77a11 Update wasm-bindgen and cargo update. Closes #133 2019-05-08 20:01:06 -07:00
ice_iix b1cae32eed Update to rand 0.6.5 and migrate off deprecated methods. Closes #81
* Import from rand_xorshift crate

* Use shuffle/choose from SliceRandom trait

See https://rust-random.github.io/book/update-0.6.html
2019-05-08 19:32:05 -07:00
dependabot[bot] 68bf0970a3 Bump serde from 1.0.90 to 1.0.91 (#137)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.90 to 1.0.91.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.90...v1.0.91)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-07 18:51:41 -07:00
iceiix 047ba79947
Add command-line arguments parsing, --server (#90) (#114)
* Add structopt dependency

* Add command-line --server argument to connect to server on startup

* Don't show login/server screen (which pings servers) when connecting to a server from command-line
2019-05-04 18:36:22 -07:00
ice_iix 0d02759d46 Update image, reqwest dependencies. Closes GH-130, closes GH-131 2019-04-30 19:18:27 -07:00
ice_iix 1e848d957b Update cfg-if, cfb8, flate2, serde, zip
Closes #116 Bump cfg-if from 0.1.6 to 0.1.7
Closes #120 Bump cfb8 from 0.3.1 to 0.3.2
Closes #122 Bump flate2 from 1.0.6 to 1.0.7
Closes #124 Bump serde from 1.0.89 to 1.0.90
Closes #127 Bump zip from 0.5.0 to 0.5.2
2019-04-13 08:16:42 -07:00
ice_iix 0d5c1478a5 Update for glutin wasm_stub branch tracking Rust 2018 changes
c0b36056bd
https://github.com/iceiix/glutin/pull/1
2019-03-03 11:50:52 -08:00
iceiix 2f2f35848a
Add support for compiling WebAssembly wasm32-unknown-unknown target (#92)
Note this only is the first step in web support, although the project compiles, it doesn't run!

Merging now to avoid branch divergence, until dependencies can be updated for wasm support.

* Add instructions to build for wasm32-unknown-unknown with wasm-pack in www/

* Update to rust-clipboard fork to compile with emscripten

https://github.com/aweinstock314/rust-clipboard/pull/62

* Exclude reqwest dependency in wasm32

* Exclude compiling clipboard pasting on wasm32

* Exclude reqwest-using code from wasm32

* Install wasm target with rustup in Travis CI

* Update to collision 0.19.0

Fixes wasm incompatibility in deprecated rustc-serialize crate: https://github.com/rustgd/collision-rs/issues/106

error[E0046]: not all trait items implemented, missing: `encode`
    --> github.com-1ecc6299db9ec823/rustc-serialize-0.3.24/src/serialize.rs:1358:1

* Increase travis_wait time even further, try 120 minutes

* Set RUST_BACKTRACE=1 in main

* Remove unused unneeded bzip2 features in zip crate

To fix wasm32-unknown-unknown target compile error:
error[E0432]: unresolved imports `libc::c_int`, `libc::c_uint`, `libc::c_void`, `libc::c_char`
 --> src/github.com-1ecc6299db9ec823/bzip2-sys-0.1.7/lib.rs:5:12
  |
5 | use libc::{c_int, c_uint, c_void, c_char};
  |            ^^^^^  ^^^^^^  ^^^^^^  ^^^^^^ no `c_char` in the root
  |            |      |       |
  |            |      |       no `c_void` in the root
  |            |      no `c_uint` in the root
  |            no `c_int` in the root

* flate2 use Rust backend

* Add console_error_panic_hook module for wasm backtraces

* Build using wasm-pack, wasm-bindgen, run with wasm-app

* Update to miniz_oxide 0.2.1, remove patch for https://github.com/Frommi/miniz_oxide/issues/42

* Update to official clipboard crate since https://github.com/aweinstock314/rust-clipboard/pull/62 was merged, but git revision pending release

* Update to branch of glutin attempting to build for wasm

https://github.com/iceiix/glutin/pull/1

* Update winit dependency of glutin to git master

https://github.com/iceiix/winit/pull/2

* Update to glutin branch with working (compiles, doesn't run) wasm_stub

* Add app name in title on web page

* Add wasm to Travis-CI test matrix

* Update glutin to fix Windows EGL compilation on AppVeyor

97797352b5
2019-03-03 08:32:36 -08:00
ice_iix 13fbbaa80a Add recommended Cargo.toml description/repository/license fields
[INFO]: Optional fields missing from Cargo.toml: 'description', 'repository', and 'license'. These are not necessary, but recommended
2019-03-03 07:13:10 -08:00
ice_iix d4e3f9f3da Update serde and serde_json versions
Closes #112 Bump serde_json from 1.0.38 to 1.0.39
Closes #113 Bump serde from 1.0.88 to 1.0.89
2019-03-02 15:20:03 -08:00
ice_iix 86b1c940ee Update to glutin unreleased post-0.19.0 git revision, current master 2019-03-02 15:17:45 -08:00