Jump to content

  • Log In with Google      Sign In   
  • Create Account


RnaodmBiT

Member Since 27 Nov 2010
Offline Last Active Today, 06:22 PM
-----

Posts I've Made

In Topic: [SOLVED] Where to get a Font Sheet for Direct3D 11 use?

28 July 2014 - 01:31 AM

Yes, the details on what you get from the fnt file is described in the link I posted above.


In Topic: [SOLVED] Where to get a Font Sheet for Direct3D 11 use?

27 July 2014 - 08:56 PM

When you ask for a font sheet, you need to be specific. There are several formats for identifying characters used in computers but most common are ASCII, UTF8 (encompases ASCII), and UTF16. Using UTF16 there are 1,112,064 different characters (Think about all the different languages like English, Arabic, Chinese, Japanese, etc...) so imagine trying to fit all that into a single sheet! BMFont allows you to select only the characters that you will need in your game thus reducing the size of textures needed to store the required glyphs.

 

When using BMFont, you select which characters you want to export, sometimes you might only want some from a certain set ie. ASCII or sometimes you want an extended set if using wide character (ie. UTF16) encoding. So you select which characters you want, probably just the basic Latin characters, they will be highlighted. Then you set the exporter options as to which descriptor file format you want (Text, XML, or Binary) and the character descriptions will be exported. Another (possibly more than one) file will be created as well. These are the glyph pages and will be in what ever texture format you selected (DDS, PNG, or TGA). When using these files you open and parse the .fnt font descriptor file which tells you basic info about the font settings (ie. Line Height, texture settings, etc.) then you load info about each individual glyph, and which character value it corresponds too, which texture page it is located on, and the texture coordinates, size, and how much to advance the drawing position when moving to the next character. These .fnt descriptors might also include kerning data which will adjust the spacing between specific character pairs such that the font renders with a nicer looking spacing.

 

Everything about the program and the file formats can be found in the documentation including examples on how to render some text here: http://www.angelcode.com/products/bmfont/documentation.html

 

As a proof of concept, I have actually just completed a font renderer using the binary file format generated by BMFont.

 

Note: Apologies if I have a mistake about wide character encoding, I mostly just stick to the ASCII set. 


In Topic: Minecraft Terrain Generator

11 June 2014 - 05:56 AM

I would also like to mention the use of sampling a 3D noise function using fBm sampling to generate a 'density' function (even just combining several 2D samples can look good). If you then subtract a threshold value from the function you can say that any where the density is less than 0, you have open space and larger than 0 indicates solid ground. This can be used to generate voxel fields or as input for the marching cubes algorithm to generate some nice terrain with the advantage of the ability to specify open spaces 'under ground', ie. caves.

 

-BiT


In Topic: Elements of Minecraft

11 June 2014 - 12:44 AM

I found it quite enjoyable that I can hop on with a few friends when we feel the urge to go on an adventure, build a fortress, and explore far-a-way lands. Unfortunately I don't last that long when it's down to just building things but that's just my take on it.


In Topic: WASD or Mouse movement - Top Down Stealth

11 June 2014 - 12:41 AM

Why not have both and just have to option to change control mappings?


PARTNERS