Lyon

Discuss how totally awesome Bang! is here.

Moderator: Terryn

User avatar
Smilymzx
I hope she made lotsa spaghetti!
Posts: 180
Joined: Sat May 20, 2006 2:58 am
Location: LocacoLocacoL :LoL!

Re: Lyon

Post by Smilymzx »

Now Font and Palette support is finally back...

But it does not actually function yet, as support is still progressing!

Spectere
wants to have your babies.
Posts: 83
Joined: Wed Jan 26, 2005 11:13 am

Re: Lyon

Post by Spectere »

Indeed. :)

In the interest of not imposing limits, Lyon's font loader will happily load glyphs of any size. I was doing some testing with the CGA's 8x8 font and it looked quite nice with vertical doubling! The width is fixed at 8, but the vertical height can be anything. It should fully support all Font Mania fonts, regardless of size. The only limit is that fonts have to be 8 pixels in width. Uncapping the width limit is a bit less trivial and is not a priority at this time.

As of right now, the palette loader only supports MegaZeux (well, raw VGA color dumps, I should say) and UPAL palettes, the latter because I spotted one game in the archive that used it.

Writing a configuration manager is high on my list of to-dos and that will most likely bring in some command line parameter support...and I don't see any reason not to put in a set of /font and /palette switches when that happens. ;)

User avatar
Smilymzx
I hope she made lotsa spaghetti!
Posts: 180
Joined: Sat May 20, 2006 2:58 am
Location: LocacoLocacoL :LoL!

Re: Lyon

Post by Smilymzx »

Still, It is good to see things improve. This is really what I want to see!

User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Lyon

Post by Saxxon »

Uncapping the 8 pixel width would mean a complete rewrite of the system (it's a hack for performance reasons). Not to mention, as far as I understand, you'd need an unusual BIOS to any more than 8 (if you were doing it with ZZT on a typical system).

As far as command line stuff goes, I suggest making the primary argument the world name, just as with ZZT :) Args parsing should be pretty trivial with C#.

Spectere
wants to have your babies.
Posts: 83
Joined: Wed Jan 26, 2005 11:13 am

Re: Lyon

Post by Spectere »

VGA and MDA (and possibly EGA?) do support a 9x16 font mode, but I'm more inclined to say that it's an 8x16 font with an additional pixel tacked on to slightly increase the letter spacing. The only real reason to uncap the width limit would be to have a high quality double-sized font instead of pixel doubling.

ALSO! Configuration files, custom fonts, and selective vertical pixel doubling (controlled using the DoubleFontHeightThreshold key in the Video section -- basically, if the font height is equal to or less than this value, it doubles the font height on load):

Image

User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Lyon

Post by Saxxon »

Instead of calling it CustomFont and CustomPalette, maybe just Font and Palette would be appropriate :) Other than that I like what I see a lot! Looks like you have been quite busy :)

Spectere
wants to have your babies.
Posts: 83
Joined: Wed Jan 26, 2005 11:13 am

Re: Lyon

Post by Spectere »

Well, I kinda played with the idea of sneaking the CGA font in there while you weren't looking and allowing Font to be set to VGA or CGA. ;) I think I'll just do what you suggested, though. I can't see too many people fawning over the blocky and perhaps overly-retro CGA font.

And yeah, I've been trying to tie up a few loose ends while you work on the internals. Antichamber consumed my evenings for the last couple of days, but I think I'm better now. ;p

User avatar
Commodore
fgsdfs
Posts: 2459
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Re: Lyon

Post by Commodore »

Whoa, I have never seen that font before. I have tried zzt in tandy mode on dosbox, and this reminds me that I used to play on a zenith 80/86 with a green screen monitor. (My first "dosbox" after my family got the pentium with win95) The 386 we had (with the turbo button, and the awesome power switch that turned it off like you meant it) went to my dad's shop. Ah crap, rambling... going to work on stuff now I swear.
*POW* *CLANK* *PING*

Spectere
wants to have your babies.
Posts: 83
Joined: Wed Jan 26, 2005 11:13 am

Re: Lyon

Post by Spectere »

I got to play around with an IBM XT with an installed CGA card about 20 years ago, and I distinctly remember that chunky font. I'd guess you can say that I've seen it for just long enough to know that it's the original IBM CGA font, haha. Even the oldest systems that I've played ZZT on have either had a VGA (the first system that was officially "mine" was a custom-built 10MHz 8088 with a VGA; it originally had an HGA, but my dad upgraded it), or a CGA-compatible adapter with better text mode support.

