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

Jak and Daxter: Implement New Game #3291

Draft
wants to merge 35 commits into
base: main
Choose a base branch
from

Conversation

massimilianodelliubaldini

This is a draft PR for code review, beta test volunteers, etc. If I've got any style issues, or use deprecated features, or have obvious logical problems, please let me know!

My origin PR squashed some 17 commits, so if you want that kind of granular history, see here.

What is this fixing or adding?

This commit adds Jak and Daxter: The Precursor Legacy to Archipelago. This includes the world, the locations, the items, the text client, web world, documentation, and setup guide.

How was this tested?

  • Ran the generic python tests included with Archipelago.
  • Generated both single-world and multi-world seeds.
  • Read several spoiler logs to ensure the game logic was being followed.
  • Manually tested the text client and the game mod itself.
    • Farthest single-world point I reached was getting 20 power cells and making it to the Blue Sage's hut (hub world 2 of 3).
    • Recorded some footage of a multi-world game here.

If this makes graphical changes, please attach screenshots.

N/A.

…gions and rules, but still missing one-way Entrances.
* Jak 1: Initial commit: Cell Locations, Items, and Regions modeled.

* Jak 1: Wrote Regions, Rules, init. Untested.

* Jak 1: Fixed mistakes, need better understanding of Entrances.

* Jak 1: Fixed bugs, refactored Regions, added missing Special Checks. First spoiler log generated.

* Jak 1: Add Scout Fly Locations, code and style cleanup.

* Jak 1: Add Scout Flies to Regions.

* Jak 1: Add version info.

* Jak 1: Reduced code smell.

* Jak 1: Fixed UT bugs, added Free The Sages as Locations.

* Jak 1: Refactor ID scheme to better fit game's scheme. Add more subregions and rules, but still missing one-way Entrances.

* Jak 1: Add some one-ways, adjust scout fly offset.

* Jak 1: Found Scout Fly ID's for first 4 maps.

* Jak 1: Add more scout fly ID's, refactor game/AP ID translation for easier reading and code reuse.

* Jak 1: Fixed a few things. Four maps to go.

* Jak 1: Last of the scout flies mapped!

* Jak 1: simplify citadel sages logic.

* Jak 1: WebWorld setup, some documentation.

* Jak 1: Initial checkin of Client. Removed the colon from the game name.

* Jak 1: Refactored client into components, working on async communication between the client and the game.

* Jak 1: In tandem with new ArchipelaGOAL memory structure, define read_memory.

* Jak 1: There's magic in the air...

* Jak 1: Fixed bug translating scout fly ID's.

* Jak 1: Make the REPL a little more verbose, easier to debug.

* Jak 1: Did you know Snowy Mountain had such specific unlock requirements? I didn't.

* Jak 1: Update Documentation.

* Jak 1: Simplify user interaction with agents, make process more robust/less dependent on order of ops.

* Jak 1: Simplified startup process, updated docs, prayed.

* Jak 1: quick fix to settings.
@ScipioWright ScipioWright added the is: new game Pull requests for implementing new games into Archipelago. label May 13, 2024
@ScipioWright ScipioWright added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label May 13, 2024
@massimilianodelliubaldini
Copy link
Author

A request for feedback: during testing I noticed that if you obtain a particular scout fly before breaking that scout fly's box, the box will not spawn a fly. The game tracks which flies you already have and will not spawn them again. This is a bug I need to fix, since the would-by flies in those boxes now represent other items, but it got me thinking.

In order to receive the Free 7 Scout Flies power cell of any given level, should you

  • receive all 7 scout flies for that level?
  • break all 7 boxes in that level?
    • followup: how do we handle the 2 boxless flies in LPC?

@LuigiXHero
Copy link

The first option. I see them as this game's skulltulas from Zelda.

@massimilianodelliubaldini
Copy link
Author

