Commit Graph

6547 Commits

Author SHA1 Message Date
Forest Anderson
7bb038e474 Remove git filter repo 2021-02-19 08:55:10 -05:00
Marcel
e6517db945 Merge branch 'xMAC94x/quick_net_fix' into 'master'
fix main thread blocking which was a bad combination of

See merge request veloren/veloren!1793
2021-02-18 19:26:43 +00:00
Marcel Märtens
6d24c4e1a0 fix main thread blocking which was a bad combination of
- a channel was stale and wasn't shut down propertly AS WELL AS
 - the msg ingoing pipe was bounded, so it could fill up

To mitigate this we
 a) unbounded the pipe
 b) stoped spam the log in no channel case
 c) instead of ever reaching "no channel" state we actually shutdown participant
 d) when send_mgr is closed it will no longer be able to SEND on streams
2021-02-18 20:00:07 +01:00
Marcel
0f633e7b7c Merge branch 'xMAC94x/network_tokio' into 'master'
xMAC94x/network_tokio switch from `async_std` to `tokio`

See merge request veloren/veloren!1789
2021-02-17 22:47:11 +00:00
Samuel Keiffer
92b7657c0f Merge branch 'cherry-pick-2ef5fb90' into 'master'
Fix missing controller actions

See merge request veloren/veloren!1786
2021-02-17 21:10:14 +00:00
Ada Lovegirls
540635ed99 Fixed missing controller actions
(cherry picked from commit 2ef5fb90e89bf3f8f0acc84e269f6948c696c196)
2021-02-17 21:10:14 +00:00
Marcel Märtens
048fcf88f8 Stabelize Network again:
- completly switch to Bytes, even in api. speed up TCP by fak 2
 - improve benchmarks
 - speed up mpsc metrics
 - gracefully handle shutdown by interpreting Ok(0) as tokio::tcpstream closed now.
 - fix hotloop in participants by adding `Some(n)` to fix endless handing.
 - fix closing bug by closing streams after `recv_mgr` is shutdown even if now shutdown is triggered locally.
 - fix prometheus
 - no longer throw when a `Stream` is dropped while participant still receives a msg for it.
 - fix the bandwith handling, TCP network send speed is up to 1.5GiB/s while recv is 150MiB/s
 - add documentation
 - tmp require rt-multi-threaded in client for tokio, to not fail cargo check

this is prob stable, i tested over 1 hour.
after that some optimisations in priomgr.
and impl. propper bandwith.
Speed is up to 2GB/s write and 150MB/s recv on a single core

sync add documentation
2021-02-17 19:37:48 +01:00
Marcel Märtens
00386b6955 Great improvements to the codebase:
- better logging in network
 - we now notify the send of what happened in recv in participant.
 - works with veloren master servers
 - works in singleplayer, using a actual mid.
 - add `mpsc` in whole stack incl tests
 - speed up internal read/write with `Bytes` crate
 - use `prometheus-hyper` for metrics
 - use a metrics cache
2021-02-17 16:15:00 +01:00
Marcel Märtens
33085f1645 COMPLETE REDESIGN of network crate
- Implementing a async non-io protocol crate
    a) no tokio / no channels
    b) I/O is based on abstraction Sink/Drain
    c) different Protocols can have a different Drain Type
       This allow MPSC to send its content without splitting up messages at all!
       It allows UDP to have internal extra frames to care for security
       It allows better abstraction for tests
       Allows benchmarks on the mpsc variant
       Custom Handshakes to allow sth like Quic protocol easily
 - reduce the participant managers to 4: channel creations, send, recv and shutdown.
   keeping the `mut data` in one manager removes the need for all RwLocks.
   reducing complexity and parallel access problems
 - more strategic participant shutdown. first send. then wait for remote side to notice recv stop, then remote side will stop send, then local side can stop recv.
 - metrics are internally abstracted to fit protocol and network layer
 - in this commit network/protocol tests work and network tests work someway, veloren compiles but does not work
 - handshake compatible to async_std
2021-02-17 12:39:47 +01:00
Marcel Märtens
13bf418794 fix most unittests (not all) by a) dropping network/participant BEFORE runtime and by transfering a expect into a warn! in the protocol 2021-02-17 12:38:58 +01:00
Marcel Märtens
13276a6d00 get rid of async_std::channel
switch to `tokio` and `async_channel` crate.
I wanted to do tokio first, but it doesnt feature Sender::close(), thus i included async_channel
Got rid of `futures` and only need `futures_core` and `futures_util`.

