127 Commits

Author SHA1 Message Date
d4c0fa259c Further toying with values.
Primitive generation working.
2020-05-02 22:40:56 -05:00
79edd9bf29 Several changes to chunk generation operation.
Multiple values adjusted.

Pipeline changed.

Changed server start script to not wait for debugger.
2020-05-02 19:22:45 -05:00
d8d0744350 Registered chunk loader into bukkit event listener. 2020-05-02 19:21:32 -05:00
486a0f837f Basic terrain shaping added.
World height shader "shades" the primitive island height giving variation to land and sea.

World layer shader "shades" the primitive islands with varying layers dependent on biomes.

Mapper values was changed to perform the more targetted task of generating island locations and masks.

Biome selector now takes a random at call to help with seed consistency (due to threading, this may still be problematic).

Chunk generator implements the new changes.

Tests implement new changes.
2020-05-02 00:06:58 -05:00
a6cebe703b Now generating primitive islands.
Favourable island mapper values.
2020-05-01 18:37:06 -05:00
e4597538b2 Chunk generation now generates sea and island.
Adjusted values for the island mapper.
Island world mapper now takes a seed instead of a random object.
Refactoring of method names.

Reduced cache sizes used by terrain generation.

Reworked height shader to not use it's own noise generator.

Updated tests implementing changes respectively.
2020-04-30 21:42:03 -05:00
d0701ce63d Changed async execution setup.
Two beta threads with lower thread priority and one alpha with normal thread priority.

Implemented use of both in chunk loading.
2020-04-30 16:26:11 -05:00
9b111cc977 Cache value now has convenience constructor.
Implemented the changes.

Also placed putting data in hashmap priority so for faster access.
2020-04-30 15:50:14 -05:00
3e80d1e67d Height shader now takes random object in constructor.
Removed old height shader code having to do with this change.

Implmemented changes to chunk generator.
2020-04-30 15:11:35 -05:00
0eb2a13d14 Adding to usage list before to hashmap for better concurrency. 2020-04-30 14:53:48 -05:00
50ee956ce7 Removed some debugging code, removed instance of double locking. 2020-04-30 14:51:14 -05:00
387393632d Cache now no longer locked from reading while writing.
Fixed another case where writing is followed by consecutive reading.
2020-04-30 14:40:28 -05:00
c60e94728e Added fix for another potential multithreaded case for cache.
Case: consecutive gets.
2020-04-30 01:03:52 -05:00
83297a1d10 Improved cache performance by removing locks.
These sync locks can be removed because of fixing the multithread cases in the previous commit.
2020-04-30 00:20:32 -05:00
f7eb94ae39 Corrected false assumption in caching logic. 2020-04-30 00:09:58 -05:00
f637e79ea5 Refactoring. 2020-04-29 23:13:15 -05:00
64a3e3db27 Slightly faster. 2020-04-29 22:53:28 -05:00
c963ad140f Chunk generator asyncronously generates block values.
Also added parallel capable override.
2020-04-29 20:12:54 -05:00
c6fd9a833c Revert to "Island world chunk generator now pre-generates island values."
This reverts commit e40bf74cb83707e1fa72ba231cb26a2f9450d8d5.
2020-04-29 19:14:20 -05:00
a119e6f596 Removed unneccesary blocking call. 2020-04-29 16:31:38 -05:00
4c93e85078 Fixed error.
The order of checking for null prioritizing was swapped.
2020-04-29 16:28:24 -05:00
6f27e52c6b Improved locking scheme of cache. 2020-04-29 16:25:27 -05:00
e40bf74cb8 Island world chunk generator now pre-generates island values.
Also implements the new biome selector.
2020-04-29 15:06:24 -05:00
5b1bb4288d Biome selector no longer requires random parameter.
Implemented new biome selector changes.
2020-04-29 15:06:14 -05:00
c2fb0ffea8 Added executor to utilities. 2020-04-29 14:00:30 -05:00
14d0375c7e Added threading for building the biome grid. 2020-04-29 13:11:07 -05:00
a102f53365 Changed locking positions. 2020-04-29 13:05:04 -05:00
8595ab0c4e Biome generator change in way of caching island info.
Biome cache now stores a 4 biome values: current, main, shore, and shallow.
2020-04-28 23:15:29 -05:00
7311327d8d Turning cache fairness off. 2020-04-28 17:40:28 -05:00
9883a98aa0 Testing with fairness turned on for cache. 2020-04-28 17:37:10 -05:00
e7f5558aa5 Added doc and changed accessibility of support class. 2020-04-28 17:35:08 -05:00
b30d689183 Reworked thread safe cache solution.
Also performed refactoring.

And added some threaded tests.
2020-04-28 16:53:23 -05:00
7c073cdc6e Preventing flooder from checking same node.
Added another flooder test.
2020-04-27 23:17:54 -05:00
85ec44a4d7 Flood algorithm added and (basic) tests performed. 2020-04-27 21:10:55 -05:00
2a0f26f8bc Reworked operation order for DFS. 2020-04-27 20:35:32 -05:00
250334e348 Fixed cache locks as they were swapped.
Must've been real tired or something while writing that.
2020-04-27 17:06:10 -05:00
3675074d00 Tested generator system. 2020-04-27 16:06:01 -05:00
49f26f7901 Fixed conversion from world to chunk coords.
Added test that catches this case.
2020-04-27 15:14:33 -05:00
1e8dc8019a Current iteration of work.
Attempted at fixing the coordinate converter again.

Added more applicable tests for them.

Changing to a more stateless design for biome generator.

Refactored correcting package name to fit conventions.
2020-04-27 14:23:57 -05:00
59d78c9754 Fixed toString() format. 2020-04-27 13:58:39 -05:00
3efc6acf0b Fixed the utilities world to local non perfect positive case. 2020-04-27 13:53:29 -05:00
ec27a9bc10 Fixed perfect chunk coordinates in utilities.
Added respective tests to ensure this doesn't break.
2020-04-27 13:44:49 -05:00
39381f07f9 Fixed incorrect method call.
Added tests to make sure that this doesn't happen.
2020-04-27 13:21:04 -05:00
6ac686b86c Refactoring with different heavy changes to biome generator.
Attempt at making it my async compatible.
2020-04-26 23:07:25 -05:00
0886412cfb Point2 can now overrides toString(). 2020-04-26 20:56:44 -05:00
4f411c42fb Added conversion from world coordinates to utilities.
Respective tests also added.
2020-04-26 20:56:10 -05:00
16618ef439 Added chunk load listener. 2020-04-26 18:23:20 -05:00
b63c39b380 Changed biome cache to cache biomes instead of arrays. 2020-04-26 17:40:18 -05:00
df10a2c298 DFS can now take Point2 as parameters for its searches. 2020-04-26 17:28:57 -05:00
e8340bfc91 DFS's should now run locally on each thread. 2020-04-26 16:47:22 -05:00