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

Scrolling instead of screen switching? #47

Open
RaymiiOrg opened this issue Oct 13, 2023 · 1 comment
Open

Scrolling instead of screen switching? #47

RaymiiOrg opened this issue Oct 13, 2023 · 1 comment

Comments

@RaymiiOrg
Copy link

Something I always wondered about. Would it be feasable to remove the screen switching when the ball goes to the upper (or back to the lower) area and just have it scroll to there? Like in GBA poke pinball?

(This is not a feature request, I just want to have some more technical info)

@rayrobdod
Copy link
Contributor

I think the biggest consequence of combining the two halves of the red or blue boards is that the boards change go from two 144 pixel tall boards to one 288 pixel tall board. 288 is greater than the size of the pixel background map, so you'd have to write to the background tilemap as the ball moves around, instead of just on board transitions. You'd also have to change the size of the Pinball Y Position variable from a 8.8 fixpoint to something else - a 16.8 fixpoint is probably easier, although a 9.7 fixpoint could conceivably work.

There shouldn't be any danger of reaching the 40 sprite limit, and the sprite drawing is already aware of SCX and SCY, thanks to the tilt mechanics. You would still have to dynamically enable or disable the sprites depending on the ball's position because of 8-bit overflow, lest the flippers and ball saver appear at the top of the board.

Pokepinball uses a STAT interrupt to switch the bg and window tile addressing mode: a chunk of the window's font is placed in OBJ Tile Data, while most of the background is placed in BG Tile Data, so pokepinball uses LCDC.4 = 1 for most of the screen and LCDC.4 = 0 for the bottom 13 pixels of the screen. For this to work, it requires any part of the background that is in the bottom two tiles of the screen to be in Shared tile data. If the board's position on screen can move, then the entire bottom half of the board could be in those bottom 13 pixels and would have to be shared tile data. Unless you move the graphics around to place the font in BG tiledata and remove that part of StatIntrTogglePinballWindow.

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

No branches or pull requests

2 participants