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

Summary screen #978

Draft
wants to merge 7 commits into
base: 9bit
Choose a base branch
from
Draft

Conversation

emilyploszaj
Copy link

Replaces the old stats screen with the new and improved summary screen. Mostly functional, but slightly incomplete.

2024-08-08.19-55-57.mp4

I would not consider this ready to merge and be played (the way 9bit has an active playerbase) for mostly visual issues. It may be reasonable to have a short lived summary screen branch off of 9bit on this main repo so that multiple people can contribute to knocking out the last couple issues and get this out the door.

Code has been documented to the best of my ability when I was writing it, but it's been written over so many months at this point that multiple authors may as well have had their hands in it. Implementation ideas and reasons have been discussed over several long conversations that at this point it is probably easier to simply respond to questions than try to explain everything.

Outstanding TODOs in the summary screen file, copied for posterity

  • use/make proper vblank routine to remove flicker due to music (other existing ones cause freezes, maybe because of GFX decompression requests?) (SafeCopyTilemapAtOnce would be great, but it causes hblanks to be missed, a dedicated routine would be required)
  • entire egg page
  • status indication (including palette allocation)
  • nature indicators (red/blue stats)
  • allow swapping move order
  • replace move learning page
  • remove party moves screen (by replacing it properly)
  • fix artifacts when exiting PC or in battle summary

This is certainly not comprehensive, the summary screen has some artifacting and non-perfect transitions that would be good to polish over as well.

Some things I'd like to further do or seen done for the summary screen code wise that aren't necessarily functional

  • Further remove all references to the "stats screen" in symbols, files, and documentation and otherwise and replace it with the "summary screen" to better reflect the change in game (reflecting modern games' usage of the term summary rather than stats)
  • Adjust hblank routines to be usable elsewhere without major pain.
  • Adjust summary window buffer to be usable elsewhere without major pain.

I'm sure there's more but I've lost it all in my head over the months, if I think of anything I'll make edits

@Rangi42 Rangi42 marked this pull request as draft August 9, 2024 02:40
@Rangi42
Copy link
Owner

Rangi42 commented Aug 9, 2024

Emi, this already looks great. Thank you for putting all your work into it! ^^

@Rangi42
Copy link
Owner

Rangi42 commented Aug 9, 2024

Also, I'd be happy to merge this as just a summary screen replacement. Meaning that the Moves screen and the move-learning page could stay, no need to implement move swapping in this for the initial merge. (Same goes for the "A/Info" functionality. ...Oh, you already did that! :D )

A couple of graphic observations:

  • The Pokerus icon should have its magenta palette.
  • The "Met" tab content should be shifted vertically a little.

The original mockups for comparison:

image

image

image

Copy link
Owner

@Rangi42 Rangi42 left a comment

Choose a reason for hiding this comment

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

I haven't looked at the engine/pokemon/summary* files yet.

engine/gfx/cgb_layouts.asm Outdated Show resolved Hide resolved
engine/gfx/cgb_layouts.asm Outdated Show resolved Hide resolved
engine/pokedex/pokedex.asm Outdated Show resolved Hide resolved
engine/pokemon/mon_stats.asm Outdated Show resolved Hide resolved
gfx/stats/stats.png Outdated Show resolved Hide resolved
home/lcd.asm Outdated Show resolved Hide resolved
home/lcd.asm Outdated Show resolved Hide resolved
home/lcd.asm Outdated Show resolved Hide resolved
home/lcd.asm Outdated Show resolved Hide resolved
home/lcd.asm Outdated Show resolved Hide resolved
Copy link
Collaborator

@vulcandth vulcandth left a comment

Choose a reason for hiding this comment

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

I know this is still a work-in-progress, and looks great!

My only comment is there are a lot of magic numbers.. particularly related to tile IDs and tile palettes, ect.

I know the other codebase is similar; but when we have the opportunity to rewrite systems; personally i'd like to define constants for things like the tile ID's that way if we need to reorder graphics we can update the tile ID defined in the constant.

Thoughts @Rangi42 ? I'm talking about like what I did at the top of engine/overworld/weather.asm

@Rangi42
Copy link
Owner

Rangi42 commented Aug 12, 2024

I definitely agree about using named constants in general. I haven't reviewed the "meat" of this PR yet so can't comment on how many magic numbers there are. But yeah, you can see how other engine files define constants for meaningful tile IDs.

@emilyploszaj
Copy link
Author

Finally got around to resolving these issues and adding graphics constants.

@Rangi42 re the met tab contents, as a restriction of seamless page switching, the bottom of the screen's vertical aligns can't be adjusted iirc. The pokerus change would require some further palette adjustments that I'll look into.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants