remance / Masendor

Open source educational and historical battle action game, All helps accepted
MIT License
143 stars 32 forks source link

Battle loading screen feedback #37

Closed coppermouse closed 1 year ago

coppermouse commented 1 year ago

Extra things that were fixed

Historical -> historical

Because of path issues I modifed the CSV file where you can find the name "Historical". The path uses this string.

Alternative solution could be

  1. modify the path builder so it lower case the path just before being used
  2. rename the folder to have uppercase (I do not like that solution)

What about those if file_name.startswith("."): continue

Since I am using vim it creates dot-files sometimes. When it does there becomes issues. So added this line in two parts in the code to ignore those dot-files and therefore no more issues.

Pep

I added a bash-script (not sure if everyone can run it) that print pep warnings in the code (it only show files modified since main to prevent see all warnings). If you can't use bash you might be able to run this in any other command-tool. If you want you can add extra rules and ignores to this command. I hope we can see this file as a common source of how the pep rules should be in the project.

Tests

I written some tests. I didn't see any tests folder so I added one.

Conclusion

In this branch there were two things solved.

  1. show load output (split down the steps and show time on each step)
  2. Cache the thing that took the most time (create troop sprite pool)

Cache troop sprite pool is big (~300mb). I would like to investigate the surfaces in that file, could there be a lot of duplicates?

Cache only makes the loading faster for those who play the same level twice. It might be worth looking into how to make the first load faster.

I see this branch as a success. This will make the game development a lot less cumbersome because waiting a full minute (my compute at least) really slows down the progress and flow of the development IMO.