Commit Graph

386 Commits

Author SHA1 Message Date
Joshua Barretto
dff67e1c41 Added block collection, improved controls for it 2019-09-26 00:15:07 +01:00
Joshua Barretto
e22fe81a2f Added velorite 2019-09-26 00:15:07 +01:00
Joshua Barretto
f57c2ec453 Made consumable items have an effect, better damage animation 2019-09-26 00:15:07 +01:00
Joshua Barretto
a961a267f1 Added apple and mushroom collection 2019-09-26 00:15:07 +01:00
Joshua Barretto
7e6eede740 Better sun halo colours 2019-09-26 00:15:07 +01:00
Imbris
dd8500071e Stop cpu spinning in metrics server 2019-09-20 00:41:44 -04:00
Joshua Yanovski
9ba64ca57f Addressing code review. 2019-09-16 15:11:47 +02:00
Joshua Yanovski
20f57cf7f3 Continue instead of breaking. 2019-09-16 04:18:40 +02:00
Joshua Yanovski
2abf7cd016 Fixing more rustfmt errors. 2019-09-16 04:05:36 +02:00
Joshua Yanovski
95b02912b6 Fixing rustfmt. 2019-09-16 04:01:05 +02:00
Joshua Yanovski
b4ad76372b 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
Marcel Märtens
02fe9adfb7 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
Joshua Barretto
3f2e22f039 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
Marcel Märtens
58b0b49dfe adjust metrics to rebased Chunks 2019-09-09 10:47:40 +02:00
Marcel Märtens
49b08b55c7 switch from hyper http to rouille for http server 2019-09-09 10:07:25 +02:00
Marcel Märtens
b05e51152f 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
Marcel Märtens
8d3fb40419 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
haslersn
1796c09ca1 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
Christoffer Lantz
7dce9c4fb9 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
Christoffer Lantz
c154a41c5c Changed Spawned object: to Spawned: in handle_object 2019-09-02 01:22:09 -04:00
Christoffer Lantz
8f68df2bd1 Tells the user which object was spawned 2019-09-02 01:22:08 -04:00
Monty Marz
f53904b534 More sprites, ui fixes, lianas 2019-09-01 19:04:03 +00:00
timokoesters
9a832dd56b Move std::mem::discriminant into new method 2019-08-30 22:51:46 -04:00
timokoesters
77a48c61a1 Fix rolling for the player 2019-08-30 22:50:53 -04:00
timokoesters
e674424974 Allow non player entites to be removed again 2019-08-30 22:47:39 -04:00
timokoesters
a95893e43b
Remove inventory::swap and improve inventory::insert 2019-08-31 00:09:25 +02:00
timokoesters
bd8e71c5aa
Rename activate_inventory_slot to use_inventory_slot 2019-08-30 22:46:45 +02:00
timokoesters
082ccd7c46
Avoid right-ward shift 2019-08-30 22:32:47 +02:00
timokoesters
952ec35857
Remove warnings 2019-08-29 19:54:53 +02:00
timokoesters
6e1c78e5d5
Add debug mode item giving speed boost in look_dir on click 2019-08-29 19:44:28 +02:00
timokoesters
155605841b
Use comp::Stats to store Equipment, make char weapon selection work 2019-08-29 19:44:28 +02:00
yashaslokesh
be71aea20b 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
timokoesters
c4879307af
Update to github vek repo 2019-08-26 13:12:45 +02:00
timokoesters
05f2f168fd
Make falldamage local, don't use force update for local, cleanup 2019-08-26 13:12:43 +02:00
timokoesters
eb34e5bb27
fmt 2019-08-26 13:12:43 +02:00
timokoesters
3258fa3a3c
Add basis for projectiles
But we have no controller action to spawn them yet
2019-08-26 13:12:41 +02:00
Songtronix
814e858720
Split Events in ServerEvent and LocalEvent 2019-08-26 13:12:41 +02:00
timokoesters
e8ccbe75fa
Clean up entity spawning code 2019-08-26 13:12:39 +02:00
timokoesters
4d6a32e00f
Allow non player entites to be removed again 2019-08-26 13:12:35 +02:00
timokoesters
5d5ccd7b99
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
Joshua Yanovski
c02f2a7f9e 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
Acrimon
a41cf1a83d Disabled unsafe using lint level. 2019-08-19 14:39:23 +02:00
Monty Marz
29f6186139 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
Piotr Korgól
586bf5faff Add adminify command to temporarily give admin perms 2019-08-17 23:35:01 +02:00
Acrimon
593deb828b [Server] Switched mpsc for crossbeam::channel. 2019-08-16 00:10:46 +02:00
Piotr Korgól
a777b67b2d Add needs_admin bool to check if the commands needs admin perms 2019-08-15 16:33:40 +02:00
Piotr Korgól
0221de484e Give singleplayer its own server settings 2019-08-14 17:51:59 +02:00
Piotr Korgól
8ec0a06bbe Fix spawn command, properly search for admins 2019-08-14 17:30:36 +02:00
Piotr Korgól
6882170d6f Add Admins field to the settings file 2019-08-14 17:30:36 +02:00
Piotr Korgól
98c0692260 Add AdminPerms component, make some commands require it 2019-08-14 17:30:36 +02:00
Acrimon
4f3b49ef8b Switched over the last std hashset. 2019-08-11 22:39:41 +02:00
Acrimon
b4a46f3e6e Finished switch to hashbrown. 2019-08-11 22:38:28 +02:00
Acrimon
4f2d99f809 Switch to hashbrown in server. 2019-08-11 21:48:02 +02:00
Acrimon
1c22f380b0 Adjusted default spawn height for now 2019-08-11 13:37:04 +02:00
Joshua Barretto
d5aee13c91 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
Songtronix
612a3df528 fix time overflow crash 2019-08-09 09:13:28 +00:00
Joshua Barretto
2191921721 Merge branch 'telastrus/auth' into 'master'
Server-side authentication

