Commit Graph

52 Commits

Author SHA1 Message Date
Avi Weinstock
5aa98d18e3 Depend on crossbeam-utils and crossbeam-channel instead of crossbeam in voxygen. 2021-06-02 00:39:58 -04:00
Marcel Märtens
4cfdbdd069 use a constant for recommended_threads 2021-05-05 14:35:06 +02:00
Marcel Märtens
0142cf37f0 limit tokio threads to 1/4 of num_cpus
make sure that rayon has at least 2 threads even on 1cpu systems to increase stability
2021-05-04 21:06:11 +02:00
Ben Wallis
d6b3eb3784 Fixed initial creation of saves directory. Added path of old singleplayer saves directory to information logged when it is moved to the new userdata directory 2021-04-14 07:15:51 +01:00
Ben Wallis
1de94a9979 * Replaced diesel with rusqlite and refinery
* Added "migration of migrations" to transfer the data from the __diesel_schema_migrations table to the refinery_schema_history table
* Removed all down migrations as refinery does not support down migrations
* Changed all diesel up migrations to refinery naming format
* Added --sql-log-mode parameter to veloren-server-cli to allow SQL tracing and profiling
* Added /disconnect_all_players admin command
* Added disconnectall CLI command
* Fixes for several potential persistence-related race conditions
2021-04-13 22:05:47 +00:00
Marcel Märtens
4ebfbdde0f Move Specs code to own common_ecs create, put tracy and macros into common_base 2021-03-09 00:54:01 +01:00
Marcel Märtens
1a7c179bbb share tokio Runtime between Client and Server, name rayon Threadpool 2021-02-22 17:35:06 +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
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
Imbris
a97b188bea Make fps display and specification more precise 2020-11-11 21:47:22 -05:00
Marcel Märtens
e4e5c6e55b massivly switch clock algorithm.
- before we had a Clock that tried to average multiple ticks and predict the next sleep.
   This system is massivly bugged.
   a) We know exactly how long the busy time took, so we dont need to predict anything in the first place
   b) Preduction was totally unrealistic after a single lag spike
   c) When a very slow tick happens, we dont benefit from 10 fast ticks.
 - Instead we just try to keep the tick time exact what we expect.
   If we can't manage a constant tick time because we are to slow, the systems have to "catch" this via the `dt` anyway.
2020-11-10 18:31:42 +01:00
Imbris
325695e937 Only try to connect to the singleplayer server after it has been initialized 2020-10-29 18:30:49 -04:00
Imbris
b9b84d2890 Migrate singleplayer save folders to the new location if they have not already been generated 2020-10-10 20:25:32 -04:00
Imbris
83fb26c4f9 Group editable server settings into one struct that is stored in the ecs, don't expose DataDir, use Uuid in the whitelist instead of usernames, replace Banlist record tuple with new type with named fields, remove commented code 2020-10-10 02:10:32 -04:00
Imbris
7c14a3f4a4 New userdata folder that holds voxygen settings and logs and server saves and settings, split up server settings file into parts that are persisted back to their files and parts that are read-only, misc fixes 2020-10-10 02:10:32 -04:00
Ben Wallis
b3dd8e8a02 Added #![deny(clippy::clone_on_ref_ptr)] to all crates and fixed resulting lint errors 2020-09-27 17:25:33 +01:00
Marcel Märtens
b8234217af fix #690 2020-08-13 10:41:34 +02:00
T-Dark0
fd9ec8fbd0 Voxygen and server-cli no longer panic if server creation returns error
The process just exists instead
2020-07-21 09:59:00 +00:00
Songtronix
728d349c77 fix: show loading screen for singleplayer 2020-07-10 11:05:09 +02:00
Marcel Märtens
77c90b2c7c doing a simple 1:1 swap out network coding
this is the part which prob has less Merge conflics and is easy to rebase
the next commit will have prob alot of merge conflics
followed by a fmt commit
2020-07-03 13:11:31 +02:00
Kevin Glasson
af3af6c169 Convert voxygen to use tracing
There are several noteable changes in this commit that mean that logging
will behave differently to how it did previously.

- There are now no separate filter levels for terminal and file output.
This is a feature that is lacking in `tracing` but is set to be resolved
by https://github.com/tokio-rs/tracing/pull/508. At which point we MAY
include it.