Tokio does not support `Stream` and `StreamExt` so for now i need to use `tokio-stream`, i think this will go in `std` in the future

Created `b2b_close_stream_opened_sender_r` as the shutdown procedure does not need a copy of a Sender, it just need to stop it.

Various adjustments, e.g. for `select!` which now requieres a `&mut` for oneshots.

Future things to do:
 - Use some better signalling than oneshot<()> in some cases.
 - Use a Watch for the Prio propergation (impl. it ofc)
 - Use Bounded Channels in order to improve performance
 - adjust tests coding

bring tests to work
2021-02-17 12:38:53 +01:00
Marcel Märtens
88620c804a Initial switch to tokio for network, minimum working example. 2021-02-17 12:37:59 +01:00
Marcel
498de2703f Merge branch 'update_deps' into 'master'
Clean and update dependencies

See merge request veloren/veloren!1780
2021-02-17 10:41:24 +00:00
Caelan
86d1b00735 Clean and update dependencies
* Remove tweak feature
 * Remove const-tweaker
 * Update tiny_http
 * Update bitvec to 0.21.0
 * Downgrade euc to avoid conflict with vek 0.12.0
 * Require exactly vek 0.12.0
 * Update all other dependencies automatically based on these changes
 * Update gilrs to latest at the request of Ada Lovegirls
 * Update meshing benchmarks to new criterion API
2021-02-17 01:27:06 -08:00
Imbris
dcd7031401 Merge branch 'nwildner/update_pt_BR_translation' into 'master'
update pt_BR translation and adopt multifile translation format

See merge request veloren/veloren!1777
2021-02-17 08:28:04 +00:00
Nícolas Wildner
0e697432b2 creating char_selection.ron plus minor portuguese fixes for better formal language (like olhos - eyes and not olho) 2021-02-17 08:28:04 +00:00
Imbris
990f240a98 Merge branch 'TheThirdSpartan/chat-fixes' into 'master'
Small chat message formatting changes and fixed missing player alias during admin entity possession

See merge request veloren/veloren!1782
2021-02-17 02:15:46 +00:00
TheThirdSpartan
6b236cbc30 Small chat message formatting changes and fixed missing player alias during admin entity possession 2021-02-17 02:15:45 +00:00
Imbris
fcce219462 Merge branch 'huettner94/minimap_settings_persistence' into 'master'
Persist minimap settings

See merge request veloren/veloren!1785
2021-02-17 00:57:07 +00:00
Joshua Barretto
2706ccd675 Merge branch 'lboklin/quat-ori' into 'master'
Redefine Ori as a quaternion

See merge request veloren/veloren!1755
2021-02-16 22:39:11 +00:00
Felix Huettner
c2e298381e Persist minimap settings
This change persists the open/close state as well as the facing-north
state of the minimap to the settings file.
2021-02-16 23:16:16 +01:00
Imbris
3572dbd6ff Merge branch 'huettner94/minimap_rotation' into 'master'
Allow minimap to always face north

See merge request veloren/veloren!1784
2021-02-16 22:04:48 +00:00
Imbris
578f4adf49 Merge branch 'quellus/max-name-length' into 'master'
Limit character name length

Closes #528

See merge request veloren/veloren!1774
2021-02-16 21:29:45 +00:00
Quellus
ca66b2880b Limit character name length 2021-02-16 21:29:45 +00:00
Felix Huettner
e9e709758a Allow minimap to always face north
Some players prefer their minimap to always face north for better
orientation.
2021-02-16 19:57:19 +01:00
Joshua Barretto
fd8d920b20 Merge branch 'ada/improve-controller-bindings' into 'master'
Improve controller keybindings

See merge request veloren/veloren!1779
2021-02-16 16:56:42 +00:00
Ada Lovegirls
483bd4aaca Merge branch 'master' into 'ada/improve-controller-bindings'
# Conflicts:
#   CHANGELOG.md
2021-02-16 15:30:46 +00:00
Joshua Barretto
e9d99c66cf Merge branch 'synis/fix-underwater-campfires' into 'master'
Synis/fix underwater campfires

See merge request veloren/veloren!1783
2021-02-16 14:59:04 +00:00
Synis
c5b934725a Added changelog entry 2021-02-16 13:26:40 +01:00
Synis
cb6d656d42 Waypoints are no longer placed underwater 2021-02-16 13:23:12 +01:00
Joshua Barretto
92bc0d98e5 Merge branch 'Quibble/boss-stairs-fix' into 'master'
Fix #689 - dungeon without stairs to boss floor

