Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Knox on Sun 15/09/2013 02:29:39

Title: How do I make my own bitmap font sheet? [SOLVED]
Post by: Knox on Sun 15/09/2013 02:29:39
Hi,

I hope this isn't one of those questions that gets asked over and over again (I checked the site without much luck, however I could have missed something).

I have a font right now I use in photoshop that uses a style and drop-shadow, and Im just saving the text I need as sprites and placing them as buttons on my GUI's. I figured I could save sprites (and make it easier to translate later) by just making them text labels with a custom bitmap font.

I'd rather use Photoshop to make my bitmap font, but how do I do this so it works in AGS...? I checked google too but I'm not too sure what the "best way" would be, I really am a noob when it comes to this. Can anyone offer a tutorial or perhaps point me in the right direction?

Thanks in advance guys! :=
Title: Re: How do I make my own bitmap font sheet?
Post by: Crimson Wizard on Sun 15/09/2013 02:43:15
http://www.adventuregamestudio.co.uk/forums/index.php?topic=44359.0
Title: Re: How do I make my own bitmap font sheet?
Post by: Knox on Sun 15/09/2013 15:50:24
Thanks for the link Crimson, I tested that already though (pretty cool)...however I was wondering more on how to do it all myself "from scratch" (not a plugin). I found some bitmap grids on the net, gonna try to copy those + continue searching for a tutorial. :cool:
Title: Re: How do I make my own bitmap font sheet?
Post by: Crimson Wizard on Sun 15/09/2013 15:59:39
Well, I think it is possible to script this as a module , but this way you won't be able to make it a "real" AGS font.
Meaning, you won't be able to use this "pseudo-font" with built-in display boxes, speech, etc.

You may script a function that draws a text using bitmap tileset.
You may either import whole font as single big sprite, or as a multiple sprites - one per letter/symbol. In the first case you'll also need an array of coordinates to find letters inside big sprite.

E: I must apologize, I don't have enough time to make a proper AGSScript example right now. But the drawing algorythm should be rather straightforward.
Here, you may use Calin's plugin source as a basic reference:
https://github.com/adventuregamestudio/ags/blob/master/Plugins/AGSSpriteFont/AGSSpriteFont/SpriteFontRenderer.cpp#L83
It's C++, but it looks very similar to AGSScript.
Title: Re: How do I make my own bitmap font sheet?
Post by: Knox on Sun 15/09/2013 16:09:42
Thanks Crimson! :grin:
Title: Re: How do I make my own bitmap font sheet?
Post by: Calin Leafshade on Sun 15/09/2013 21:34:07
Are you talking about drawing them in AGS or just making the font graphic to use in AGS?
Title: Re: How do I make my own bitmap font sheet?
Post by: Knox on Mon 16/09/2013 02:13:56
Initially I wanted to create my own font sheet graphic in photoshop without any programs, but SpriteFont does it so well automatically I guess it would be a waste of time doing it manually on my own.