Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] Better Bitmap fonts and text effects

Author
Message
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 10th Jan 2009 10:55
I ripped the attached from one of my projects, and i think you will find it useful.

Bitmap font usage is better with trimmed images. And i put some extra text effects as well.

There is always one more imbecile than you counted on.

Attachments

Login to view attachments
DsarchyUK
16
Years of Service
User Offline
Joined: 21st Nov 2008
Location: UK
Posted: 10th Jan 2009 13:37
Ow excellent I was hoping to find something like this, looking through I can understand it all except:



How is this function used, from the looks of it, its used in conjunction with the invisible text but how?

I was considering doing something similar to the fade out effect using memblocks and Alpha, would it make much difference in performance to be using memblocks instead of sprites?

Thanks for the contribution btw.
Regards,

http://dsarchy.deviantart.com/
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 10th Jan 2009 16:50 Edited at: 10th Jan 2009 16:53
That function works together with the other numberWrap function.
basicly, numberwrap function wraps a number between the given ranges, 0 to 360 in this case.
and numberpingpong function wraps another variable between the given 2 ranges but this time back and forth.

it is simple infact.
Hope it is useful for you.

EDIT: Actually you dont need any complex memblock stuff for text on screen only. Sprites are fast enough and surely faster than built in text commands. You could even use images instead but i like sprites anyways.

Ive got lot more text effects based on this one, i can share if you have some specific needs.

There is always one more imbecile than you counted on.
DsarchyUK
16
Years of Service
User Offline
Joined: 21st Nov 2008
Location: UK
Posted: 10th Jan 2009 18:27
If you could show me a way to delay the text, as in like a typewriter effect. I tried wrapping the FOR statement with



But no luck. I'm guessing I have to change the length of characters that the function generates progressively/game loop.

Thanks for the fast reply and again thank you for your help.

http://dsarchy.deviantart.com/
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 13th Jan 2009 11:01
sorry couldnt answer earlier, i made the effect you want but i didnt have time to post it yet. Ill post it tomorrow.

There is always one more imbecile than you counted on.
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 14th Jan 2009 08:45
Here is your typewriter function to use with the above snippet.



There is always one more imbecile than you counted on.
DsarchyUK
16
Years of Service
User Offline
Joined: 21st Nov 2008
Location: UK
Posted: 14th Jan 2009 16:32
Thank you for taking the time to post that.
I'm on the right track then . Managed to crack it after posting, should of posted but I wasn't sure being your Code snippet and all.

Thanks again.

http://dsarchy.deviantart.com/

Login to post a reply

Server time is: 2024-11-22 07:49:17
Your offset time is: 2024-11-22 07:49:17