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.

AppGameKit/AppGameKit Studio Showcase / Bitmap Font Creator (template and script for Photoshop)

Author
Message
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 27th Apr 2020 20:16 Edited at: 3rd May 2020 16:07
Having seen Cliff Mellangard 3DEGS post where he gives away a free bitmap font I decided to link to my system for font creation which I was certain I had previously posted ... it turns out I haven't! So, here it is instead.

As it says in the title you will need Photoshop to use it.
But if you've got it, then it's really simple.
1) Open the PSD
2) Change the font and layer style to suit your needs
3) Save as PNG
4) Run the attached script to create a Bitmap Font suitable subimages text file

[NOTE]I should have mentioned this in the video and demonstrated it but here it is: You may want to turn on a grid with a size of 102. That is for the fixed height of the characters and no characters should extend above or below the lines. If they do you will need to change the size of ALL characters equally. If you move a single sprite then it will look odd in the end results. You can, however, move any character horizontally without there being any adverse affects.

Example code:

Example Output:


Attachments

Login to view attachments
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Loktofeit
AGK Developer
15
Years of Service
User Offline
Joined: 21st Jan 2009
Location: Sarasota, FL
Posted: 27th Apr 2020 21:10
Nice!
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 27th Apr 2020 21:28
i have wanted to do something similar but have zero scripting experience.

meanwhile, my ancient version of photoshop (which i've been running in compatibility mode for the last bunch of years) surprisingly "succeeded" in generating the subimage file with the script provided (after a few tense minutes):



alas, i have no idea where it might have saved it (while i pointed it to the same folder as the .png )... search (for *.subimages.txt) has yet to locate its whereabouts.
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 27th Apr 2020 21:58
It claims to have been successful but it clearly wasn't
It should have exported 94 layers not just one. I presume that's due to your copy of PS being ancient. I've only been able to test it CS2020
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 27th Apr 2020 22:19
Quote: "It should have exported 94 layers not just one"

ah. meanwhile, i just got a seemingly random "export aborted" pop-up. i think it's still trying to work. heh. (i'll hunt for and kill it before it kills my system)

meanwhile, perusing your script, is the tilde (~) supposed to be there on windows export? everything after that in the file/location is correct in the screenshot but i saw the ~ used in re: mac in the script?

(this is me trying to (still) get my money's worth)

regardless, thanks for sharing! those who've kept up with the times will certainly find it useful.
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 28th Apr 2020 06:59
No, you definitely don't want a tilde in a Windows filepath. That is jus tin the comment to tell you where to place the script so that Photoshop will recognise it and place it in the scripts menu.
You don't have to put it there though, you can call File->Scripts->Browse instead and load the script from anywhere.
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 28th Apr 2020 07:16 Edited at: 28th Apr 2020 07:17
Hi, Scraggle! I also did a similar script.



I plan to remake it in a more convenient form.
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 29th Apr 2020 08:50
I've added a "How to" video to the top post because I had a couple of PM's asking me how to use it.

Login to post a reply

Server time is: 2024-11-21 13:09:53
Your offset time is: 2024-11-21 13:09:53