Commit Graph

331 Commits

Author SHA1 Message Date
7431d1f4e5 Stop cpu spinning in metrics server 2019-09-20 00:41:44 -04:00
743e48110f Addressing code review. 2019-09-16 15:11:47 +02:00
4fb851263c Continue instead of breaking. 2019-09-16 04:18:40 +02:00
c4eae2e1b1 Fixing more rustfmt errors. 2019-09-16 04:05:36 +02:00
661b9aee72 Fixing rustfmt. 2019-09-16 04:01:05 +02:00
f5c4000b1b Allow canceling chunk generation.
Currently we only do this when no players are in range of the chunk.  We
also send the first client who posted the chunk a message indicating
that it's canceled, the hope being that this will be a performance win
in single player mode since you don't have to wait three seconds to
realize that the server won't generate the chunk for you.

We now check an atomic flag for every column sample in a chunk.  We
could probably do this less frequently, but since it's a relaxed load it
has essentially no performance impact on Intel architectures.
2019-09-16 03:41:33 +02:00
a2914c17f5 Fix panic if starting singleplayer twice without closing the game
reduce costs for metrics by checking chunks only every 100th tick
add metrics for "server start time" and ingame "time of day"
2019-09-10 15:22:34 +02:00
e6d8b4b8d8 Exponential interpolation for linear damping
With an additional approximation to allow for the same size jumps given different framerates.
2019-09-09 19:11:40 +00:00
b0ff977297 adjust metrics to rebased Chunks 2019-09-09 10:47:40 +02:00
bdea219d82 switch from hyper http to rouille for http server 2019-09-09 10:07:25 +02:00
ae51f9f9dd update version, revert from static prometheus back to normal because static doesnt supprot registries, and implement most of the metrics except for entity count 2019-09-09 09:54:30 +02:00
2b344e9d94 first implementation of prometheus in veloren for git hash, tick times, chunks loaded, player online, entity count and light count 2019-09-09 09:48:44 +02:00
351b8c91c7 common: Rework volume API
See the doc comments in `common/src/vol.rs` for more information on
the API itself.

The changes include:

* Consistent `Err`/`Error` naming.
  * Types are named `...Error`.
  * `enum` variants are named `...Err`.
* Rename `VolMap{2d, 3d}` -> `VolGrid{2d, 3d}`. This is in preparation
  to an upcoming change where a “map” in the game related sense will
  be added.
* Add volume iterators. There are two types of them:
  * _Position_ iterators obtained from the trait `IntoPosIterator`
    using the method
    `fn pos_iter(self, lower_bound: Vec3<i32>, upper_bound: Vec3<i32>) -> ...`
    which returns an iterator over `Vec3<i32>`.
  * _Volume_ iterators obtained from the trait `IntoVolIterator`
    using the method
    `fn vol_iter(self, lower_bound: Vec3<i32>, upper_bound: Vec3<i32>) -> ...`
    which returns an iterator over `(Vec3<i32>, &Self::Vox)`.
  Those traits will usually be implemented by references to volume
  types (i.e. `impl IntoVolIterator<'a> for &'a T` where `T` is some
  type which usually implements several volume traits, such as `Chunk`).
  * _Position_ iterators iterate over the positions valid for that
    volume.
  * _Volume_ iterators do the same but return not only the position
    but also the voxel at that position, in each iteration.
* Introduce trait `RectSizedVol` for the use case which we have with
  `Chonk`: A `Chonk` is sized only in x and y direction.
* Introduce traits `RasterableVol`, `RectRasterableVol`
  * `RasterableVol` represents a volume that is compile-time sized and has
    its lower bound at `(0, 0, 0)`. The name `RasterableVol` was chosen
    because such a volume can be used with `VolGrid3d`.
  * `RectRasterableVol` represents a volume that is compile-time sized at
    least in x and y direction and has its lower bound at `(0, 0, z)`.
    There's no requirement on he lower bound or size in z direction.
    The name `RectRasterableVol` was chosen because such a volume can be
    used with `VolGrid2d`.
