Commit Graph

202 Commits

Author SHA1 Message Date
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
26ebf7af33 Fixed test case. 2020-04-27 14:25:10 -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
faa2cfd79f Changed order of operations. 2020-04-26 16:29:03 -05:00
b492017ef2 Changed to using the constants. 2020-04-26 16:06:26 -05:00
ed4996ff9f Tuned cache values. 2020-04-26 16:05:52 -05:00
b769c83be1 Increased cache size. 2020-04-26 15:42:22 -05:00
2b05dfe4cc Changed to use of read and write locks in cache.
Also added specifics to constructor for the hash map.
2020-04-26 15:42:02 -05:00
02f7de56ed Minor changes to alternator. 2020-04-26 15:09:13 -05:00
60217e4672 World height shader should now be less abrupt. 2020-04-26 15:03:34 -05:00
925296f326 Minor improvement to cache by reducing area under lock. 2020-04-26 02:04:29 -05:00
98e4265db7 Attempted at making all things world gen thread proof.
Specifically, caching is tested thread proof.
2020-04-26 01:28:45 -05:00
f20515fd45 Reworked cache, this time with less hashmap accesses. 2020-04-25 22:32:25 -05:00
dcec9fd7e7 Made sure occurrences are properly tracked. 2020-04-25 18:16:18 -05:00
4b6cfacc47 Fixed clear cache method.
Alternator currently uses threads as identifier (TEMPORARY).
2020-04-25 17:59:30 -05:00
1e0d63e562 Added a magnitiude addition helper function. 2020-04-25 17:54:40 -05:00
629660c8fc Revamped caching again, this time, without sorting.
Implemented cache changes.
2020-04-25 17:54:25 -05:00
91644f9ba0 New cache system.
Caching itself is tested.

Implemented into classes (untested).
2020-04-25 12:06:41 -05:00
1c5baf8762 Removed unnessecary hashmap retrieval from cache. 2020-04-25 02:23:48 -05:00
a7db7d289a Caching now has a fresh importance factor. 2020-04-25 01:32:01 -05:00
28b9a8005c Gave newly cached items usage greater than the lowest. 2020-04-25 01:15:38 -05:00
a412986044 New iteration of biome generator.
Untested.
2020-04-25 00:18:53 -05:00
e93f61c055 Added convenience constructor. 2020-04-25 00:18:29 -05:00
34ccc1e7de Semi-functioning biome generator.
It's faster now, but sometimes hangs, and is still pretty slow.
2020-04-24 22:11:52 -05:00
d0facd268a Fixed world generator not saving generated values. 2020-04-24 22:10:59 -05:00
c5e3c08546 Refactoring. 2020-04-24 17:50:18 -05:00
8517a20f9f Reworked biome per island generator. 2020-04-24 15:15:44 -05:00
60ab555c57 Added caching solution to temperature map generator. 2020-04-24 15:15:44 -05:00
6c8389d60e Lowered amount of octaves. 2020-04-24 15:15:44 -05:00
2e67cb90ca Increased max cache size and fixed caching on method. 2020-04-24 15:15:44 -05:00
2d9163f5c2 Added two utility functions. 2020-04-24 15:15:44 -05:00
ffc01f0ddf Minor doc and method name changes.
Respective tests updated.
2020-04-24 15:15:24 -05:00
8acc653b5b Attempted to make cache system thread compatible. 2020-04-24 15:12:32 -05:00
88c645e2a5 Some value changes.
Largely untested.
2020-04-24 00:02:11 -05:00
1b5a03d72a Added value caching to world mapper.
Largely untested.
2020-04-24 00:01:03 -05:00
be19db1f9b Separated node class from DFS class. 2020-04-23 23:07:49 -05:00
de3b3a614a Changed DFS order of operation. 2020-04-23 21:16:43 -05:00
e50a983b25 Added simple caching system. 2020-04-23 20:15:45 -05:00
5ffea1aa08 DFS max limit check change. 2020-04-23 11:51:54 -05:00
74f5d25dbc Changed furthest island adaption search to 2048 blocks. 2020-04-23 00:02:14 -05:00
e936dff934 Fixed logical fallacies for world mapper.
Method name changed (refactor) as well.
2020-04-23 00:01:35 -05:00
7d07332ef5 World mapper and biome generator reworked;
World mapper now produces normalized values.

The world height shader uses the values to decide on heights.

The current biome generator was reworked (untested).

