Markeen can take quite a long time to generate a full level set now that the generator takes multiple passes and has more complex logic. The level generation itself takes place on a single thread, so the problem of generating several levels for one batch is clearly amenable to multithreading. So today, I rearranged the outermost loop to instead queue one thread pool work item for each level. As the levels come in, they are added to the level set object.
Sure enough, building a level set now goes a lot faster. The progress indicators in the console are now intertwined with each other, which looks pretty crazy and conveys no information; I'll need to figure out a system to show the progress. At least Markeen can now take full advantage of the system's processing power.
No comments:
Post a Comment