HBGames || seperate menu for a seperate site

Welcome Guest ( Log In | Register )

modding *chan irc utilities downloads filehost pastebin[Big|Medium|Small] -
GameLlamas
Side Menu


Getting About
Friends



Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 23 posts ] 
Elijah von Bose
  Wed Jan 03, 2007 11:15 pm
Member
Bitmap Font Rendering Script
Version 1.0
By Paradox, with an immense amount of debugging help from Trickster.
Quick Glimpse at the Default Font in-action

The Purpose of This Script:
This script was created to enhance your displays. You can easily make your own, amazing fonts using this.
The bonus of this script, is that you can easily create amazing, per-pixel full-colour fonts!
But, how can I use it?:
This is more or less a development tool for scripters. It allows for nicer windows, and such.
Expand to see the code.

Setup:
All you need is at least one font, and one is included with the script. It is Verdana, put into an image. Of course, you can make much fancier ones, but I'm no artist.
Making a font is easy, too: you just create an image, with enough equal spaces for 26 characters (wide) and 3 rows. The example font shows you, as each character has a bounding box of 15x21.
Script:
Version 1.0

[/spoiler]
Frequently Asked Questions:
How do I change the default font?
You can change it by finding this line in the script:
Expand to see the code.

and changing 'Verdana' to your font's filename.
Future features:
Possibly, more characters and whatnot?
Credit goes to Paradox
And possibly, Trickster as a small mention, if he wills it.

_________________
Why hello there, tiny rabbit.[/FONT]


Last edited by Elijah von Bose on Wed Jan 03, 2007 11:28 pm, edited 1 time in total.

Top Top
 Profile  
 

Selwyn
  Thu Jan 04, 2007 12:02 am
User avatar
Member
That's a really nice script you have there.

I think I've found a use for it, but I might change a few lines. Do you mind?


Top Top
 Profile  
 

Jstreet
  Thu Jan 04, 2007 1:00 am
Alias: Panda
User avatar
Sponsor

Location: Tucson, AZ
Hmm a script for better visual quality, with a screenshot in poor quality jpg. Irony lawl.

_________________
~ J-Street ~


Top Top
 Profile  
 

Taylor
  Thu Jan 04, 2007 2:03 am
User avatar
Would it be possible to make this override the default text drawing, so all text uses the bitmap unless another bitmap is used?

_________________
Image


Top Top
 Profile  
 

KAIRE
  Thu Jan 04, 2007 4:18 am
Member
so pictures in full color can be use to replace the text? demo would be great. maybe a better screenshot example?


Top Top
 Profile  
 

rpgmaker
  Thu Jan 04, 2007 4:21 am
Member
Can I steal your script too? ^_^

_________________
Check This Out

http://www.iomegatrix.com/Pictures/banner.png[/IMG]
http://i19.photobucket.com/albums/b169/ ... _image.gif[/IMG]
http://jbpatout.free.fr/psp%20owner%20glitch.gif[/IMG]


Top Top
 Profile  
 

Trickster
  Thu Jan 04, 2007 5:02 am
Member
Actually he isn't lying I did help him with this script ^_^

But yeah a another replacement for the time-consuming draw_text method