Also renamed (refactoring) the mapper.
2020-04-22 21:15:37 -05:00
4ed9d4d272 Tested DFS direction assisted search. 2020-04-22 19:41:25 -05:00
ed48e164b6 Cleaned up DFS testing.
Changed all maps to files.
2020-04-22 18:49:06 -05:00
c3998150f9 Added more tests.
Added a very large map for tests.
Added testing for DFS limiter.
2020-04-22 18:41:33 -05:00
44c6880e07 Added a maximum node count to DFS. 2020-04-22 18:40:17 -05:00
39b5d0e778 Added map file reading to the DFS test. 2020-04-22 17:51:11 -05:00
c8715e3dbb DFS target finding will now prioritize user given end node.
Meaning if the general area of the target is known, DFS can use it.
2020-04-22 17:50:19 -05:00
919c5201e4 Updated plugin.yml to reflect dependency changes. 2020-04-22 03:28:00 -05:00
c3d5ba1683 Added large test map to DFS find end tests. 2020-04-21 23:41:50 -05:00
6d552820ee DFS instantiation in biome generator is now correct.
Performed refactoring

Began work on world height shader (untested).
2020-04-21 20:59:03 -05:00
e2c3e46849 Refactor. 2020-04-21 19:32:54 -05:00
e306d828e9 Added the shape shader, also refactored. 2020-04-21 19:31:09 -05:00
66673e2f52 Made sure alternator was semi-multithread safe. 2020-04-21 17:01:53 -05:00
533a758799 Finished untested biome generator.
Also:
Changed plugin structure to adapt better to server API
Refactored by reorganizing packages.
2020-04-21 16:40:29 -05:00
35e52ae61b Refactoring. 2020-04-21 11:40:23 -05:00
67a93fff5b Reworked biome generation and used DFS for continuity.
Also made changes to structure to better support Bukkit's structure.
2020-04-21 02:59:19 -05:00
4fc824f94f Removed the bedrock metadata system. 2020-04-21 02:55:18 -05:00
d44b059457 Changed DFS algorithm to use hashset. 2020-04-21 00:42:00 -05:00
f5e3435d8b Added a target coordinate finder.
Implemented DFS name changes.
2020-04-20 23:26:44 -05:00
cf6a371428 Added some getters to the metadata pack. 2020-04-20 20:26:04 -05:00
c860ba1a15 Tested biome selector.
Also deleted launch.json.
2020-04-20 19:13:01 -05:00
623ee1a544 Removed use of mountain edge. 2020-04-20 19:12:29 -05:00
c6001bdfea Refactored and updated to JUnit 5. Fixed biome selector. 2020-04-20 18:57:37 -05:00
78cd32106f Added another invalid map test case to DFS tests. 2020-04-20 17:37:14 -05:00
81fb18ab3d Tested DFS search algorithm. 2020-04-20 17:34:24 -05:00
a3024f6e91 Implemented changes to world generator and plugin class. 2020-04-20 16:28:30 -05:00
5b0942202a Finished untested biome per island generator. 2020-04-20 16:27:53 -05:00
44f183cca0 Improved island map generator.
Added documentation as well.

Untested.
2020-04-20 16:27:15 -05:00
6cf1f6dcc1 Deleted old code. 2020-04-20 16:26:28 -05:00
d506b60f07 Added simple bedrock layer generator. 2020-04-20 16:25:57 -05:00
4b9c5ca440 Implemented DFS algorithm.
Untested.
2020-04-20 16:24:49 -05:00
85dd6e6e3d Added bedrock metadata.
Stores:
* A temporary island id.
* The main biome of the island.
* The shore biome of the island.
* The temperature of the island.
* The owner UUID of the island.
2020-04-20 16:24:11 -05:00
c9dd2a1c4b Changed temperature generator to return float. 2020-04-20 16:18:33 -05:00
37aa598d8f Adding to plugin base.
Untested.
2020-04-19 20:32:22 -05:00
943feece04 Added a few more generators to aid map gen.
Untested.
2020-04-19 20:32:16 -05:00
4b644159cb Clean up. 2020-04-19 20:31:21 -05:00
2ace74972e Added biome generator and interface.
untested.
2020-04-19 20:23:10 -05:00
3c41444dfa added selector that helps with selecting which biome to generate.
Untested.
2020-04-19 20:22:48 -05:00
23f761c36f Added utilities and a hashmap inverter. 2020-04-19 18:17:17 -05:00
08a23c1bf2 Ran with some changed values. 2020-04-19 03:24:38 -05:00
1dbb329dc1 Basic terrain generator implemented.
Needs fine tuning.
2020-04-19 03:13:08 -05:00
66480084d7 Basic island generation occurring. 2020-04-18 23:22:21 -05:00
be133a11c4 Basic structuring and added WorldGeneratorAPI.
Also fixed typo.
2020-04-18 22:07:56 -05:00
22429cd759 Changed name for Zany's Minigames. 2020-04-18 01:33:24 -05:00
86d63bfee5 Created template bukkit plugin.
Generated using maven.
2020-04-18 00:08:05 -05:00