- The default log level was previously `WARN` - it is now `INFO`.
2020-06-21 23:17:25 +08:00
Mckol
48c5d37a5d Make singleplayer use voxygen's config path for persistence path. 2020-05-15 01:54:13 +02:00
Capucho
a3479f6a49 Fixed the bugs in the settings tab and the character button in the escape menu and unpause when there is more than 1 player 2020-03-05 18:55:14 +00:00
Capucho
f13314e3da Fixed the erroneous load on pause 2020-03-05 18:38:39 +00:00
Capucho
af21d19ff3 Moved paused from GlobalState to SinglePlayer to prevent errors and unpauses now works using the resume button 2020-03-05 18:38:39 +00:00
Capucho
a97b694dfe Groundwork for fixing #36 and rewrite of client timeouts so that they don't use Instant and Duration 2020-03-05 18:38:39 +00:00
Songtronix
70eb2eed33 remove: discord rich presence 2020-01-10 17:01:50 +01:00
timokoesters
c733c95718
improvement: UI for connecting to singleplayer servers + threading fixes 2019-11-06 21:34:15 +01:00
Marcel Märtens
30c9fcc911 Fix bug that metrics took a random port always introduced in !584
also removed the duplicate port from the server creation process, using the server settings struct now
2019-10-11 14:19:55 +02:00
Acrimon
fda47fc322 [Voxygen] Switch mutexes to parking_lot and channels to crossbeam. 2019-08-16 00:07:09 +02:00
Piotr Korgól
0221de484e Give singleplayer its own server settings 2019-08-14 17:51:59 +02:00
Songtronix
bbb024224d add configureable server info 2019-07-17 18:32:01 +02:00
Songtronix
1213d9844b add customizable port and worldseed 2019-07-17 18:32:00 +02:00
Songtronix
07754b0a79 fmt 2019-07-07 16:16:07 +02:00
Songtronix
6fa086b964 remove expects, warnings, code duplication 2019-07-07 16:16:06 +02:00
Songtronix
1be8f5e422 Update status according the play state 2019-07-07 16:16:05 +02:00
Songtronix
0c0e93a61f clean voxygen rs files 2019-07-02 21:29:38 +00:00
timokoesters
f5da167ce5
Fix warnings and clippy recommendations in common 2019-07-02 15:48:25 +02:00
Cody
14ac5babd4 Removes most unused imports; changes some unused variables to underscores or provides a leading underscore; removes some unnecessary variables and mutable declarations; and performs other miscellaneous warning fixes. 2019-06-06 14:48:41 +00:00
Joshua Barretto
9da2d82197 Added proper VD fog 2019-06-05 20:52:51 +01:00
Joshua Barretto
cd630b0816 Reduced threadpool threads to keep render thread smooth 2019-06-05 20:52:51 +01:00
Cody
a258be7aac
Fixes some typos, comment inconsistencies, and incorrect naming conventions. 2019-05-31 16:36:16 -04:00
Joshua Barretto
a696847f67 Fixed singleplayer failure caused by worldgen
Former-commit-id: a2fdb56682922694b32e4d25890afa7a90c5b923
2019-05-21 23:31:17 +01:00
Cody
6b09fd7c53 Pedantic comment and language fixes.
Former-commit-id: eb49765c911aaa97a9c8ed351216a7a6f8411213
2019-05-17 18:32:07 -04:00
Imbris
8e0c1b1abd cleanup some warnings, pretty crash string literal
Former-commit-id: 43492866f624c12c87762a94188c6c193e5bb90c
2019-05-17 03:55:51 -04:00
Joshua Barretto
54cc9e137a fmt
Former-commit-id: b43b7192f7a2dd71da26182ca0c74449867381f3
2019-05-09 18:58:16 +01:00
jshipsey
ac78d322d6 animation orientation fix, first jump
Former-commit-id: e4653bbdc553e496edfe011bf5aa2f97a4cf3b90
2019-05-09 18:57:47 +01:00
Joshua Barretto
871767ada0 Made single-player server start on random unused port
Former-commit-id: 95ec85b9be58d0fd348144c398004a69676eb6cd
2019-05-09 18:57:47 +01:00
Forest Anderson
993388e56a Ran fmt on codebase
Former-commit-id: 7fecffa1dc66fffba4f07d45fb80960dc5178f4f
2019-04-29 20:37:19 +00:00