Advice on large amounts of text in game

I have several screens of instructions and other similar type screens that are fairly text heavy and as the file size of my game has already exceeded 20mb I was contemplating using live text instead.

If I do this, am I stuck with using the default font or does the iPhone have a choice of fonts I can use? The font I have been using when doing the text as graphics is called Serpentine but I imagine I would not be able to embed this / distribute this as a custom font?

Any advice appreciated? What do most people do with regards lots of text? Text or Graphic? [import]uid: 7863 topic_id: 4256 reply_id: 304256[/import]

how about using web popups for instructions. include the html files in the directory and point to the webpopup to the html page so that you don’t have to create images…

Carlos [import]uid: 24 topic_id: 4256 reply_id: 13243[/import]

But you can embed custom fonts, it’s even on the front page of the forum:
http://developer.anscamobile.com/forum/2010/09/30/embedding-custom-fonts#new

However to get the text to format as nicely as you can do in illustrator… yeah, good luck with that. I couldn’t even figure out how to do line breaks. So I needed a display.NewText for each line (super fun).

Also I couldn’t figure out how to do outlines (Think a font with yellow fill and black stroke), so my work around was to use a black text then another black text 2 pixels down and 2 to the right AND then the same text in yellow 1 pixel below and to right of the first, sort of sandwiched within. I looks nice, but super fun to code to be sure. [import]uid: 10835 topic_id: 4256 reply_id: 13245[/import]

Also, be careful with embedding fonts as you then have to think about getting a license (unless of course it is totally free), whereas you don’t need a license for simply creating text in images.

I am not a lawyer but believe this is how it works. [import]uid: 5833 topic_id: 4256 reply_id: 13246[/import]

It was my understanding (clearly wrong :slight_smile: ) that you couldn’t copyright the look of a font, only the actual font file (as “source code”) so if you included the .ttf file this would be considered distribution but if you simply created images from the text this would be OK.

Or perhaps it is if you are using a font that you already own (for instance one that comes with Photoshop as you have paid for that) so perhaps you would still need a licence for the other font just not a distribution licence. Again, I’m probably wrong :slight_smile: [import]uid: 5833 topic_id: 4256 reply_id: 13248[/import]

No, you still need a license for that. Obviously stick to free fonts (unless you do have the license).

Edit: to clarify, you need the license in your graphic software to actually create the image (since you’ll be typing with the font, much like you would in Corona). In fact I think it won’t even save it if you don’t (I could be wrong about that). [import]uid: 10835 topic_id: 4256 reply_id: 13247[/import]

I explained the reasoning in my edit. But basically you’re still using the font “code” to create the image.

With such an abundance of quality free fonts I can’t imagine why one would even bother to pay for one and deal with all the licensing stuff though. [import]uid: 10835 topic_id: 4256 reply_id: 13249[/import]

Oh yea I agree, I wouldn’t use a paid for font as there are so many really nice alternatives, I just wanted the OP to be aware incase the font he was using was commercial. [import]uid: 5833 topic_id: 4256 reply_id: 13250[/import]

Thanks for all the replies.

The web popup is an interesting suggestion but I don’t feel I can achieve the desired look this way and I assume it is limited to default font?

I am happy to purchase a font to use in my game - just don’t know if purchasing a font gives me the rights to distribute it. Safer avoiding this option.

Looks like I may have to use graphics after all unless it is legally possible to create live text with a font that is not going to cost the earth. [import]uid: 7863 topic_id: 4256 reply_id: 13252[/import]

Go here: http://www.urbanfonts.com/

Have fun. [import]uid: 10835 topic_id: 4256 reply_id: 13253[/import]

Thanks Ig

I downloaded a font from Urbanfonts and the readme says the following. To me this isn’t crystal clear though I guess I can contact the font owner to clarify

You may use this font(s) for non-commercial and
commercial purposes. You are not allowed to sell this
font for any fee at all. You are allowed to
redistribute it as long as you don’t charge ANYTHING
for it (at all) and if you include this unaltered
Read Me file. You may not change any aspect of the font
file or this file.

[import]uid: 7863 topic_id: 4256 reply_id: 13254[/import]

The iPhone has 24 font faces built-in and 54 font styles so you have a reasonable choice of live fonts you could use without having to install your own. See this document for a full list (including the iPad which has even more).

http://www.michaelcritz.com/2010/04/02/fonts-for-ipad-iphone/

There are a couple of useful functions on the Ansca forum that will do text wrapping with live text, by building a series of text objects into a group. Do a search here for “text wrapping” and you should find the code. They work pretty well, and you can include line breaks by using the \n escape sequence.

I’m developing a number of book apps using live text stored in tables (using both Lua and SQLite tables) which is then formatted in code for each page and it is a lot easier than creating each page in Photoshop (once you’ve got the page template code). [import]uid: 2646 topic_id: 4256 reply_id: 13255[/import]

The readme is pretty clear. You can basically use it for whatever you want (like in your paid games). The only thing you can do is actually sell the .tif file, which of course makes a lot of sense. Also you can’t use the font as a basic template to create your own (and then presumably sell them).

Basically you’re in the clear, just use it, no need to contact anyone.

Edit: I’ll look into the text wraping thing, I couldn’t find anything on it before (then again the search is lousy at best). [import]uid: 10835 topic_id: 4256 reply_id: 13257[/import]

Thanks Ig - that is comforting to know.

Also of interest is there appears to 93 native fonts on my iPhone so possibly all iphones have these and there may be some good ones [import]uid: 7863 topic_id: 4256 reply_id: 13260[/import]

@spjnowak - sorry didn’t spot your post

Very helpful thanks [import]uid: 7863 topic_id: 4256 reply_id: 13262[/import]