292 Commits

Author SHA1 Message Date
Joshua Barretto
800d9b5eea Fixed cut-off cliff, optimised structure generation 2019-09-23 16:20:28 +01:00
Joshua Barretto
04911cba05 Improved SmallCache 2019-09-23 15:17:06 +01:00
Imbris
1e7d4468c5 Small cache experiments 2019-09-22 22:19:07 -04:00
Imbris
2d325c36a3 Simplify lerping and use smoothstep interpolation instead of cosine 2019-09-21 19:46:27 -04:00
Acrimon
0dba741373 Drastically faster diffuse 2019-09-21 17:40:27 +00:00
Joshua Barretto
e2365b4c32 Merge branch 'xacrimon/rng-init-noise' into 'master'
Update some deps, fix hashbrown not compiling and rework the ad-hoc PRNG for RandomField.

See merge request veloren/veloren!500
2019-09-20 06:13:48 +00:00
Acrimon
5e5a0ecfbc Formatted code. 2019-09-17 20:35:53 +02:00
Acrimon
b4191ca407 Fixed rng stuff. 2019-09-17 16:56:23 +02:00
Acrimon
da6bb2dc9c Fixed compile errors. 2019-09-17 16:12:17 +02:00
Acrimon
6bed77456f Added some reasoning. 2019-09-17 16:07:24 +02:00
Acrimon
46bf09662b Made the worldgen noise generators seed from the RNG and got rid of zerocopy. 2019-09-17 16:05:08 +02:00
Joshua Yanovski
743e48110f Addressing code review. 2019-09-16 15:11:47 +02:00
Joshua Yanovski
c4eae2e1b1 Fixing more rustfmt errors. 2019-09-16 04:05:36 +02:00
Joshua Yanovski
661b9aee72 Fixing rustfmt. 2019-09-16 04:01:05 +02:00
Joshua Yanovski
00b3f4e4f4 Fixing previous commit. 2019-09-16 03:54:32 +02:00
Joshua Yanovski
d5c441767f Fixing previous commit. 2019-09-16 03:51:08 +02:00
haslersn
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
Imbris
80d0884492 Remove all warnings 2019-09-04 19:03:49 -04:00
Monty Marz
8c39a4751b More sprites, ui fixes, lianas 2019-09-01 19:04:03 +00:00
Joshua Barretto
8c0346a190 Faster prng 2019-08-31 14:24:56 +01:00
Joshua Barretto
022d303f00 Better town park generation 2019-08-31 11:44:52 +01:00
Joshua Barretto
ba4d2cf5db Cleaned up wall generation 2019-08-31 11:44:52 +01:00
Joshua Barretto
61c35855ba Better loading times 2019-08-31 11:44:52 +01:00
Joshua Barretto
c27d2e4c85 Sloped wall tops 2019-08-31 11:44:52 +01:00
Joshua Barretto
9e1a6662dc Removed extra foundations 2019-08-31 11:44:52 +01:00
Joshua Barretto
3ce4186143 Added city walls 2019-08-31 11:44:52 +01:00
Joshua Barretto
1b48699d1b Added wall module assets 2019-08-31 11:44:52 +01:00
Joshua Barretto
5a61d563d8 Added modular building generation 2019-08-31 11:44:52 +01:00
Joshua Barretto
99c5171258 Added walls 2019-08-31 11:44:52 +01:00
Joshua Barretto
ca8c78eee6 Started work on modular buildings 2019-08-31 11:44:52 +01:00
Joshua Barretto
b5da843aec Improved mountain slopes and cliffs 2019-08-31 11:44:52 +01:00
Joshua Barretto
bc422e8075 Added module parts, made cell size smaller 2019-08-31 11:44:52 +01:00
Joshua Barretto
71fcb70a51 Initial implementation of towns 2019-08-31 11:44:52 +01:00
Joshua Barretto
fb0f981bbc Added town road construction 2019-08-31 11:44:52 +01:00
Joshua Barretto
c70e87b4af Better warping 2019-08-31 11:44:52 +01:00
Joshua Barretto
b3cc006bce Switched to FastNoise 2019-08-31 11:44:52 +01:00
Joshua Barretto
42837268bc Added test generator 2019-08-31 11:44:52 +01:00
Joshua Barretto
5e78479b50 Added Generator trait, fixed ocean lighting 2019-08-31 11:44:52 +01:00
Joshua Barretto
44df366177 Removed dryness 2019-08-31 11:44:52 +01:00
Joshua Barretto
ac583f6d0a More interesting hills 2019-08-31 11:44:52 +01:00
timokoesters
34c959bef0
Update to github vek repo 2019-08-26 13:12:45 +02:00
Joshua Yanovski
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
Joshua Yanovski
6cb33ba004 Fix clean code lints. 2019-08-25 18:17:51 +02:00
Joshua Yanovski
5dfbf86d87 Chaos doesn't depend on temperature anymore.
Also fix some things to use a consistent coordinate system and bump up
tree density and variation around tree density in hopes of creating more
aesthetically pleasing jungles.  However, this does change worldgen a
bit, so please make sure you look through it before merging.
2019-08-25 17:49:33 +02:00
jshipsey
d926965e7c fmt 2019-08-24 15:32:07 -04:00
Joshua Yanovski
798e8d7e8f Make humidity ignore ocean chunks. 2019-08-24 21:13:32 +02:00
Joshua Barretto
65a7c725a8 Merge branch 'sharp/jungle' of gitlab.com:veloren/veloren into sharp/jungle 2019-08-23 00:33:33 +01:00
Joshua Barretto
7ffe8979a2 Better snow noise 2019-08-23 00:31:27 +01:00
Joshua Yanovski
27ea09d24e Remove out of date comment. 2019-08-23 01:16:15 +02:00
Joshua Yanovski
ba9c5533dc Merge remote-tracking branch 'origin/sharp/jungle' into sharp/jungle 2019-08-23 01:10:48 +02:00