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

Adventure: implement new game #1531

Merged
merged 83 commits into from
Mar 22, 2023
Merged

Adventure: implement new game #1531

merged 83 commits into from
Mar 22, 2023

Conversation

JusticePS
Copy link
Collaborator

What is this fixing or adding?

Adds Adventure for the Atari 2600, NTSC version. New randomizer, not based on prior works. Somewhat atypical of current AP rom patch games; The generator does not require the adventure rom, but writes some data to an .apadvn APContainer file that the client uses along with a base bsdiff patch to generate a final rom file.

How was this tested?

Two beta tests with a few other games. Several offline syncs and asyncs. Running tests and building an inno installer and testing that with the client enabled and disabled. For large scale generation, generated a few 1050 world and 2600 world multiworlds with just Adventure.

@black-sliver black-sliver added the is: new game Pull requests for implementing new games into Archipelago. label Mar 12, 2023
AdventureClient.py Outdated Show resolved Hide resolved
Utils.py Outdated Show resolved Hide resolved
host.yaml Outdated Show resolved Hide resolved
self.create_event("Victory", ItemClassification.progression))
self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player)

def pre_fill(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm understanding right, you're creating additional locations and items, then later remove them again? Why not just select a random set of locations and only create those?

Copy link
Collaborator Author

@JusticePS JusticePS Mar 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not removing any locations. I'm removing those 'nothing' items from the pool when I place them, but they probably don't need to be in the pool in the first place.

I thought I'd have problems with those unused locations either not showing in the tracker or being unable to 'check' them for the tracker. And also I believe I need to make sure any locations that are plando'd exist, but I guess there's probably some way for me to get a list of those. I'm placing items in those locations and removing those items from the pool, but I'll see what it looks like if I leave out those locations. Or if that does have a problem, not creating the 'nothing' items in create_items and adding them to the pool and taking them back out later, just creating them as needed.

Is removing items from the pool the slow part? I don't want to slow down large multiworlds.

The largest one I tested was 2600 worlds and iirc took about 5 minutes, but that was almost all Adventure and the total location count was only in the tens of thousands, not like a real big async. I'll note down the generation times as I try out these changes to make sure I don't make something awful.

That nothing item, if I keep it, can also be set up more consistently with the other extra filler items now, and I should go ahead and do that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically, as expected, they don't show up in the tracker if I don't create them. Not generating those locations with random filler limits cuts total generation time to 70% of the original handling, and using all locations but skipping the item pool for any nothings reduces it to 90%. That's with random amounts of filler; it is probably more typical for all locations to have a real item anyway, as that's the default setting. There's just an option for limiting the number of freeincarnates that normally take up any extra slots, and if it runs out of those it uses 'nothing'.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is enough of a change I want to spend more time testing than I have right now, so I'll push this another day. I'm having trouble staying awake now.

Copy link
Collaborator Author

@JusticePS JusticePS Mar 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose I should also try letting AP handle it normally with those items set to local.

Edit: That's much slower.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's rare for games to have this problem in the first place, generally players will prefer any trash item whatsoever over an actual nothing item. But in the cases where it can exist, mostly this is Super Metroid, they are actual Nothing items that as far as AP is concerned is just a regular item.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as AP is concerned, they are Nothing items (ID 118000000) placed locally.

In Adventure, the built-in randomizer (level 3) has a lot more locations than vanilla items, so there are many empty rooms. I want that to still be an option, without revealing what rooms are populated in the tracker, but still marking those as checked when they are seen. In order to make it tracker-friendly, it adds 'Nothing' AP items to some locations which get checked when seen by the client.

The default yaml settings do generate a non-Nothing item for every location, but that changes the feel of exploring some, so I didn't want to enforce that as the way things have to be.

locations_copy.remove(loc)
if loc in overworld_locations_copy:
overworld_locations_copy.remove(loc)
self.multiworld.itempool.remove(item)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in large multiworlds, this is a very slow operation

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I'm not adding or removing those from the itempool anymore. I think the player experience of not generating the locations is worse, so I'd rather not do that, but if that's the preferred AP way to do it, I can change back over and look into how to make sure I create any locations specified in plandos.
Could you let me know? Thanks.

@Berserker66
Copy link
Member

image

Justin LaLone added 18 commits March 21, 2023 15:11
Insert AP foreign item data into client zip archive
Everything connects, and the connector successfully
handles placing and collecting foreign items, but actually
sending those to the client and server isn't working yet,
and receiving items from other games probably doesn't work
…agon

Still need to mark local items collected when touched
Still need to implement deathlink
And options.  And bat logic.  And docs.  And tests.
Fixed empty location collection
Add on-screen received messages,
Small options update
…buggy,

possibly due to bat.  Have good test case in current game.
Justin LaLone and others added 21 commits March 21, 2023 15:25
generate the patched rom with a .a26 extension instead of .bin.
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
with 'nothing' when we have nothings.  Make sure there's at least
one hard location left, and leave additional overworld locations empty
when there are very few items.
and just random fill with nothings if we do.  That should only happen with
plando, exclude, or priority settings which may not guarantee successful
generation.
…different.

Put the Adventure client launcher component into AdventureClient.py.
Although I may have to remove that when zipping up an apworld due
to the non-local import?
@JusticePS
Copy link
Collaborator Author

image

Well, at least Launcher.py shouldn't have future conflicts. Though I'm unsure if that import is ok in apworlds, but I can always extract that if I need to zip a new one up.

@Berserker66 Berserker66 merged commit d48e1e4 into ArchipelagoMW:main Mar 22, 2023
kindasneaki pushed a commit to kindasneaki/Archipelago that referenced this pull request Jun 28, 2023
Adds Adventure for the Atari 2600, NTSC version. New randomizer, not based on prior works. Somewhat atypical of current AP rom patch games; The generator does not require the adventure rom, but writes some data to an .apadvn APContainer file that the client uses along with a base bsdiff patch to generate a final rom file.
FlySniper pushed a commit to FlySniper/Archipelago that referenced this pull request Nov 14, 2023
Adds Adventure for the Atari 2600, NTSC version. New randomizer, not based on prior works. Somewhat atypical of current AP rom patch games; The generator does not require the adventure rom, but writes some data to an .apadvn APContainer file that the client uses along with a base bsdiff patch to generate a final rom file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: new game Pull requests for implementing new games into Archipelago.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants