#7837 - marker - Thu Jun 26, 2003 11:16 am
Does anyone know how to make fonts?
I guess you have to make sprites for each letter and assign ascii values, but is there a tutorial on this per haps?
-Marker
#7838 - Lupin - Thu Jun 26, 2003 1:03 pm
I sent an litte source code to gbadev.org, maybe it will be available in some days, it shows how to use an bg layer to display the text.
basically you just create an bitmap font where each char is an 8x8 pixel image, then you create an bg layer and index these 8x8 tiles by using the layer. It's pretty simple though
#7847 - Cyberman - Thu Jun 26, 2003 3:45 pm
marker wrote: |
Does anyone know how to make fonts?
|
Yes...
marker wrote: |
I guess you have to make sprites for each letter and assign ascii values, but is there a tutorial on this per haps?
-Marker |
No....
You have a few methods at your disposal.. create a tile set of characters (common and quick). Have a set of fonts you can draw onto a tiled buffer and then place them as sprites on the screen. (not your method)
You can't really use sprites one per character .. unless you plan not to use sprites for anything else.
A simple text screen would use an inordinate number of sprites and you would have to set the position of each sprite.
I use Mode 1 a lot and put text on BG2 (rotation and scaling layer) sometimes or BG1. BG2 means you have to use 8 bits per pixel (but if it's what you got it's what you got) you have 1 character tile per character to be displayed (I skip the first 32 symbols in ASCII and start with the space). So I use 96 symbols. This needs 3K to 6K of space in video memory. Writting to the display is merely a byte or usigned short write to memory. Very quick. So you can update the displayed data very quickly.
If you want to use sprites then you will need to form your characters in WRAM or IRAM and then move them to the sprite memory and allocate a sprite. If you have Golden Sun 2.. examine what it does for dialogs in Visual boy advance by clicking tools OAM and check the sprites out. This is the most practical way to use sprites for dialog.
#7867 - marker - Fri Jun 27, 2003 7:15 am
Thanks folks!
This forum is a great resource!
-Marker
#7872 - tepples - Fri Jun 27, 2003 7:39 am
Cyberman wrote: |
You can't really use sprites one per character |
Tetris Worlds does at points. F-Zero: Maximum Velocity does at points. Quite a few Super NES games do it too. But then, those games have 16x16 pixel fonts and don't display much text at once.
Quote: |
A simple text screen would use an inordinate number of sprites and you would have to set the position of each sprite. |
But you would gain the ability to do proportional fonts and cute entry and exit effects.
Quote: |
I use Mode 1 a lot and put text on BG2 (rotation and scaling layer) sometimes or BG1. |
I often use BG1 for a text layer as well.
Quote: |
If you want to use sprites then you will need to form your characters in WRAM or IRAM and then move them to the sprite memory and allocate a sprite. If you have Golden Sun 2.. examine what it does for dialogs in Visual boy advance by clicking tools OAM and check the sprites out. This is the most practical way to use sprites for dialog. |
VBA's tile viewer tells me that Metroid Fusion does the same thing, except rendering to background tiles instead of to sprite tiles.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#7904 - Cyberman - Sat Jun 28, 2003 12:32 am
tepples wrote: |
Tetris Worlds does at points. F-Zero: Maximum Velocity does at points. Quite a few Super NES games do it too. But then, those games have 16x16 pixel fonts and don't display much text at once.
|
Ok Can't is a strong word.. how about generally impractical? :)
tepples wrote: |
But you would gain the ability to do proportional fonts and cute entry and exit effects. |
Yes.. you could make a dizzy miasma screen so they wanna chuck looking at it! ;) Actually this gave me an evil idea :) hmmmm
tepples wrote: |
VBA's tile viewer tells me that Metroid Fusion does the same thing, except rendering to background tiles instead of to sprite tiles. |
Haven't played metriod fusion to be honest :) Oh well..
However a lot of games use these techniques.
Cyb = love peace and.. dang what was the other one?
#7993 - Ninja - Mon Jun 30, 2003 4:25 am
Personally, I find Sprite Text to be useful if you are only doing short bits of text. It allows you to use another background for whatever reason you might have, and it's not like text is going to eat up ALL your sprite memory.
In 16 color mode, you will run out of sprites after using up 128 blocks of OAM with text. Text is quite economical as far as space is concerned, it just eats into the number of sprites you can use is all. If your game doesn't have much on the screen as far as characters and items are concerned, but is already using all 4 backgrounds, sprite text is a fine alternative.
I'll actually submit a SpriteText demo tomorrow if anyone wants to see how to code that in addition to Lupin's background demo.