Closes #689

See merge request veloren/veloren!1781
2021-02-16 02:59:05 +00:00
Samuel Keiffer
9226d92cd1 Merge branch 'aweinstock/item-tags' into 'master'
Implement tags for items, allowing a crafting recipe to take any item with that tag as input.

See merge request veloren/veloren!1778
2021-02-16 01:05:54 +00:00
Avi Weinstock
d4907197b3 Implement tags for items, allowing a crafting recipe to take any item with that tag as input.
- Added a recipe that turns any of the cloth equipment dropped by villagers into 1x cloth scraps.
- Animate placeholder items for tagged crafting.
2021-02-16 01:05:54 +00:00
Lippy13
4a96334b4f Fix #689 - dungeon without stairs to boss floor 2021-02-16 00:54:44 +00:00
Ludvig Böklin
ff4ae85262 Use nlerp for interpolating rotations in animation 2021-02-15 11:01:59 +01:00
AdaLovegirls
68d557dbd4 Improve controller keybindings 2021-02-14 21:31:31 -06:00
Imbris
81d8b72822 Merge branch 'aweinstock/trade-implementation' into 'master'
Aweinstock/trade implementation

See merge request veloren/veloren!1775
2021-02-14 19:16:52 +00:00
Avi Weinstock
f86f22f0e8 MR 1775 review fixes.
- Separate `invite` machinery from `group_manip` into it's own thing (includes renaming `group_invite` to `invite` where applicable).
- Move some invite/trade machinery to `ControlEvent`.
- Make `TradePhase` a proper enum instead of a bunch of bools.
- Make `TradeId` a proper newtype.
- Remove trades from `Trades` on accept (previously was only on decline).
- Typo fixes/misc cleanup.
- Add bullet point for trading to the changelog.
2021-02-14 11:13:56 -05:00
Avi Weinstock
a1176284d2 Polish trading implementation and address review comments.
- Fix item swapping edge case
- Document more assumptions/edge cases
- fmt and clippy
- s/ServerGeneral::GroupInvite/ServerGeneral::Invite/
- Use `Client::current` in `Client::is_dead`
2021-02-14 11:11:35 -05:00
Joshua Barretto
bf0c9b05ac Merge branch 'snowram/fix-staicases-lights' into 'master'
Fixes lights positions and orientations in staircases

See merge request veloren/veloren!1776
2021-02-14 01:17:53 +00:00
Snowram
4200948407 Fixes lights positions and orientations in staircases 2021-02-13 22:27:37 +01:00
Ludvig Böklin
0a8642df0f Use Ori for base rotation matrix 2021-02-13 11:02:50 +01:00
Avi Weinstock
7a37538f06 Implement actual inventory-manipulation part of trading server side. 2021-02-12 18:43:10 -05:00
Avi Weinstock
e0f4bb3dc6 Trade implementation progress.
- Accept/decline buttons that submit the proper messages
- A phase2 screen that renders the (item, quantity) pairs as text
- More checks in the trade state machine server-side.
2021-02-12 18:43:10 -05:00
Avi Weinstock
2b9129d290 Implement enough of a trade UI that dragging & dropping items into it round-trips between clients. 2021-02-12 18:43:09 -05:00
Avi Weinstock
231c104355 Trade implementation progress.
- Server messages now bring up the trade window.
- When a trade is declined, it closes the window on both clients.
2021-02-12 18:43:09 -05:00
Avi Weinstock
b259acaa59 Trade implementation progress.
- State machine for modifying trades.
- ServerGeneral/ClientGeneral messages.
2021-02-12 18:43:09 -05:00
Avi Weinstock
94ef4a6917 Plumb trade requests through the group invite UI, such that they can be accepted/declined without impacting the counterparty's movement. 2021-02-12 18:43:09 -05:00
Avi Weinstock
9c62289cad Initial draft of trade UI (creates a placeholder window that acts like crafting in terms of bringing up the bag, defaulting to the "r" key). 2021-02-12 18:43:09 -05:00
Snowram
5f1b8b1c50 Merge branch 'Sarrakitty/gliders' into 'master'
Sarrakitty/gliders

See merge request veloren/veloren!1771
2021-02-12 09:49:53 +00:00