Jump to content

Photo

titlescreen kernel


72 replies to this topic

#1 RevEng OFFLINE  

RevEng

    River Patroller

  • 4,700 posts
  • Bitnik
  • Location:Canada

Posted Sun Jul 18, 2010 5:28 PM

I put together the first part of a would-be generic title-screen kernel and I wanted to get people's opinions on it...

Attached File  titlescreentest.bin   4KB   295 downloads

I used flicker-blinds with players to get a 96x21 display with color changes for each row. While I think the flicker is fine, I'm not really happy about the dark edges I'm getting on player boundaries, though there's not much I can do about them and keep the same width display.

By the way, it's worth noting that the dark edges don't show up in Stella, and it shows the screen a fair bit darker than real hardware. (turn on phosphorous alt+p will help a bit)

Should I scrap this technique and use a smaller 48x40 display for the title part, which won't have the dark edges? Also, what do you think is important for a generic title-screen kernel?

I was thinking along the lines of a screen layout like...

  [title  graphic]
  [              ]
  [  player 0  & ]
  [  player 1    ]
  [  work here   ]
  [              ]
  [footer graphic]
...it would be implemented as a custom drawscreen, and as such the programmer could control the user's interaction with it, calling it in a loop just like the regular drawscreen. And it wouldn't need to go in the last bank.

Thoughts?

#2 SeaGtGruff OFFLINE  

SeaGtGruff

    Quadrunner

  • 5,558 posts
  • Location:Georgia, USA

Posted Sun Jul 18, 2010 6:50 PM

With the phosphor effect turned on in Stella, it looks fine. That's how I had thought to do it-- use flicker-blinds (as in the bitmap kernel) to get 96 pixels across. You could also use the standard score technique to get 48 pixels without flicker, but of course that would mean the titles couldn't be as wide. Anyway, it looks good! :)

Michael

#3 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 28,179 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sun Jul 18, 2010 8:29 PM

Also, what do you think is important for a generic title-screen kernel?

I pretty much go by what SeaGtGruff said:

http://www.atariage....ost__p__1140372

I'm actually thinking of writing a new kernel specifically designed for game title screens, with a much bigger title in the center of the screen, including additional lines for things like the copyright message, or "press fire to begin," or the game difficulty level picker. The userscore stuff could still be used for things like inventory strips, or "lives remaining" icons, etc.

Game title, copyright area, and a place where the player can select something like difficulty, random seed, or game level.

Thanks for working on this.

#4 grafixbmp OFFLINE  

grafixbmp

    Dragonstomper

  • 679 posts
  • Location:South Central US

Posted Sun Jul 18, 2010 11:53 PM

Even the title screen for Colony 7 (can't remember the guy who ported it) is remarkable with high levels of color and plenty of info. Would be nice if that kernel would work well for a generic title screen.

#5 grafixbmp OFFLINE  

grafixbmp

    Dragonstomper

  • 679 posts
  • Location:South Central US

Posted Sun Jul 18, 2010 11:53 PM

Even the title screen for Colony 7 (can't remember the guy who ported it) is remarkable with high levels of color and plenty of info. Would be nice if that kernel would work well for a generic title screen.

#6 yuppicide OFFLINE  

yuppicide

    I am the Black Knight. Give me your money!

  • 6,933 posts
  • Location:New Jersey

Posted Mon Jul 19, 2010 6:55 AM

Wow! Yes, thank you. I love what you've done so far. I haven't tried on real hardware, but this looks great right now with phospher effect on.

Love that you chose to write Knight Rider.

#7 RevEng OFFLINE  

RevEng

    River Patroller

  • Topic Starter
  • 4,700 posts
  • Bitnik
  • Location:Canada

Posted Mon Jul 19, 2010 7:50 AM

@SeaGtGruff: Thanks for the feedback, Michael! That makes me feel better about running with the present approach for the title.

@Random Terrain: Excellent! Thanks for the link. (and thanks again to Michael, for the original post!) It has helped clarify my thoughts on what would be useful.

I'm now thinking something along the lines of...

  [      title graphic      ]  (96xNN, where NN can range from 1 to 21)
  [                         ]
  [      spash graphic      ]  (48xNN, where NN can range from 1 to 42)
  [                         ]
  [     game # selection    ]
  [                         ]
  [      footer graphic     ]  ("copyright", "press fire", or whatever)
  [                         ]
  [        bB score         ]  (so the last score could be displayed)

...any section would be optional, by defining constants in the main bB program.

@grafixbmp: The Colony 7 title screen is definitely sweet, though I'm not sure how well it would translate into a generic title screen.

The enemy table would have to go, so that leaves the score and the flickered 48-wide graphic. I think using the bB score would be better for position and font consistency.

The flickered 48-wide might be an option in the future, but for now I'm going to go with a more traditional non-flickered 48-wide for the splash graphic. That way if someone really objects to flicker they can skip the title and use the splash graphic for the title and graphic instead.

@yuppicide: Thanks! I'd love some feedback on real hardware. As I mentioned before, there are artifacts that come with this approach that Stella doesn't show, and I'd love for you to be brutally honest about whether or not you'd use it.

And regarding Knight Rider, I'm just hoping Team Savage still has a position open! :D

#8 yuppicide OFFLINE  

yuppicide

    I am the Black Knight. Give me your money!

  • 6,933 posts
  • Location:New Jersey

Posted Mon Jul 19, 2010 9:28 AM

Weather or not I'd use it? I'm ready to use it now LOL!

How much ROM does it take up? I wonder if it can be made to scroll. I'm thinking it would be nice to use at the end of my game to roll credits. I already have a title screen, and in fact I already have something to display credits, but this looks sexier.

I'll definitely be using it for future games title screens if I can get past my damn scan line issue in the other game Blocked In.

#9 RevEng OFFLINE  

RevEng

    River Patroller

  • Topic Starter
  • 4,700 posts
  • Bitnik
  • Location:Canada

Posted Mon Jul 19, 2010 10:27 AM

Hah! Ok, fair enough. :)

So far with the kernel and the 96x21 title data it comes to about 750 bytes.

I had thoughts about making the footer scroll, but I'm going to have to leave that out until I have a usable version 1 complete. I have a natural tendency toward feature-creep.

#10 yuppicide OFFLINE  

yuppicide

    I am the Black Knight. Give me your money!

  • 6,933 posts
  • Location:New Jersey

Posted Mon Jul 19, 2010 11:29 AM

Hey, that's awesome! ASM amazes me. I only wish I had the patience to learn.

So, I can probably call the routine, make the colors fade in, pause, fade out the colors, then call it again with different text I'm assuming. That would make something very nice.

Hah! Ok, fair enough. :)

So far with the kernel and the 96x21 title data it comes to about 750 bytes.

I had thoughts about making the footer scroll, but I'm going to have to leave that out until I have a usable version 1 complete. I have a natural tendency toward feature-creep.



#11 RevEng OFFLINE  

RevEng

    River Patroller

  • Topic Starter
  • 4,700 posts
  • Bitnik
  • Location:Canada

Posted Mon Jul 19, 2010 12:35 PM

The colors changing should be do-able (provided you have a spare byte for each line of color) but the ability to load different images/text will only apply to the footer - there's not enough time left in the title part of the kernel to allow for dynamic loading from rom, and it would take too many bytes to do it from ram.

Even then, my first stab at it will be assuming a static footer.

#12 SeaGtGruff OFFLINE  

SeaGtGruff

    Quadrunner

  • 5,558 posts
  • Location:Georgia, USA

Posted Mon Jul 19, 2010 10:09 PM

@SeaGtGruff: Thanks for the feedback, Michael! That makes me feel better about running with the present approach for the title.

@Random Terrain: Excellent! Thanks for the link. (and thanks again to Michael, for the original post!) It has helped clarify my thoughts on what would be useful.

I'm now thinking something along the lines of...

  [      title graphic      ]  (96xNN, where NN can range from 1 to 21)
  [                         ]
  [      spash graphic      ]  (48xNN, where NN can range from 1 to 42)
  [                         ]
  [     game # selection    ]
  [                         ]
  [      footer graphic     ]  ("copyright", "press fire", or whatever)
  [                         ]
  [        bB score         ]  (so the last score could be displayed)

...any section would be optional, by defining constants in the main bB program.

@grafixbmp: The Colony 7 title screen is definitely sweet, though I'm not sure how well it would translate into a generic title screen.

The enemy table would have to go, so that leaves the score and the flickered 48-wide graphic. I think using the bB score would be better for position and font consistency.

The flickered 48-wide might be an option in the future, but for now I'm going to go with a more traditional non-flickered 48-wide for the splash graphic. That way if someone really objects to flicker they can skip the title and use the splash graphic for the title and graphic instead.

@yuppicide: Thanks! I'd love some feedback on real hardware. As I mentioned before, there are artifacts that come with this approach that Stella doesn't show, and I'd love for you to be brutally honest about whether or not you'd use it.

And regarding Knight Rider, I'm just hoping Team Savage still has a position open! :D

I don't remember if I mentioned it in my old thread, but one of the options I'd thought about including was combining two 48-wide bitmaps by flickering between different colors, to get more colorful text. Like, on the first frame you could display the title in larger letters in one color, and then on the next frame use thinner letters in a different color, or something like that. But any fancy frills and bells and whistles can come later, after you've got a basic kernel. :)

Michael

#13 RevEng OFFLINE  

RevEng

    River Patroller

  • Topic Starter
  • 4,700 posts
  • Bitnik
  • Location:Canada

Posted Wed Jul 21, 2010 9:08 PM

I didn't see that in the old thread, Michael, but flickering 48 is definitely on the list. The Colony 7 homebrew that grafixbmp mentioned uses that technique quite nicely in its title page.

I worked a bit more on this, and refined my approach. I'm splitting everything up into minikernels, that the programmer will be able to choose and position on the titlepage.

So far I've written the 96-wide flickerblinds minikernel, a 48-wide 2-line minikernel, and a 48-wide 1-line minikernel...

titledemo.bas.bin.png
Attached File  titledemo.bas.bin   16KB   237 downloads

...if you press the fire button in the bin it brings you to a very boring blank bB drawscreen. Pressing left on the joystick will bring you back to the titlescreen.

There's still a lot of work to go (integrating the bB score kernel, writing a game select kernel, putting together the positioning glue, etc.) but I figured you guys would be interested in the progress.

Edited by RevEng, Wed Jul 21, 2010 9:09 PM.


#14 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 28,179 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Wed Jul 21, 2010 9:22 PM

There's still a lot of work to go (integrating the bB score kernel, writing a game select kernel, putting together the positioning glue, etc.) but I figured you guys would be interested in the progress.

Looking good. Thanks again for working on this. It's something we really need.

#15 RevEng OFFLINE  

RevEng

    River Patroller

  • Topic Starter
  • 4,700 posts
  • Bitnik
  • Location:Canada

Posted Wed Jul 21, 2010 10:09 PM

You're welcome!

Its actually been a lot of fun figuring out how some of these classic routines are done, though I'm not ashamed to say that getting the 48-wide routines working for every pixel kicked my ass for a while. :)

#16 Gateway OFFLINE  

Gateway

    River Patroller

  • 2,165 posts
  • Trotter Atari Globetrotter now on Facebook!
  • Location:St. Joseph area, Missouri

Posted Thu Jul 22, 2010 4:19 PM

Thanks for doing this! It is looking great!

Please continue. I would like to use something similar to this in my game project. :)

#17 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 8,830 posts

Posted Thu Jul 22, 2010 5:30 PM

Wow. I think the flicker is less noticeable in the most recent builds. Way beyond cool! Now all we need is a sub-routine to play back an animated Atari Jaguar cube! After that we can all hang up our hats and declare RevEng the winner.

Edited by theloon, Thu Jul 22, 2010 5:30 PM.


#18 RevEng OFFLINE  

RevEng

    River Patroller

  • Topic Starter
  • 4,700 posts
  • Bitnik
  • Location:Canada

Posted Fri Jul 23, 2010 6:34 AM

:) Thanks for the encouragement guys. Rest assured, I'll keep at it.

@theloon: I think the reason the flicker appears less is your eye now has a more stable area to focus on. (The 48 wide bitmaps) As side-effects go, its not a bad one. ;)

#19 atari2600land OFFLINE  

atari2600land

    Waffles:

  • 10,764 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Fri Jul 23, 2010 4:09 PM

I was all excited and ready to download it when I realized it's not ready yet! Anyway, I'm confused. Is the horse in the binary file the playfield? What is the "Knight Rider" title then? Anyway, keep working on it, I want to use it for a new project I have in mind.

#20 yuppicide OFFLINE  

yuppicide

    I am the Black Knight. Give me your money!

  • 6,933 posts
  • Location:New Jersey

Posted Fri Jul 23, 2010 5:21 PM

It's not a playfield.. it's all magic. :)

#21 RevEng OFFLINE  

RevEng

    River Patroller

  • Topic Starter
  • 4,700 posts
  • Bitnik
  • Location:Canada

Posted Fri Jul 23, 2010 5:31 PM

The 2600 runs on magic smoke, so I won't disagree. :)

But the gory details are...

The entire screen is made up of player 0 and player 1 sprites, just using different techniques.

The sprites can be made to display a 48 wide picture by setting the sprites to the x3 copy mode and positioning them so they alternate, like...

[P0][P1][P0][P1][P0][P1]

...to get the copies to display unique data (instead of repeating the first one) you change the data after each sprite is drawn.

This is how the horse is drawn, and it's how the bB score is drawn too.

The "knight rider" title area is a variation on the technique which uses flicker to turn our 48 wide display into a 96 wide display.

To make the flicker less objectionable, I employed a technique called flicker-blinds, which alternates the drawn area every line, rather than every frame.

This is also the technique SeaGtGruff used in his bitmap kernel.

To see it in slow motion, you can load up my demo in stella, enter the debugger, and hit the "frame+" button a bunch of times.

Anyway, the nice part about the titlescreen kernel is that you won't need to know any of this. You just replace the existing data with your own and add a few simple lines to your bB program to call it.

#22 RevEng OFFLINE  

RevEng

    River Patroller

  • Topic Starter
  • 4,700 posts
  • Bitnik
  • Location:Canada

Posted Sat Jul 24, 2010 10:43 PM

I've copied the bB score routine into a titlescreen minikernel, and put the code in place for easy repositioning/reordering of each minikernel, and killed a few small bugs. The bB score is off-center (as it is in games) but there's not much to do about that.

titledemo.bas.bin.png
Attached File  titledemo.bas.bin   16KB   244 downloads

I still need to work on the game-select minikernel, trim some of the bloaty parts (lots of page alignments), and write some docs, but its taking shape.

I'd like to have a bB logo to include as a bitmap or animated bitmap or something... Any ideas or would-be designs?

#23 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 28,179 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sun Jul 25, 2010 12:04 AM

Wow! That's looking good.

#24 SeaGtGruff OFFLINE  

SeaGtGruff

    Quadrunner

  • 5,558 posts
  • Location:Georgia, USA

Posted Sun Jul 25, 2010 12:43 AM

I've copied the bB score routine into a titlescreen minikernel, and put the code in place for easy repositioning/reordering of each minikernel, and killed a few small bugs. The bB score is off-center (as it is in games) but there's not much to do about that.

Actually, you can tweak the code to shift the score to the left a bit so it will be centered on the title screen. However, then it wouldn't be in the same position it is on the game screen-- if that matters to you.

Another alternative would be to tweak your title screen code to shift everything to the right a bit so it's "centered" with the score-- but you might not want to go to all that trouble at this stage of your progress. :ponder:

I'd like to have a bB logo to include as a bitmap or animated bitmap or something... Any ideas or would-be designs?

I think a "bB" logo design was settled on several years back, with the intention of using it on labels. It's in one of the older threads in the batari Basic forum.

Michael

#25 RevEng OFFLINE  

RevEng

    River Patroller

  • Topic Starter
  • 4,700 posts
  • Bitnik
  • Location:Canada

Posted Sun Jul 25, 2010 1:39 AM

Actually, you can tweak the code to shift the score to the left a bit so it will be centered on the title screen. However, then it wouldn't be in the same position it is on the game screen-- if that matters to you.

Yeah, that's what I had in mind when I mentioned there wasn't much to be done...the transition to the game screen would be a bit jarring.

I might just do it anyway, as the off-centeredness is really starting to bug me now, and you guess right that I don't want to shift all my stuff to the right at this stage.

I also considered writing a mini-text score kernel, to use up less screen real estate, be centered, and have a less jarring transition. But if I do that at all, it will be much later.

Thanks for the tip on the logo! I'll dig for it.




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users