I ended up implementing both options as separate functions, but the first option is what is in use currently. Unfortunately I've learned about a massive design flaw in how I equated Locations and Items, each instance having a unique ID number within it's type, and matching ID numbers with it's counterpart. That's not how AP works in fact. I need a generic item called "Power Cell" with a single ID, and instead I have 101 items each with their own ID's and names.

So I'm left with rewriting a lot of things both in the APWorld and in the game. There's now 1 item called Power Cell, with 1 ID, and I make 101 copies of it. But the game needed to modified to receive the "same" power cell more than once, and it is now much less stable as a result. It locks up frequently on Geyser. But I'm slowly crawling back to stability.

Another concern is scout flies. I've modified the game with the intent of checking the 7 Scout Fly Location when you receive those 7 specific scout fly Items. But the game doesn't seem to be firing the event that I need it to. Not sure why.

I don't plan on adding to this PR until I work out the regressions and get back to the stability I had before. In the meantime, you can read/clone/compare the code on this branch to see where I currently am.

… Condition. (#3)

* Jak 1: Update to 0.4.6. Decouple locations from items, support filler items.

* Jak 1: Total revamp of Items. This is where everything broke.

* Jak 1: Decouple 7 scout fly checks from normal checks, update regions/rules for orb counts/traders.

* Jak 1: correct regions/rules, account for sequential oracle/miner locations.

* Jak 1: make nicer strings.

* Jak 1: Add logic for finished game. First full run complete!

* Jak 1: update group names.
@massimilianodelliubaldini
Copy link
Author

Updates

  • Genericized the Power Cell and Scout Fly items so that they no longer share names with their respective Locations.
  • Modified the Scout Fly progress menu to show you both how many scout flies you Checked in a level (their Locations) and how many you Received for a level (their Items). Makes it easier to track progress.
  • Separately created "special Locations" to cover specific but abstract Items like Flut Flut and Fisherman's Boat to retain the puzzle-like aspect of finding the unlock to access new areas. So when you complete the fishing minigame, you get both the fisherman's power cell Location, as well as the Fisherman's Boat Location. Then his Boat Item may be somewhere else in the world for you to find.
  • Removed the automatic game/compiler startup from the Client. It was causing some kind of game freeze within 5 minutes of normal gameplay, and I couldn't reproduce the freeze if I opened separate Powershell windows for the REPL and the game. So for the moment, the user will need to run those tasks and connect the Client to them manually.

Testing

  • Completed a full-game solo run on a newly generated seed.
  • Saved and quit overnight and was able to restart the server, reconnect the game and client, load the save, and immediately pick up where I left off.
  • The 7 Scout Fly checks are now automatically triggered when you receive the 7th fly Item for a given level (not by breaking the 7 boxes for their Locations).
  • Victory condition to be triggered on contact with white eco (had to manually test this call because I had already finished the game before I realized I needed a victory condition). Still works even if manually triggered. Item release functions perfectly.

If this makes graphical changes, please attach screenshots.

image

* Jak 1: Overhaul of regions, rules, and special locations. Updated game info page.

* Jak 1: Preparations for Alpha. Reintroducing automatic startup in client. Updating docs, readme, codeowners.
@massimilianodelliubaldini
Copy link
Author

Updates

Updated the regions and rules to better suit the current logic. Two new items and checks were added: the Snowy Mountain Gondola (checked by approaching the gondola), and the Warrior's Pontoons (checked by talking to the Warrior for the first time). This helps gate progression in a more stair-like pattern, rather than cliff-like pattern. Also removes some obscure rules about how to access the gondola in a vanilla game.

Also added back the automatic startup of the game/compiler exe's after I figured out what was causing the game to freeze (they each need to have their own console windows running, independent of each other and anything Archipelago is doing).

Testing

Second (nearly full) playthrough of the game. No crashes, discovered one bug with the gondola which after fixing a function and restarting the game seems to have been squashed.

* Jak 1: Consolidate client into apworld, create launcher icon, improve setup docs.

* Jak 1: Update setup guide.

* Jak 1: Load title screen, save states of in/outboxes.
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. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants