Wilderness Overhaul

Show off your mod creations or just a work in progress.
Post Reply
User avatar
carademono
Posts: 210
Joined: Sat Jul 11, 2020 3:20 pm

Re: Wilderness Overhaul

Post by carademono »

Daniel87 wrote: Fri May 21, 2021 5:29 pm I am currently experiencing similar problems (I cant even see my built mod).
Hazelnut found a quick work-around. Deactivate fireflies and shooting stars in the mod settings, then it should work.
Sadly, that didn't work for me :( But I did get a commit from last month working and it already looked great back then :D . I'll try to contain myself while you get the issues worked out!

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Wilderness Overhaul

Post by Hazelnut »

I needed to add an if statement to stop it adding shooting stars even when the option is disabled. I did note this in the other thread.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Daniel87
Posts: 391
Joined: Thu Nov 28, 2019 6:25 pm

Re: Wilderness Overhaul

Post by Daniel87 »

Hazelnut wrote: Fri May 21, 2021 6:36 pm I needed to add an if statement to stop it adding shooting stars even when the option is disabled. I did note this in the other thread.
I pushed that change already. If I downloaded it from git within the last couple of hours, it should be in there.
Just wished I could figure out why I can't see my own mod and won't even get errors. Makes debugging close to impossible :/
In Julianos we Trust.

User avatar
Daniel87
Posts: 391
Joined: Thu Nov 28, 2019 6:25 pm

Re: Wilderness Overhaul

Post by Daniel87 »

We are back in business!
In Julianos we Trust.

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Wilderness Overhaul

Post by Hazelnut »

Hi, I mentioned before that I'd seen a lot of memory allocations on the assign tiles job in your mod. Thought I'd take a quick look and I think I've removed the extra memory allocation issues. You'll need to check that it definitely functions identically, but I think it does.

Just to give you a sense of the difference here are the before and after from the profiler. You can see that just memory allocation was taking 3.36ms before with each job thread (10 on my ryzen 5600) taking around 8.8ms. After switching the find with predicates to a simple for loop, there are no memory allocations visible and each thread spends 0.7ms or less on this job.

Will send a PR to your repo but do check the function is the same. Hopefully this will be a nice simple change to make terrain a bit smoother for lesser PCs with your mod. :)
Attachments
WOperf.png
WOperf.png (151.62 KiB) Viewed 1931 times
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Daniel87
Posts: 391
Joined: Thu Nov 28, 2019 6:25 pm

Re: Wilderness Overhaul

Post by Daniel87 »

Hazelnut wrote: Sun May 23, 2021 8:57 pm Hi, I mentioned before that I'd seen a lot of memory allocations on the assign tiles job in your mod. Thought I'd take a quick look and I think I've removed the extra memory allocation issues. You'll need to check that it definitely functions identically, but I think it does.

Just to give you a sense of the difference here are the before and after from the profiler. You can see that just memory allocation was taking 3.36ms before with each job thread (12 on my ryzen 5600) taking around 8.8ms. After switching the find with predicates to a simple for loop, there are no memory allocations visible and each thread spends 0.7ms or less on this job.

Will send a PR to your repo but do check the function is the same. Hopefully this will be a nice simple change to make terrain a bit smoother for lesser PCs with your mod. :)
You are awesome! Thanks a lot!
I was planning to spaghetti code my way through until the mod has everything implemented as I imagined it. After that I would refactor everything and optimize wherever I can. In that step, I could really need your experience, if you would like to help me optimizing it. ( and there will be a lot that can be optimized, right now I just try to make things work, no matter the cost, hehe).
In Julianos we Trust.

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Wilderness Overhaul

Post by Hazelnut »

Daniel87 wrote: Sun May 23, 2021 9:03 pm You are awesome! Thanks a lot!
I was planning to spaghetti code my way through until the mod has everything implemented as I imagined it. After that I would refactor everything and optimize wherever I can. In that step, I could really need your experience, if you would like to help me optimizing it. ( and there will be a lot that can be optimized, right now I just try to make things work, no matter the cost, hehe).
No problem, glad to help when I can. It's definitely the right approach to get the functionality implemented first, and optimise once you have that done. I'm not saying don't consider efficiency as you go, but it's best to focus on the objectives and then see if there are any bottlenecks - it's easy to waste effort optimising stuff that either gets changed anyway or doesn't make much difference. Let me know when you're closer to done functionally and I'll whip out the profiler again and see what I can see. I had to learn how to use it when I moved the terrain generation into the unity jobs system. (so you know who to blame now for that weird job scheduling stuff! :D)
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Daniel87
Posts: 391
Joined: Thu Nov 28, 2019 6:25 pm

Re: Wilderness Overhaul

Post by Daniel87 »

Hazelnut wrote: Mon May 24, 2021 9:46 am
Daniel87 wrote: Sun May 23, 2021 9:03 pm You are awesome! Thanks a lot!
I was planning to spaghetti code my way through until the mod has everything implemented as I imagined it. After that I would refactor everything and optimize wherever I can. In that step, I could really need your experience, if you would like to help me optimizing it. ( and there will be a lot that can be optimized, right now I just try to make things work, no matter the cost, hehe).
No problem, glad to help when I can. It's definitely the right approach to get the functionality implemented first, and optimise once you have that done. I'm not saying don't consider efficiency as you go, but it's best to focus on the objectives and then see if there are any bottlenecks - it's easy to waste effort optimising stuff that either gets changed anyway or doesn't make much difference. Let me know when you're closer to done functionally and I'll whip out the profiler again and see what I can see. I had to learn how to use it when I moved the terrain generation into the unity jobs system. (so you know who to blame now for that weird job scheduling stuff! :D)
Hehe, I would never call it weird scheduling stuff as it is way beyond my current level and to me appears like black magic. Definitely great work!
In Julianos we Trust.

yabay
Posts: 149
Joined: Wed Aug 14, 2019 11:32 am
Location: Russia

Re: Wilderness Overhaul

Post by yabay »

.
Last edited by yabay on Sat May 29, 2021 2:20 pm, edited 1 time in total.

User avatar
Daniel87
Posts: 391
Joined: Thu Nov 28, 2019 6:25 pm

Re: Wilderness Overhaul

Post by Daniel87 »

yabay wrote: Mon May 24, 2021 4:33 pm Somewhere deep in the Dragontail Mountains... The sanctuary of the ancient Nedes...2021_05_24_07_16_00.jpg
:D :D :D Yeah, I still have them spawn too frequently, same as the mushroom rings. Need to figure out a better way of creating more unique structures like this :D
In Julianos we Trust.

Post Reply