Be Back with a code analysis (Hehe, And don't think that if you get help from me that you are safe from me )


Top Top
 Profile  
 

Elijah von Bose
  Thu Jan 04, 2007 7:53 am
Member
Lol! Well, you know. I would've used PNG, but this computer has dial-up, so I tried for most file-squeezing :P
@JerbyTaylor: Uhm... just no (you could, though). It's not the same, and you probably wouldn't like the results. Maybe in a later version.
@KAIRE: Yes pictures in full-color can replace the text. That's what makes it sick.

Thanks for comments! I will be improving the script, as it was written at around 2am-6am :P

_________________
Why hello there, tiny rabbit.[/FONT]


Top Top
 Profile  
 

KAIRE
  Thu Jan 04, 2007 8:50 am
Member
that's cool, can you upload a demo or something cause i really don't quit get where to add "Bitmap#bitmap_font(x, y, text, [ font])" and why is "#bitmap_font(x, y, text, [ font])" comments out? is it suppose to be like that or do i remove the "#"?


Top Top
 Profile  
 

Elijah von Bose
  Thu Jan 04, 2007 8:54 am
Member
Heh, no, ok. This is why I said it's mainly a tool for scripters. Here's a quick tutorial:

Go to your scripts editor.
Go to the window you want to add it to.
you should see a line that says:
Expand to see the code.

This is creating an instance of the "Bitmap" class. I added this method to the Bitmap class, so to use it, you would add (in the update method, after self.contents.clear) :
Expand to see the code.

Of course, replacing x and y with numbers :P and text with quoted stuff, like "john lawl"

If you need further clarification, you could PM me.

_________________
Why hello there, tiny rabbit.[/FONT]


Top Top
 Profile  
 

KAIRE
  Thu Jan 04, 2007 9:05 am
Member
oh now i get it. thanks, now i just need to make my own image! seems to work great!


Top Top
 Profile  
 

Kojiro Ganryu Sasaki
  Thu Jan 04, 2007 12:05 pm
Member
Does this by any chance support symbols within text?

I'd like something that would allow me to put some item icons within text itself. For example through preset letter combination SYM1, SYM2, SYM3 etc. etc. No one is likely to use those words in dialogue anyway, so they'd be fine to reserve for the symbols.


Top Top
 Profile  
 

Me(tm)
  Thu Jan 04, 2007 12:09 pm
User avatar
Member

Location: Delft, The Netherlands
It might be quicker... but I assume this will take more memory?

_________________
Image


Top Top
 Profile  
 

Axerax
  Thu Jan 04, 2007 3:24 pm
User avatar
Member
The easiest way to create fonts is opening a font file of your choice into Adobe Illustrator, then change text to outline, from there you can use the pen tool to alter and generate new text.

_________________
Image

Kailis Topic: http://www.hbgames/forums/viewtopic.php?f=78&t=63810


Top Top
 Profile  
 

Mac
  Thu Jan 04, 2007 3:53 pm
User avatar
Member
Yeah as Meâ„¢ said its going to slow down stuff, anything that calls on bitmap usually slows down the game plus also you are caching an image which will also affect it, but then again the script is still very small but i can still imagine it having an affect.

_________________
Good Bike!


Top Top
 Profile  
 

Elijah von Bose
  Thu Jan 04, 2007 8:12 pm
Member
Actually it's faster than draw_text, as it doesn't do anything other than render the image. It will only take as much memory as your font file. It's better overall. Also, you can make fonts however you wish, I used GG.

Also, on the symbol note: If you want, you could just replace symbols like ; or \, or ), as they're most likely not going to be used. ^-^

_________________
Why hello there, tiny rabbit.[/FONT]


Top Top
 Profile  
 

Me(tm)
  Thu Jan 04, 2007 8:17 pm
User avatar
Member

Location: Delft, The Netherlands
I have seen the script. I will look into the memory consumation. It is quite a cool script! :D

_________________
Image


Top Top
 Profile  
 

Mac
  Thu Jan 04, 2007 8:18 pm
User avatar
Member
Oooo i never knew that, i shall have to give this a whirl sometime then :D

_________________
Good Bike!


Top Top
 Profile  
 

Chocolate-Cow
  Thu Jan 04, 2007 11:54 pm
User avatar
Member
Do you have a sample of a picture or can you provide a template of some sort? This script is really neat. Good Job :)


Top Top
 Profile  
 

Elijah von Bose
  Sat Jan 06, 2007 6:45 am
Member
I have provided a template, it is within the script box, at the bottom. It is just an image, (any size) which holds enough EQUAL sized spaces for 26 characters across, and 3 rows. For referencing information as to which holds what, see the image I made.

_________________
Why hello there, tiny rabbit.[/FONT]


Top Top
 Profile  
 

lethalvisions
  Mon Nov 12, 2007 7:30 pm
Member
You know, this will really come in handy... dare i say it...

See, I work with someone who's sort of hard of sight, when it comes to the little words, but, with the ability to do something like 'stroke' or something to really make the letters stand out, this would be perfect!

Now if I can just get that darned side-battler to work without suffering a brain fart from trying to figure out what tags make the characters animate and such...

_________________
http://www.lethalvisions.com/lethalsiggy.jpg[/IMG]
Actual pic from my title screen, complete with lightning in the clouds, a six-choice menu system... and panorama/fog/weather effect on screen! I LOVE RMXP!


Top Top
 Profile  
 

Harrybo21
  Sun May 25, 2008 4:31 pm
Member
This is a great script. But is there anyway to make the spaces smaller than the characters? I hve tried but i cant find a way

Venetia: Please do not necropost. If you have a question about an old script, ask a fully detailed question in RGSS Support.


Last edited by Venetia on Mon May 26, 2008 6:16 am, edited 1 time in total.

Top Top
 Profile  
 

$t3v0
  Mon May 26, 2008 2:44 am
Britfafafafa
User avatar
Awesome Bro

Location: Liverpool, England
Quote:
November 12, 2007, 02:30:00 pm


:o


Top Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 23 posts ] 


Who is online

Users browsing this forum: No users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Hosted By: