Mindwerks / worldengine

World generator using simulation of plates, rain shadow, erosion, etc.
MIT License
981 stars 127 forks source link

Refactor drawing functions #248

Closed MM1nd closed 6 years ago

MM1nd commented 6 years ago

Hi again,

this is at best the first step on a long journey to make ancient_map faster. However, this is huge already, so I'm making it a PR before continuing. Note that while there is one more PR to come for generate_world this is not related to those changes I made a year ago. This is new.

It does a lot of things so let's explain:

Biomes

Bugfix

Quality of Life Improvement

Refactorings

Speedup

Next steps

Cheers Alex

ftomassetti commented 6 years ago

The code definitely looks nicer, if we are sure it also produces the same result... it is quite an achievement!

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.04%) to 85.331% when pulling a6c3b96fd6a261d69dc17fc4f344e11b7abb3d6c on MM1nd:refactor_drawing_functions into b5db0c6db7b99636a7490049db4610beb14d5a23 on Mindwerks:master.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.04%) to 85.331% when pulling a6c3b96fd6a261d69dc17fc4f344e11b7abb3d6c on MM1nd:refactor_drawing_functions into b5db0c6db7b99636a7490049db4610beb14d5a23 on Mindwerks:master.

MM1nd commented 6 years ago

"if we are sure it also produces the same result... it is quite an achievement!"

I triple checked at all stages. Not saying its impossible that I missed something, but it seems unlikely. Ideally you make a reference image and see for yourself. The tests are good (currently travis fails for a pyflakes annoyance, I'm about to fix that)

codecov-io commented 6 years ago

Codecov Report

Merging #248 into master will decrease coverage by 0.67%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #248      +/-   ##
==========================================
- Coverage    80.4%   79.72%   -0.68%     
==========================================
  Files          28       28              
  Lines        3888     3625     -263     
  Branches      768      726      -42     
==========================================
- Hits         3126     2890     -236     
+ Misses        572      546      -26     
+ Partials      190      189       -1
Impacted Files Coverage Δ
worldengine/biome.py 100% <100%> (ø) :arrow_up:
worldengine/common.py 84.88% <100%> (+1.98%) :arrow_up:
worldengine/drawing_functions.py 80.8% <100%> (-3.55%) :arrow_down:
worldengine/cli/main.py 79% <100%> (ø) :arrow_up:
worldengine/model/world.py 74.5% <100%> (-1.9%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b5db0c6...7fbe66b. Read the comment docs.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.8%) to 84.455% when pulling a58344d4ea57ea6f52021b8802c2d8ecd524f137 on MM1nd:refactor_drawing_functions into b5db0c6db7b99636a7490049db4610beb14d5a23 on Mindwerks:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.8%) to 84.455% when pulling a58344d4ea57ea6f52021b8802c2d8ecd524f137 on MM1nd:refactor_drawing_functions into b5db0c6db7b99636a7490049db4610beb14d5a23 on Mindwerks:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.6%) to 84.725% when pulling 4e15c106a212f6b04b7f117ebf4ba484c7b8792f on MM1nd:refactor_drawing_functions into b5db0c6db7b99636a7490049db4610beb14d5a23 on Mindwerks:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.6%) to 84.725% when pulling 4e15c106a212f6b04b7f117ebf4ba484c7b8792f on MM1nd:refactor_drawing_functions into b5db0c6db7b99636a7490049db4610beb14d5a23 on Mindwerks:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.6%) to 84.725% when pulling 4e15c106a212f6b04b7f117ebf4ba484c7b8792f on MM1nd:refactor_drawing_functions into b5db0c6db7b99636a7490049db4610beb14d5a23 on Mindwerks:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.4%) to 84.938% when pulling 7fbe66b336036f0af494979bf391e651a6284cde on MM1nd:refactor_drawing_functions into b5db0c6db7b99636a7490049db4610beb14d5a23 on Mindwerks:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.4%) to 84.938% when pulling 7fbe66b336036f0af494979bf391e651a6284cde on MM1nd:refactor_drawing_functions into b5db0c6db7b99636a7490049db4610beb14d5a23 on Mindwerks:master.

psi29a commented 6 years ago

I'm overwhelmed by how professional your posts/PRs are, from documentation to code itself. Great job!

MM1nd commented 6 years ago

Well, thank you!

psi29a commented 6 years ago

time python worldengine -x 1024 -y 1024 went from real 5m43.636s to real 2m5.086s

Great work!