Commit Graph

9552 Commits

Author SHA1 Message Date
Marcel Märtens
876702dd2d sync 2021-08-13 10:55:04 +02:00
Marcel Märtens
4726c93f1c cleanup after the fix which is now possible 2021-08-13 10:54:37 +02:00
Marcel Märtens
a4a5cf048e Solve the EntryLayer problem by removing that Trait and hardcoded implementing it for the few structs.
Not perfect, not rust-ly nice, but i have the feeling that rust needs some more time to counter this pattern. However it even occurs with stable features (the Lifetime of C,I and T as you see in the previous commit)
I have found: https://matklad.github.io/2018/05/04/encapsulating-lifetime-of-the-field.html which looks like it might be related to my problem. but i am not yet sure, anyway, problem solved for now, future will tell
2021-08-13 10:54:08 +02:00
Marcel Märtens
497b5528bf try to get the lifetime of EntryLayer to its function not to the EntryLayer, on and simplyfiy the DataWriterIter 2021-08-13 10:53:41 +02:00
Marcel Märtens
ff0d44d015 implement a DeltaStorage System similar to DataStore, however i stil need to make duplicate non modifyable and mutable implementations, even though i only need mut, and this should somehow be simplified. also the borrow checker is still quite chaotic 2021-08-13 10:53:15 +02:00
Marcel Märtens
7a1d04f320 first work on modifing lodstore 2021-08-13 10:52:47 +02:00
Marcel Märtens
73e130c097 cleanup and modify file structure
now we create seperate files for materializeable and layers which cover A) the trait and B) the implementations of data and delta inside
this helps to find the right stuff in this trait chaos :D
also those structs/trait are prob often edited at once
2021-08-13 10:52:21 +02:00
Marcel Märtens
e36b9d90db make delta Materializeable, curretly it just passes read through
added tests and benchs for delta, delta has no overhead in performance
2021-08-13 10:51:55 +02:00
Marcel Märtens
750048f26c Put the .trav() function into a new Trait: EntryLayer
this trait needs to be implemented for the TopMost Layer of a LodTree as well of the LodDelta.
This can be archived by a lot of trait magic.
However, due to a fight with the borrow checker, this commit here contains a lot of weird lifetimes, i really have no idea, and prob will cleanup this, BUT, it compiles, and tests run green
2021-08-13 10:51:29 +02:00
Marcel Märtens
91f5ad141c delta implementation
the delta has a traversable iterator
then we create a deltawriter that gets a reference to delta and data
deltawriter also gets a traverable interator which uses the existing traversables
2021-08-13 10:51:03 +02:00
Marcel Märtens
d58b78d92b general worldsim cleanup 2021-08-13 10:50:34 +02:00
Marcel Märtens
b297f3b479 remove old LodStore Implementation completly, making the new one default.
Regression: as of this commit, it failes to compile with rust nightly 2019-10-02
Regression: LodDelta is not implemented yet
Regression: LodMakeAtLeast is not implemented yet
Regression: Tests are missing
2021-08-13 10:48:13 +02:00
Marcel Märtens
7039d5a29c move away from the system that a layer stores it's parent index, but let a layer store their index used to access the child data. which makes everything much clearer and nicer to read and easier to develop on
Redone the whole implementation again on this and now use a trait for HashResult and VecResult which solves the .get() problem and .mat() problem
added benchmarks and (with repeated tests) we gain 14ns for 1 hash lookup and 2 veclookups and the result vec lookup
2021-08-13 10:47:46 +02:00
Marcel Märtens
1605fe202e experiment with simplified version to fix the get problem 2021-08-13 10:47:17 +02:00
Marcel Märtens
40a20001d8 use associated_type_bounds to implement the Traversable, but it only works for once limitation at once because of a limitation in the rust compiler, which thinks there is a ambiguity (KEY=u16, KEY=32) which is not possible 2021-08-13 10:45:39 +02:00
Marcel Märtens
9f69dbb4ca experiment with KeyConvertable which has compress undcompress function
set a tem OWN_PER_PARENT const because i couldn't figure out childs correctly
experiment with a first get implementation, and choose to make trav return a ResultLayer on current layer not one below
2021-08-13 10:35:40 +02:00
Marcel Märtens
4847229457 cleanup and renaming LodIndex to LodPos in new data implementation 2021-08-13 10:35:11 +02:00
Marcel Märtens
70831aea62 move to associated types in most traits to clean up mess
implement a api to travers to the Detail already
create a DetailStore for actual work on the Detail
create Nestable for child layer trait
update description
2021-08-13 10:34:43 +02:00
Marcel Märtens
85ca33024c added an experimental new data model which is based on more traits and structs 2021-08-13 10:34:13 +02:00
Marcel Märtens
5617efff48 implement LodDelta to catch changes in LodData
test caching of LodData access
2021-08-13 10:22:42 +02:00
Marcel Märtens
d5dca4f6e8 work on a deltas, to store the diff while working on data.
this state does not work, because i tried to iplement delta in a trait type. however this is not necessary, i will revert this.
Just keep this commit for historical reasons - it wont build.
2021-08-13 10:22:11 +02:00
Marcel Märtens
536ef3d6ff increasing performance by another 10-20% on read as well as on write
Option<usize> takes 16 bytes which we cannot allow,
so we use a u32 to store the same information, we use std::u32::MAX to mark that a LOD has no children
we have no checks for that limit, so we hope it never gets that high... dear god...
the intel laptop statistics now seem to be alot more stable and even top the ryzen desktop statistics, we get faster in every bench
2021-08-13 10:21:41 +02:00
Marcel Märtens
caa7150556 fix all tests, now the new ECS access should work fine.
this implementations reaches about 3000 ns per access, need to improve further
2021-08-13 10:21:13 +02:00
Marcel Märtens
3c92e831e7 bring basic new featureset to work with make_at_least, still needs to fix some bugs 2021-08-13 10:20:32 +02:00
Marcel Märtens
a3c36f135a implement a new version, that uses a more ecs approach of LOD.
the old implementation needed a Vec per Element, which itself needs 24 bytes, which is a huge overhead for a single byte element.
the new implementation has global Vec per region and only needs a index for the first element, which might be 8 bytes (implementation 4 bytes because of some assumptions) or none at all.
It's still not ideal, because it will requiere alot of duplicate coding.

Former-commit-id: 7172829c18ceabe67689487ffd269ebe62d1647b
2021-08-13 10:11:50 +02:00
Marcel Märtens
1456497bd0 start working on RFC#11,
implement a regionmanager and basic region component as well as tests for those
this is a fist implementation and likly to change

Former-commit-id: fdb7097dc30ab1642d25a02532458bcc2811ab61
2021-08-13 10:08:21 +02:00
Marcel
add74cd0ea Merge branch 'xMAC94x/fix_1165' into 'master'
remove futures_executor from renderer and rather pass tokio runtime to it...

See merge request veloren/veloren!2755
2021-08-11 15:26:08 +00:00
Marcel
0bedfde53e Merge branch 'trade-window-improvements' into 'master'
UI: Fixes and enhancements to the trading window

See merge request veloren/veloren!2738
2021-08-11 09:25:17 +00:00
Marcel Märtens
bc821a46cd code cleanup 2021-08-11 09:42:29 +02:00
Marcel Märtens
889a8d11f5 zest prefers this over await 2021-08-11 01:23:48 +02:00
Marcel
631b4747d9 Merge branch 'juliancoffee/i18n_sprites' into 'master'
Localization for sprite overitem (currenly only crafting stations)

See merge request veloren/veloren!2759
2021-08-10 23:17:25 +00:00
Illia Denysenko
2a093a9991 Localization for sprite overitem (currenly only crafting stations) 2021-08-10 23:17:25 +00:00
Marcel Märtens
32e58c4b17 remove futures_executor from renderer and rather pass tokio runtime to it properly. therefore the runtime is now created with Voxygen rather than with the Connect attempt 2021-08-11 00:38:03 +02:00
Marcel
92684b31fa Merge branch 'kilpkonn/camera_clipping' into 'master'
Camera clipping

Closes #955

See merge request veloren/veloren!2730
2021-08-10 12:20:27 +00:00
Tavo Annus
6114cbbcf3 Fix skybox jumping 2021-08-10 14:01:09 +02:00
Tavo Annus
5c5f172667 Use old strategy for far distances 2021-08-10 14:00:59 +02:00
Tavo Annus
06b8ad62d3 Minor tweaks to clipping, style fixes 2021-08-10 14:00:51 +02:00
Tavo Annus
ad075b55c9 Allow trees to pass between character and camera for bigger distances 2021-08-10 14:00:42 +02:00
Tavo Annus
e834711293 Fix character being too close in menu 2021-08-10 14:00:34 +02:00
Tavo Annus
a7aa37f7f6 Fix camera shaking & Style fixes 2021-08-10 14:00:13 +02:00
Tavo Annus
42dab09249 Improve camera clipping 2021-08-10 13:59:41 +02:00
Marcel
9b7fe0b7e6 Merge branch 'juliancoffee/kit_all' into 'master'
Implement `/kit all` and a bit of refactoring

See merge request veloren/veloren!2752
2021-08-10 11:26:31 +00:00
juliancoffee
3ac74a8259 Implement /kit all and a bit of refactoring
+ notifying about sucessful kit application
+ notifying about case with insufficient space
+ handle case where you don't have enough free slots
+ handle quantity of non-stackable items
+ add test for items in kit manifest
2021-08-10 13:28:38 +03:00
Samuel Keiffer
d5feca45c5 Merge branch 'pacmanmati/veloren-pacmanmati/1224-consolidate-redundant-stage-sections' into 'master'
Consolidate redundant stage sections

See merge request veloren/veloren!2748
2021-08-10 01:23:26 +00:00
Sam
2103abbb76 Fixed sfx file after consolidation. 2021-08-09 20:24:04 -04:00
Marcel
9f15062849 Merge branch 'juliancoffee/all_item_defs' into 'master'
Use asset::load_dir to get list of all items

See merge request veloren/veloren!2751
2021-08-09 23:42:43 +00:00
Marcel
cde1283e04 Merge branch 'juliancoffee/deterministic_dungeons' into 'master'
Don't chose room kinds with dynamic_rng

See merge request veloren/veloren!2750
2021-08-09 23:33:13 +00:00
juliancoffee
449902a50e Use asset::load_dir to get list of all items 2021-08-10 02:03:46 +03:00
Samuel Keiffer
f131adaba7 Merge branch 'snowram/map-level-ux' into 'master'
Makes dungeons start at level 1 visually

See merge request veloren/veloren!2545
2021-08-09 15:56:27 +00:00
juliancoffee
771df2f0f1 Don't chose room kinds with dynamic_rng 2021-08-09 18:19:35 +03:00