2019-09-06 15:43:31 +02:00
f0d96d84fe Added unwrap_or to obj_str_opt in handle_object in case we don't return early in the _ => match arm 2019-09-02 01:22:09 -04:00
8fd9f1614b Changed Spawned object: to Spawned: in handle_object 2019-09-02 01:22:09 -04:00
3771a26e88 Tells the user which object was spawned 2019-09-02 01:22:08 -04:00
8c39a4751b More sprites, ui fixes, lianas 2019-09-01 19:04:03 +00:00
702a4afd46 Move std::mem::discriminant into new method 2019-08-30 22:51:46 -04:00
8900a9e4f3 Fix rolling for the player 2019-08-30 22:50:53 -04:00
4fdc1727bd Allow non player entites to be removed again 2019-08-30 22:47:39 -04:00
82a8a4bc7e Remove inventory::swap and improve inventory::insert 2019-08-31 00:09:25 +02:00
2b0f6a1d9c Rename activate_inventory_slot to use_inventory_slot 2019-08-30 22:46:45 +02:00
5fe2b81ec8 Avoid right-ward shift 2019-08-30 22:32:47 +02:00
0e64c13996 Remove warnings 2019-08-29 19:54:53 +02:00
e4ca33de5b Add debug mode item giving speed boost in look_dir on click 2019-08-29 19:44:28 +02:00
af780acc84 Use comp::Stats to store Equipment, make char weapon selection work 2019-08-29 19:44:28 +02:00
11678fb952 Changed exp type from f64 to u32 and altered exp calculations and function signatures to adhere to the new types
Signed-off-by: Yashas Lokesh <yashas.lokesh@gmail.com>
2019-08-27 22:33:14 +00:00
34c959bef0 Update to github vek repo 2019-08-26 13:12:45 +02:00
8ef1491fb5 Make falldamage local, don't use force update for local, cleanup 2019-08-26 13:12:43 +02:00
816633c3f3 fmt 2019-08-26 13:12:43 +02:00
e4dced418f Add basis for projectiles
But we have no controller action to spawn them yet
2019-08-26 13:12:41 +02:00
0f32eee451 Split Events in ServerEvent and LocalEvent 2019-08-26 13:12:41 +02:00
9fc5ba7d77 Clean up entity spawning code 2019-08-26 13:12:39 +02:00
36c88e0b91 Allow non player entites to be removed again 2019-08-26 13:12:35 +02:00
019ce11d5d Move from state components to single CharaterState struct
This makes split animations easy and improves overall code quality
2019-08-26 13:12:34 +02:00
608685ef36 Fixes to worldgen and adding a debug command.
Humidity and temperature are now indexed to uniform altitude *over land
chunks* (and water chunks adjacent to land) rather than over the whole
range of altitude.  This is necessary in order to satisfy the uniformity
conditions of the formula for weighted sum CDF.

Additionally, fixes the computation of whether a tree should be
generated or not.  Previously, it was using a source of randomness
scaled to use much less than the full 0-1 range; this has been resolved.
This makes for much nicer and more gradual transitions between densities
and reduces the amount of completely barren landscapes, while also
making forests larger.

Finally, this commit adds a server command, debug_column, which returns
some useful debug information about a column given an x and y
coordinate.  This is useful for debugging worldgen.
2019-08-26 11:52:25 +02:00
724d6dffb4 Disabled unsafe using lint level. 2019-08-19 14:39:23 +02:00
01143930db hotbar changes
completely switched to. vox files

easier to see design

gradient and numbers on the health/mana bar
2019-08-18 18:07:21 +00:00
84ad0a1a86 Add adminify command to temporarily give admin perms 2019-08-17 23:35:01 +02:00
4c575c14ff [Server] Switched mpsc for crossbeam::channel. 2019-08-16 00:10:46 +02:00
892855a348 Add needs_admin bool to check if the commands needs admin perms 2019-08-15 16:33:40 +02:00
28c47663d0 Give singleplayer its own server settings 2019-08-14 17:51:59 +02:00
e07762d134 Fix spawn command, properly search for admins 2019-08-14 17:30:36 +02:00
1f5817a80b Add Admins field to the settings file 2019-08-14 17:30:36 +02:00
7fa5403aeb Add AdminPerms component, make some commands require it 2019-08-14 17:30:36 +02:00
20bd2e0fce Switched over the last std hashset. 2019-08-11 22:39:41 +02:00
7c8487ed76 Finished switch to hashbrown. 2019-08-11 22:38:28 +02:00
9515f047b9 Switch to hashbrown in server. 2019-08-11 21:48:02 +02:00
05cf8d190f Adjusted default spawn height for now 2019-08-11 13:37:04 +02:00
e49de7f63b Merge branch 'zesterer/small-fixes' into 'master'
Added entity event system, fixed fall damage

See merge request veloren/veloren!418
2019-08-09 23:56:49 +00:00