Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide Access to Module Assets in AGS #5012

Open
jdrueckert opened this issue May 10, 2022 · 2 comments
Open

Provide Access to Module Assets in AGS #5012

jdrueckert opened this issue May 10, 2022 · 2 comments
Labels
Status: Needs Discussion Requires help discussing a reported issue or provided PR Topic: Architecture Requests, Issues and Changes related to software architecture, programming patterns, etc. Topic: WorldGen Requests, Issues and Changes related to facets, rasterizers, etc. Type: Improvement Request for or addition/enhancement of a feature

Comments

@jdrueckert
Copy link
Member

Motivation

The Advanced Game Setup (AGS) allows players to choose and configure the world generator to be used for their world and can preview what the world will look like.
Some world generator aspects may depend on assets like heightmaps. However, in the AGS, these assets cannot be accessed as only engine assets are present at that point in time. Thus, various kinds of world generators can currently not be selected in the AGS, limiting its main purpose.

Proposal

Ideally, module assets relevant for world generation should already be accessible at AGS time.
This would allow previewing a larger variety of world generators and configurations without having to mess around with the code (to make the desired world generator the default for a game mode) and start a world.

Alternatives

Alternatively, the required assets could be moved into the engine, but I don't think that's a desirable way to go.

Additional notes

A prominent example of this problem is the HeightMapWorldGenerator which currently cannot be selected in the AGS (it would crash and is therefore handled as a special case in the UniverseSetupScreen).
It requires heightmap assets, such as platec_heightmap.png.

@jdrueckert jdrueckert added Topic: Architecture Requests, Issues and Changes related to software architecture, programming patterns, etc. Status: Needs Discussion Requires help discussing a reported issue or provided PR Type: Improvement Request for or addition/enhancement of a feature Topic: WorldGen Requests, Issues and Changes related to facets, rasterizers, etc. labels May 10, 2022
@keturn
Copy link
Member

keturn commented May 25, 2022

There are a few areas like this where we're not in a game yet, but we need to know some things about a game or a potential game, and those things are determined by modules.

The AGS is the big one. I recently discovered the game load menu does this to some extent as well: It wants to show info about the game's world, and it needs the game's world generator to do that.

That answered one of my long-standing questions about why we often see a bunch of module-loading and world-generator log messages right as we start the process, before we do anything.

The current implementation also has WorldGeneratorManager dealing with the low-level details of module loading far more than is healthy for it, and it sounds like AGS isn't doing enough.

I think for AGS the thing to do will be to start building up the ModuleEnvironment (loading the modules) earlier. By the time you get to the world-configuration parts of the AGS, you've already done all your module selection, so we already have all the information we need to do so.

I expect the big thing to watch out for with that will be handling what happens when you cancel or go back a step and change the module lineup.

@jdrueckert
Copy link
Member Author

I like the idea of loading ModuleEnvironment as soon as the module selection is "final" (for the moment) and we definitely need to make sure, we clean everything up again as soon as we go back to module selection or cancel world creation altogether and head back to main menu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Discussion Requires help discussing a reported issue or provided PR Topic: Architecture Requests, Issues and Changes related to software architecture, programming patterns, etc. Topic: WorldGen Requests, Issues and Changes related to facets, rasterizers, etc. Type: Improvement Request for or addition/enhancement of a feature
Projects
None yet
Development

No branches or pull requests

2 participants