See merge request veloren/veloren!419
2019-08-09 01:37:44 +00:00
telastrus
79b5c177cd swapped if for entry 2019-08-08 21:28:25 -04:00
telastrus
eadf3a7671 created basic AuthProvider which we can change to suit our needs 2019-08-08 18:24:14 -04:00
telastrus
35a3f67e19 ran cargo fmt 2019-08-08 12:05:38 -04:00
telastrus
58e8bd4af9 removed println statements 2019-08-08 12:03:12 -04:00
telastrus
f2ed2870c6 90% there 2019-08-08 11:23:58 -04:00
Piotr Korgól
9f2d66b025 Add a lantern strength limit to prevent shader overflows 2019-08-08 14:44:58 +02:00
telastrus
6d94d43021 still compiles 2019-08-07 23:56:02 -04:00
Joshua Barretto
e6f384fc11 Added default explosion radius 2019-08-07 18:18:32 +01:00
Joshua Barretto
5b62531da3 Added /explosion command 2019-08-07 18:17:04 +01:00
Joshua Barretto
192f5d355f Switched to EventBus system 2019-08-07 16:39:16 +01:00
Piotr Korgól
d3f2ca69a4 Change the version number to 0.3 2019-08-04 13:53:59 +02:00
Joshua Barretto
767ced8fe7 Limited entity spawning to 10 2019-08-04 11:30:05 +01:00
Joshua Barretto
ff114a83b5 Made bosses slightly more powerful 2019-08-04 10:32:50 +01:00
timokoesters
86e10c914c Adjust xp gains 2019-08-03 22:27:48 +02:00
timokoesters
74b7613cd9 Get rid of unwraps 2019-08-03 22:08:19 +02:00
timokoesters
7365dbe9e6 Give xp depending on max hp and lvl of entity killed 2019-08-03 21:30:01 +02:00
Piotr Korgól
8f86f5c483 Allow normal enemies to spawn as humanoids 2019-08-03 12:35:16 +02:00
Joshua Barretto
6ba5cf3224 More interesting enemy spawning 2019-08-02 21:31:22 +01:00
Joshua Barretto
23cfe50455 Better health accessors methods 2019-08-02 20:49:48 +01:00
Joshua Barretto
677c5781ba Added bosses, improved secret object spawn rates 2019-08-02 20:10:52 +01:00
Joshua Barretto
6ff75dcf0b Removed NPCs that are outside the VD 2019-08-02 20:10:52 +01:00
Joshua Barretto
b5d10bfb3e Added worldgen npcs 2019-08-02 20:10:52 +01:00
Dominik Broński
f644b6ab89 Revert "Merge branch 'imbris/upgrade_specs' into 'master'"
This reverts merge request !375
2019-08-01 23:32:33 +00:00
Imbris
5f56657f6c Upgrade specs to 0.15 2019-08-01 18:09:13 -04:00
Monty Marz
a5926eb40a 0.3. login bg 2019-08-01 17:53:34 +00:00
Piotr Korgól
ec550620ad Add a health bonus for level ups, fix pets 2019-08-01 18:56:08 +02:00
Joshua Barretto
2d0569c3d9 Better item throwing 2019-08-01 09:12:00 +01:00
Joshua Barretto
39fc1d6b71 Added entity pickup, changed item model 2019-08-01 09:12:00 +01:00
Joshua Barretto
331b6c8b3a Altered Item structure 2019-08-01 09:12:00 +01:00
Joshua Barretto
995090d2d4 Added item drops 2019-08-01 09:12:00 +01:00
Joshua Barretto
b3cae2f3dd Added better item manipulation 2019-08-01 09:09:26 +01:00
Joshua Barretto
31f8794c39 Started work on inventory manipulation 2019-08-01 09:09:26 +01:00
Joshua Barretto
123a78552a Fixed block-hopping on edges, added correct inventory slots 2019-08-01 09:09:26 +01:00
Joshua Barretto
5bb7998d5a Added inventory sync messages and InventoryUpdate component 2019-08-01 09:09:26 +01:00
timokoesters
040aa897c1 Fix needing all components to update physics at all 2019-07-31 20:10:52 +02:00
timokoesters
b695a63e98 Send different physics components individually 2019-07-30 13:35:16 +02:00
timokoesters
16b445c828 Fix bugs with Last<T> 2019-07-30 10:49:41 +02:00
timokoesters
03a82030ec Fix commands 2019-07-30 10:10:58 +02:00
timokoesters
c6034bf450 Use Last<C> to check if a physics component changed 2019-07-30 08:32:03 +02:00
Monty Marz
5cfc60da50 Small chat fixes 2019-07-29 14:40:46 +00:00
Acrimon
ee49ebe807 Update rand, log and scan_fmt 2019-07-29 13:42:26 +00:00
Piotr Korgól
88db83c92a Instantly level up after reaching the required exp amount 2019-07-29 14:30:38 +02:00
Joshua Barretto
4a198ca626 Numerous minor lighting fixes 2019-07-29 13:01:39 +01:00