|
ForumsSega Master System / Mark III / Game GearSG-1000 / SC-3000 / SF-7000 / OMV |
Home - Forums - Games - Scans - Maps - Cheats - Credits Music - Videos - Development - Hacks - Translations - Homebrew |
Author | Message |
---|---|
|
Status bars with two-way scrolling (was: Ys Vanished Omens technical question)
Posted: Tue Apr 18, 2017 9:19 am
|
I've been looking on the way Y's displays its status bars, as it's the only game I know in the master system that displays like a "window plane" together with multidirectional scroll.
After looking in Meka & Emulicious, and searching for info, I've understood that the last rows of the tilemap are overwriten with the tiles that would make the life bars, the letters are sprites, and that somehow, some rows are blacked (vdp off?) depending on the vertical scroll position in order to display only the narrow lifebar that needs to be displayed. How are these rows blacked? is the VDP turned off? it's some kind of raster effect? |
|
|
Posted: Tue Apr 18, 2017 4:38 pm |
Is this something of relevance?
http://www.smspower.org/Development/TilemapMirroring |
|
|
Posted: Tue Apr 18, 2017 5:36 pm |
Mostrar likely, the only other way to produce that effect would be to set the relevant colors in the palette to black, but that would require more VDP writes and could cause show effects. | |
|
Posted: Tue Apr 18, 2017 9:07 pm |
Ys (JP) depends on tilemap mirroring to draw its status bar, but the export version doesn't (and the feature/bug was fixed in later VDP revisions). In both, the bar effect is achieved by drawing taller coloured bars (as you saw), then they are masked out with black by switching to an all-black secondary name table in line interrupts, which can be done safely. The Japanese version gets away with a smaller name table due to the mirroring, which allows it a bit more space for tiles.
Another game achieving the same effect (two-way scrolling with a status bar) is Gauntlet, which achieves a vertical status bar by drawing the whole status as sprites, and then masking the moving boundary tile location by also drawing a column of black sprites over it. This is hugely wasteful of sprites given the 8 sprite horizontal limit - but then the gameplay hardly uses them. |
|
|
Posted: Wed Apr 19, 2017 8:01 am |
Thanks guys!, very nice explanation!
I'll also check Gauntlet. I know it's using tilemap for displaying enemies, but it'll be interesting to see their technique for status bars |
|
|
Posted: Wed Apr 19, 2017 10:29 am |
You should also take a look at this game : Sylvan Tale
On YouTube : |
|
|
Posted: Wed Apr 19, 2017 10:46 am |
thanks! I'll take also a look at it! | |
|
Posted: Wed Apr 19, 2017 9:30 pm |
Hmm, that's an interesting one: an alternate tilemap is used for the "windowing" for text and status, and the status bar is itself drawn into tiles (and the tilemap) to offset the scrolling, so the 16px we see of that tilemap always shows the same 16px of the status area - with a little use of sprites to reduce the drawn-in tile count. The way it animates the "window" up and down is a very nice touch, too.
On a side note, the text scrolling in the "window" is also done by drawing into the tiles, which is why it's a bit jerky - the number of tiles to update then exceeds what is possible in one frame. It also means it could fairly easily have a variable-width font in the translation, since the VRAM resources are all already there... |
|
|
Posted: Thu Apr 20, 2017 7:25 am |
As I have used lately only Emulicious, I have found that Meka is still more reliable when trying to have a grasp in how raster effects are working. Moreover, I think that there's no way to change the base adress for the tilemap in emulicious, is there?
I have to say that the status bar in Sylvan Tale looks really nice! |
|
|
Posted: Thu Apr 20, 2017 5:44 pm |
I think you should try again. :) |
|
|
Posted: Sun Apr 30, 2017 7:12 am |
Interested.
... so i can put an lineh interrupt handler and check if i am on first 16 lines ... But dont understand what to do to fill on black... can some one illustrate with (c better for me, although asm could be valid) code? An example would be great! |
|
|
Posted: Sun Apr 30, 2017 10:28 am |
Line interrupts are a pain because they reload the counter before the interrupt happens, so for example you set it for 16, it fires and you set it to ff, and it fires on line 32 anyway. To blank the screen you can either turn it off, or change to a name table showing blanks. The latter gives you the option of not being purely blank. | |
|
Posted: Sun Apr 30, 2017 10:31 am |
Another example came to mind: Cool Spot (and Global Gladiators, which is the same engine) do it by redrawing the whole name table when it scrolls 8px, then turning off the screen for 8px to hide the extra lines, then having blank tiles at the bottom with sprites for status. | |
|
Posted: Sun Apr 30, 2017 7:46 pm |
sverx's compo-entry might also be relevant: http://www.smspower.org/Homebrew/AngunaThePrisonDungeon-SMS - I have had that one filed under "interesting statusbar w. scroll" since then :) | |
|
Posted: Sun Apr 30, 2017 9:20 pm |
That was what i have searching. Thanks hangs!!! | |
|
Posted: Thu May 04, 2017 9:03 am |
unfortunately that solution is very very slow, eating up a lot of CPU :|
Which means: I would no longer use it. Having the health bar vertical and made with sprites would be better (also, you would get it over-imposed onto background, which is nicer than having black backdrop as in AngunaSMS) |
|