Path: chuka.playstation.co.uk!news From: Robert Swan Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: how made his own font ? Date: Thu, 13 Aug 1998 13:46:21 +0100 Organization: I wish! Lines: 30 Message-ID: <35D2E01D.5CA1@mdx.ac.uk> References: <35C81A30.4ACB@club-internet.fr> <35C82DDB.3E12E37C@scee.sony.co.uk> <01bdc061$2c186980$f30b0a0a@Angela1.intelligent-group.com> NNTP-Posting-Host: nova.mdx.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01 (X11; I; SunOS 5.5 sun4u) minor variation on a theme here - In my game i dont want multiple sprites on screen (especially as text messages will be several hundred chars long) so Ive done it a different way. Copied the tim with all the letters onto it from main memory to video memory, and then i create a sprite and set the attributes manually to use part of the video memory that is at present empty. Then I process a string in the same way as the other guys and use MoveImage (as opposed to drawing with sprites off screen (shudder!)) to copy one letter from the font to the correct area where the sprite is. Result is that all messages end up on only one sprite (nicer to handle etc etc) not sure about overhead costs (although I think it should be slightly quicker to set up) One problem with this is that MoveImage only works on long boundaries (unlike sprite processing, which is dependant on colour depth) meaning Ive had to make my font a 32k colour tim, otherwise when it comes to cutting and pasting each letter, they would have to be done on 4 pixel boundaries for 16 colour, and 2 pixel boundaries for 256 colour. seeing as I want each letter to have a proportional width, I need to be able to manipulate on a per pixel basis, hence 32k colour. Nice thing about doing it this way, (as you should see in my demo when it goes up today) (plug) is that you can do nice effects, such as, one sprite showing all text normally, and another sprite using same texture image slightly offset and using subtractive semitransparency (method 2) to create that 'relief' effect. Maybe after the compo Ill give out the source in a small routine, but cant be arsed right now :)