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

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

It's the boring stuff that gets ya..... 
Wednesday, January 30, 2008, 08:35 PM - Dragon King
UGH! On the one hand I love the new skinner as it makes things a lot more "wysiwyg". On the other hand, I absolutely HATE having to add in all these menus. Not only do I have to add a function to display a menu, but I also have to add code to about 4 more functions which retrieve all the necessary values of the object in question, translate the actual setttings (which are usually a numeric value) into actual text that the user can understand and finally save the altered settings. Even though my new menu fucntions are rather streamlined it still takes a solid few hours to add in an object and test it to make sure it works correctly. I recently finished adding what were the "scheme" settings in the old skinner and that actually took two afternoons to do! (Note that I'm not working non-stop for hours at a time, I usually spend an hour or so an evening on this.)

Needless to say, I'm still not done adding options to the skinner. Some options I plan on intentionally leaving out, not because they can't be done internally, but because it'd require me to add too many menu objects. To give you an idea of the mind-numbingly dull stuff I've been doing lately, here is my "to-do" list for the menus.

---------------------------------------------------------------------------------------
snap/title
----------
Toggle Snap = Yes, NO, Fe Default
Toggle Time = 0-?

////snap
////----
////videos=Yes, No


path
----
////Alignment
Caption=
////Inteveral=0-?


////3dmodel
////-------
//leftoff
//topoff
////Videos=Yes, No
////Stop Rotation=Yes, No
Inital Rotation=0,0,0
////X Spin=
////Y Spin=
////Z Spin=
////xoff=
////yoff=
////zoff=


list
----
Columns=
List Type=Normal, Snap, Flyer, Marquee, Cabinet Title
Custom=Yes, No
Element Width=
Element Height=
Space=
Text Align=Left, Right, Center

////background
////------------
////all blend stuff
////layer
////Scroll Rate

////overlay
////---------
////all blend stuff
////layer



////fonts
////------
////font name=
////font size=
////r=
////g=
////b=
////High R=
////High G=
////High B=
////MenuTrans=
////FontTrans=
////HighlightTrans=
Pulse=
-------------------------------------------------------------------------------------




Each section generally requires about an hour or so to add. This doesn't include the 13 or so "main" groups I had already added. Things that are slashed out I'm finished with, so as you can see, it won't be much longer. Hopefully then I can concentrate on the more interesting features I've yet to bundle up which will be better for you and me. :)
3 comments ( 13 views )   |  related link


Back Next