I actually got that font by finding a dump of the CGA ROM and ripping it out. Apparently (and I haven't looked into this too much, so I'm going based purely on what I've read on forums), the CGA and MDA boards both used the same ROM chip to save on production costs. Additionally (and I have verified this), the ROM set contains both regular and bolded character sets.

Zenith...haven't heard that brand name in a while! The only Zenith that I used was a 286 laptop. A bit sleeker than my clunky (but innovative!) Toshiba T1200 but far less reliable. If my dad hadn't thrown it away (grrrr) the T1200 would probably still run like a champ to this day. My cousins used to have an 8086 Zenith desktop that saw quite a bit of ZZT time before they wound up getting a Packard Bell 486. I'm not familiar with their early product lineup, but it might have been the same one that you had.

If you want to talk about an epic leap, our main family computer went right from that 10MHz 8088 to a shiny new Tandy Sensation with a 486SX 25MHz. Yeah, just a minor step up. Interestingly enough, the reason that I got into ZZT in the first place is because the Sensation had a blazing fast 1x CD-ROM drive, and my dad picked up a little shareware CD (which I still have) called So Much Shareware! 3 that had the shareware version of ZZT, along with several Janson creations.

Just realized that it took me 20 years to contribute a damn thing to any ZZT-related project. I suck. I wonder if I still have any of the crappy "things" that I made when I was 8 so that I can totally embarrass myself here as well.

User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Lyon

Post by Saxxon »

Spectere wrote:Just realized that it took me 20 years to contribute a damn thing to any ZZT-related project. I suck. I wonder if I still have any of the crappy "things" that I made when I was 8 so that I can totally embarrass myself here as well.
Haha, you aren't the only one :) This project is all I have to show for my involvement in the ZZT community since the millennium. (I knew about it I think in 96 on- you guessed it- a shareware CD, but I never communicated online until about 2000.)

User avatar
Smilymzx
I hope she made lotsa spaghetti!
Posts: 180
Joined: Sat May 20, 2006 2:58 am
Location: LocacoLocacoL :LoL!

Re: Lyon

Post by Smilymzx »

How about adding support for Blink/Bright Toggle to config?

Spectere
wants to have your babies.
Posts: 83
Joined: Wed Jan 26, 2005 11:13 am

Re: Lyon

Post by Spectere »

Thanks for the reminder! I just added it.

Under the [Video] section, use Blink=1 to enable blinking on backgrounds 8-15 (default) and Blink=0 to disable blinking and use the high intensity colors.

Also, if you ever want to see what all of the supported values are, take a look at src\Lyon\Resources\Default.cfg in the trunk. It shows the implemented key/value pairs and sections that are being used. If a Lyon.cfg file exists in the directory with the executable, the values in there will override the defaults.

There isn't a well-documented Lyon.cfg at this time, but ConfigManager does support comments, and as time goes on I'm going to work on a documented configuration file to be included in the distribution.

User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Lyon

Post by Saxxon »

The Hud system is such a mess. I can't believe I let it go on this way. Lessons have been learned. It's going to take some time to sort out before there's any noticeable effect (it is a separate, broken branch). It probably won't behave too much differently on the surface. But underneath, the class structure needs to be redone in order to accommodate for an editor.

Spectere
wants to have your babies.
Posts: 83
Joined: Wed Jan 26, 2005 11:13 am

Re: Lyon

Post by Spectere »

Maybe this will cheer you up, Saxxon: we have an OpenGL renderer now! I'd been putting it off for a while, but as it turns out it wasn't that hard to put something workable together. It's most likely not as optimized as it could be (it draws one quad for the background and one for the foreground and it draws each character independently), but I did what I could in a fairly limited timeframe. I did make it smart enough to skip black backgrounds, as well as characters whose foreground colors match their background.

The part that really sucked is that the input handler that OpenTK uses doesn't spit out anything compatible with Window.Forms.Keys, and since that appeared to run pretty deep in the core of Roton I hammered out an ugly remapping function. I actually forgot that I did that until I scrolled down and saw that ugly mess. Ugh.

Anyway, the huge boon for this is that the OpenGL offers better performance in Windows Vista and up, and significantly better performance on OS X. Lyon went from constantly skipping frames at 1x scale on my Mac to running at full framerate at 2x scale. I have only tested this on NVIDIA cards at this time, but I do have access to two systems with AMDs (an X300 and an HD5830) and two systems with Intels (a GMA965 and a 4000), so that will happen fairly soon.

All of the basic functionality, including blink/bright, works fine on OpenGL. There are two limitations to OpenGL at this time.

The first one is that while fonts and palettes are supported, they cannot be dynamically changed. There isn't an in-game method to change them dynamically at this time, but it still bothers me. It shouldn't be too hard to deal with, fortunately.

The second limitation is that smoothing cannot be done with the way that I'm rendering the glyphs. Each glyph is its own texture, so blurring won't extend beyond the edges of the glyph.

I'm sure there's some shader magic that I could always perform down the road to perform some nice, high-quality resampling, but that's definitely firmly planted in the "nice to have" list.

I've also been toying around with different waveforms on the Audio side of things to try to make the square wave a bit less harsh. I've been studying the audio output of PCem and DOSBox to soften the square wave without neutering it. I also did some refactoring on the wave generator to make it a lot easier to experiment with new waveforms.

User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Lyon

Post by Saxxon »

The way I did it when I used DirectDraw was upload the entire bitmap as a texture. That way you get smoothing across the whole surface. Is this a possibility with OpenGL?

Post Reply