Commit Graph

114 Commits

Author SHA1 Message Date
Ben Wallis
c1c968f479 Globally suppressed clippy lint option_map_unit_fn for #587 2020-06-14 16:48:07 +00:00
Ben Wallis
950c62efc6 Suppressed all existing clippy warnings in preparation for fixes as part of #587 2020-06-10 22:01:42 +01:00
Joshua Barretto
2a6a19f7ef fmt 2020-04-23 18:19:42 +01:00
Joshua Barretto
01e2cd2b88 Warning cleanup 2020-04-23 18:19:42 +01:00
Joshua Barretto
431e199731 Added correctly generating world paths, sub-voxel shader noise 2020-04-23 18:19:41 +01:00
jshipsey
a89b28e117 adjusted run animation to allow villager walking 2020-04-23 18:19:41 +01:00
Pfauenauge90
98704a4753 turnip and window blocks 2020-04-23 18:19:41 +01:00
Joshua Barretto
6448c17110 Fixed sprite AO, overhauled entity spawning, better enemy spawning in dungeons, made agents more skilled at combat 2020-04-23 18:19:41 +01:00
Monty Marz
0fb3a115da Add more crops 2020-04-23 18:19:41 +01:00
Joshua Barretto
e3ebdc56b3 Fixed figure AO (still need to do sprite AO), added more control over NPC spawning, loot in dungeons 2020-04-23 18:19:41 +01:00
Joshua Barretto
fd14223c33 Basic boss spawning in dungeons, better AO 2020-04-23 18:19:41 +01:00
Joshua Barretto
525cba5029 Added dungeon rooms, corridors, mazes 2020-04-23 18:19:41 +01:00
Joshua Barretto
68c5612692 Innumerable minor improvements to towns, added bridges, better paths, more house variations, etc. 2020-04-23 18:19:41 +01:00
Joshua Barretto
46190aa634 Began work on basic economic simulation 2020-04-23 18:19:40 +01:00
Joshua Barretto
c1514fc37b Added initial civ generation 2020-04-23 18:19:40 +01:00
Joshua Barretto
41b77a9b10 Removed old settlement code, removed zcache from dependency of site generators for forward compatibility 2020-04-23 18:19:40 +01:00
Joshua Barretto
1c6a6cd6cf Moved settlement code to site directory, removed old town generation code 2020-04-23 18:19:40 +01:00
Joshua Barretto
085a115e2b Began work on post-generation town rendering, fixed overflow bug on large maps 2020-04-23 18:19:40 +01:00
Joshua Barretto
0021bd6452 Added new settlement generation to world, basic rendering 2020-04-23 18:19:40 +01:00
Marcel Märtens
dae31ae5b6 apply new rustfmt - touching alot of files 2020-02-01 21:39:39 +01:00
Joshua Yanovski
6d5e42f10b Better is_underwater() check.
Takes rivers into account somewhat, and doesn't take up extra space in
SimChunk.
2020-01-26 16:18:51 +01:00
Joshua Barretto
8c7e96e313 Improved waypoint spawn locations, scaled down pathfinding cost 2020-01-26 12:52:32 +00:00
Joshua Barretto
d04a595b3f Made waypoints work, added waypoint spawning 2020-01-26 12:52:28 +00:00
Joshua Barretto
11193a692a Better neutral AI, initial waypoint objects 2020-01-26 12:52:28 +00:00
Joshua Barretto
2d9aa21eef Added test world, friendly NPC pathfinding 2020-01-26 12:52:07 +00:00
Joshua Yanovski
d54f22c9fa Add a default world map.
Also adds map versioning, proper scaling, and updates sediment
rendering.  It also tones down warp.
2020-01-23 18:18:15 +01:00
Joshua Yanovski
9ee0cd82d0 Code restructuring for performance.
Turned a lot of for loops into for_each loops, which should be easier
for LLVM to optimize currently.  Also updated almost all the non-erosion
stuff in WorldGen to run in parallel (and take advantage of the cache,
in the case of TownGen), and hopefully improved performance somewhat for
chunk generation as well.
2020-01-23 18:18:14 +01:00
Joshua Yanovski
e71f145b71 Sediment transport, plus many other things. 2020-01-23 18:18:09 +01:00
Imbris
5666f18ded Add terrain meshing benchmark 2020-01-19 16:02:12 -05:00
S Handley
5b65b16594 Prevent NPCs from spawnign underwater
This should be set until there are underwater NPC types.
2020-01-08 12:48:00 +00:00
soruh
e3bd152d24 update toolchain to nightly-2019-11-04 2019-11-04 18:26:32 +01:00
Joshua Yanovski
8ae2692b6e 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-10-16 11:39:41 +00:00
Forest
35b9040a6f Removed now stable feature 2019-10-03 17:28:17 -04:00
Acrimon
772e85fbea Update lib.rs 2019-10-03 17:19:22 -04:00
Acrimon
e151b81c11 Update lib.rs 2019-10-03 17:19:22 -04:00
Joshua Barretto
8a2dc836d8 Fixed cut-off cliff, optimised structure generation 2019-09-23 16:20:28 +01:00
Joshua Yanovski
9ba64ca57f Addressing code review. 2019-09-16 15:11:47 +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
b9f545f97c Fixing previous commit. 2019-09-16 03:54:32 +02:00
Joshua Yanovski
9a4e5e06f2 Fixing previous commit. 2019-09-16 03:51:08 +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
Imbris
52d84248ec Remove all warnings 2019-09-04 19:03:49 -04:00
Joshua Barretto
fe2ad92201 Initial implementation of towns 2019-08-31 11:44:52 +01:00
Joshua Barretto
1fcb4a0313 Added Generator trait, fixed ocean lighting 2019-08-31 11:44:52 +01:00
Joshua Yanovski
b69020b68e Fine, removing box syntax. 2019-08-23 01:08:47 +02:00
Joshua Yanovski
398c18359d Addressing concerns, for real. 2019-08-23 00:57:42 +02:00
Joshua Yanovski
2ff192021c Addressing PR issues. 2019-08-22 23:48:13 +02:00
Joshua Barretto
ba1a146cd5 Better snow, colours, more chaos 2019-08-22 22:25:17 +01:00
Joshua Yanovski
05d501632e Fixing jungle. 2019-08-21 20:41:32 +02:00