Commit Graph

433 Commits

Author SHA1 Message Date
Marcel Märtens
e3ef4422b6 cleanup ClientConnArgs 2021-02-22 21:07:20 +01:00
Marcel Märtens
3f5c64bec0 Client::new can now resolve DNS requests, better networking error messages 2021-02-22 17:35:19 +01:00
Marcel Märtens
514d5db038 Update Network Protocol
- now last digit version is compatible 0.6.0 will connect to 0.6.1
 - the TCP DATA Frames no longer contain START field, as it's not needed
 - the TCP OPENSTREAM Frames will now contain the BANDWIDTH field
 - MID is not Protocol internal

Update network
 - update API with Bandwidth

Update veloren
 - introduce better runtime and `async` things that are IO bound.
 - Remove `uvth` and instead use `tokio::runtime::Runtime::spawn_blocking`
 - remove futures_execute from client and server use tokio::runtime::Runtime instead
 - give threads a Name
2021-02-22 17:34:55 +01:00
Sam
d5ccc33abc Factored out duplicate code into closures, consolidated ability handling logic to a single function. 2021-02-19 18:45:48 -05:00
Marcel Märtens
03af9937cf 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
ea8ab1ce7a 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
9884019963 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
5aa1940ef8 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
1b77b6dc41 Initial switch to tokio for network, minimum working example. 2021-02-17 12:37:59 +01:00
Caelan
dda4931f46 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
TheThirdSpartan
f10f88081d Small chat message formatting changes and fixed missing player alias during admin entity possession 2021-02-17 02:15:45 +00:00
Avi Weinstock
c984035976 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
232ddb0860 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
Avi Weinstock
f6db8bb7c4 Implement actual inventory-manipulation part of trading server side. 2021-02-12 18:43:10 -05:00
Avi Weinstock
abb5684883 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
e2b55e0706 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
aeb2398fc6 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
ae528124fc Trade implementation progress.
- State machine for modifying trades.
- ServerGeneral/ClientGeneral messages.
2021-02-12 18:43:09 -05:00
Avi Weinstock
e9b811b62b 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
Quellus
63952875d9 Rebase !1447 Chat input color and icon reflect channel message is sent to. 2021-02-10 19:42:59 +00:00
Sam
e033fe6bee Inventory manipulations are now only for input from the client, and are no longer directly sent as a server event. Slot manipulations do that instead. 2021-02-08 13:55:50 -05:00
Sam
1c83c5ee6f Loadout manipulations now emit a separate event from client instead of hackily intercepting inventory manipulations in common. 2021-02-08 12:31:17 -05:00
Sam
6a1e583d45 Eradicated clones 2021-02-08 12:01:48 -05:00
Sam
8eebcdfcd2 Inventory changes that modify the loadout now go through a control action instead of a control event. 2021-02-08 12:01:47 -05:00
James Melkonian
23b1df3cdd Add basic NPC interaction and fix NPC chat spamming 2021-01-31 20:29:50 +00:00
DaforLynx
c6e262c4ce Small audio fixes; addresses #939 and #940 2021-01-29 11:37:10 +00:00
Marcel Märtens
ff10373cbe add unittests for api compatibility for client::Client and common::Clock
this tests the broad api of veloren and FAILS in case the interface is changed. It contains a not that those functions are commonly used by 3rd parties
and thus they need to be notified
2021-01-23 21:06:47 +01:00
Monty Marz
de5c5702b3 stats display
Addressed comments.

Addressed comments.
2021-01-19 08:08:11 -05:00
Sam
c0c45a1996 Purged stats, including level and experience 2021-01-19 08:07:23 -05:00
Sam
48c98b11cf General combat skill tree.
UI for general skill tree
2021-01-19 08:07:20 -05:00
Sam
bde2bc1f77 UI for sword skill tree
Axe skill tree UI

Hammer skill tree UI

Bow skill tree UI

moar renders

Staff skill tree UI

Sceptre skill tree UI
2021-01-19 08:07:12 -05:00
Monty Marz
3f436079e8 Skill-Tree UI
switchable tabs
rework icons, fix cursor toggle
auto slot placing

Bow leap skill changed to bow glide skill.
2021-01-19 08:07:06 -05:00
Sam
0ccbdc3b8c Sceptre skill tree. 2021-01-19 08:07:03 -05:00
Sam
5c7705f874 Staff skill tree. 2021-01-19 08:07:03 -05:00
Sam
662a08defc Implemented bow skill tree. 2021-01-19 08:07:02 -05:00
Sam
4dfe14c103 Hammer skill tree complete. 2021-01-19 08:07:02 -05:00
Sam
72604e8a4e Axe skill tree functional. 2021-01-19 08:07:01 -05:00
Sam
cc60ca58be Added sword skill tree 2021-01-19 08:06:59 -05:00
Sam
fa073bceff Skills can now optionally have levels. Max level prevents adding skill of higher level. Support for skills having a prerequisite of a particular level. 2021-01-19 08:06:57 -05:00
Sam
5d474974b9 Skills can now have prerequisite skills. Skills can now cost different amounts of skill points. 2021-01-19 08:06:57 -05:00
Sam
cbfe064e4f You now gain skill points after a threshold of xp within a particular skill group.
Skills can now unlock skill groups. Temp method of using chat to unlock skills.
2021-01-19 08:06:52 -05:00
Sam
63eb71ed5b Exp is now awarded to specific skill groups. It's automatically split between a general pool and weapon pools based on if you have the weapon in your loadout and if you've unlocked the weapon pools. 2021-01-18 17:54:03 -05:00
Jesus Bracho
ec79890335 Provide buff information on killed entities 2021-01-18 05:46:53 +00:00
Ben Wallis
aef2637288 Refactored loadout to have public functions for each slot instead of requiring callers to use the _INDEX consts 2021-01-08 19:12:09 +00:00
Ben Wallis
5636083e27 * Fixed character load errors not being handled in Voxygen.
* Improved server error message for character load errors.
* Added server logging for item asset load errors during character load.
* Fixed character select error message dialog not supporting long messages.
2020-12-30 19:29:22 +00:00
Acrimon
e76474463a
update authc 2020-12-28 16:42:40 +01:00
Marcel Märtens
e8003a44dd update specs 2020-12-16 14:31:16 +01:00
Marcel Märtens
e3307344ab get rid of some insecure dependencies 2020-12-16 10:42:36 +01:00
Marcel Märtens
107fd432f5 update further crates 2020-12-16 08:56:21 +01:00
Joshua Barretto
494436be01 Hid plugins behind a feature flag to resolve Windows CI issue 2020-12-15 11:14:26 +00:00