The Dragon King
Stuck in the Middle.... 
Friday, February 15, 2008, 04:58 AM - Dragon King
Well the cleanup of my raster font code is coming along nicely. When I first added it to dk ages ago, all raster fonts had a ttf dependant that was used to determine postion and scale. At the time I didn't expect fonts to get very fancy and I figured this would save me a lot of calculations on centering, multi-lined text and other misc issues. Of course, as I experimented with video game fonts the limitations of this dependancy became apparent. The biggest issue was centering. I used the good old ".textwidth" function in vb to determine the width, seeing as how I had to manually determine the starting point of a centered line of text. Well when the ttf font was wildly different from the raster font, this width would differ, and what you'd get was "funky" centering.

I've rolled out my own ".textwidth" function that works with the raster dimensions and a arbituary pixel height. This seemed to do the trick as you can see by the text below:





The only thing that the raster functions use the ttf fonts for at this point is the height (the height I send to the rastertextwidth function is determined via .textheight). I may actually keep it that way. Right now you determine the textheight in dk via the fontsize, which makes sense as 90% of your skins are gonna use plain old tt fonts. It seems silly and confusing to me to have a seperate, pixel-based text height setting and I don't see as how the height would be any different between one font and another or at least not to a degree that it'd effect character placement. I'm welcome to feedback on that one though.

Raster Fonts! 
Wednesday, February 13, 2008, 08:25 PM - Dragon King
Finally out of the pure hell that is the skinner, I've decided to focus work on some of dk's more interesting features. One of the things I'm really excited about because it adds a new element to skins is raster fonts. What are raster fonts? Well another name for them is bitmap fonts because that's what they are, fonts in bitmap format instead of ttf. This is good for us because video games use raster fonts exclusively and we can rip them and put them in our skins for a more authentic look.

Sometimes it's better to just show you, so here are som random video game fonts applied to a very basic skin:










How do you add raster fonts? Well fortunately sprite rippers have done most of the work for us. There are various bitmap font "standards" flaoting around the net and dk comes packed with a utility that can convert most of them to a format that dk can use "automagically". This utility can also make raster fonts out of a true-type font that you can in turn edit in photoshop for a dramatic effect. On top of this, I also plan on having the converter support the most famous raster font type, namely the SDL font, which is what mame uses! I'll post a tutorial on how to do all of this (quickly without having to edit each character manually) at a later date.

Ragardless, for now I'm cleaning up the raster font code and I'll keep you posted.


1 comment ( 27 views )   |  related link

Happy Days are Here Again! 
Monday, February 11, 2008, 04:38 AM
With the exception of those two or three settings that'll require keyboard/hi-score mode input to set the skinner is now complete! I have no doubt that when this release comes out we'll find a bug or two though as there's simply too many settings for me to catch everything, even with my own testing.

I've gotten a couple of posts saying a keyboard mode would be useful, so I'll add it and have an option to turn it off in the frontend.ini so that it doesn't interfere with the hi-score style input. How I'll set it up is you highlight a setting and press enter (regardless of your input mappings) and up pops a dialog box. You type normally, having full use of the backspace key incase you make a mistake. Pressing enter again will change the setting and rturn you to the menu your were in while pressing escape will cancel. Due to complications, the arrow keys and delete keys will NOT work in keyboard mode. Fair enough?

I'm tired of doing stupid functions so I'll probably take a break for a few days, but I'll make a post as soon as I get started again. Tomorrow I might put up a quick skinning tutorial just to give you an idea of how to make a simple skin from start to finish.


1 comment ( 5 views )   |  related link

Time for a quick update...... 
Saturday, February 9, 2008, 01:00 AM - Dragon King
Ok the internal skinner is just about done at this point. I need to add in two more random settings, implement some way to edit custom lists (which involves thinking about how to add the interface more than anything else) and clean up the menus in general. On thing that still needs implemented for two or three settings is the ability to type text for captions and such. The idea is that I'll use the "high score" navigation that dk currently uses to search for games in that up and down cycles through the letters and left and right changes postion, like when you enter a high score on a video game. I could also add a directy keyboard method I think, but I dunno if anyone would find it useful. I'd appreciate some feedback on that one.... do you guys think using a keyboard to edit settings is a viable option?

Anyway....

I'd say I'm on track for getting it done by the end of the weekend like I said in the last entry! This means I can get to fixing some of the more interesting features, which means you get a preview of some of the more interesting features!
1 comment ( 11 views )   |  related link

UGH! (Part 3) 
Wednesday, February 6, 2008, 10:15 PM - Dragon King
Yup, still working on the skinner. Yup, it still sucks. I had some serious issues getting some of the list options to work, but those seem to be fixed, so I can add the remaining options and finally put that behind me. I'm not getting in any hurry on this part though (as it is extremely boring) so don't expect me to post something new until next week. The skinner anoyances have put me about a week or so behind, so the release might end up being slighty after the end of this month, but not by much. In the mean time, stay tuned for more updates as they arrive.
2 comments ( 8 views )   |  related link


Back Next