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 Classic Chat / Photoshop to AGK converter!

Author
Message
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 16th Jun 2018 13:49
I made a script that converts a Photoshop document to AppGameKit code + graphic. Supports animation too! I think this is convenient since I can do the entire graphic design in Photoshop, then run the script and I have the stuff ready to paste into AppGameKit, without bothering with any middle software.

However ...

I heard that my script doesn't run on Photoshop CC. But I'm using Photoshop CS6, so I can't troubleshoot this.
If anyone runs Photoshop CC, and would take a look at the script, it would be really great!
(Runs fine on CS6, for those who still use that.)

Attachments

Login to view attachments
Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 16th Jun 2018 14:09
I think I have CC ..... Will check when I get home.
Dark Raven
10
Years of Service
User Offline
Joined: 27th Jul 2014
Location: United States
Posted: 17th Jun 2018 09:31 Edited at: 17th Jun 2018 09:33
I have Photoshop cc. It had problems saving the image files until I changed the tinypng option in the script to true. Once that was set it worked without problems. Though just tested with the provided psd, this is a pretty cool tool.
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 17th Jun 2018 13:41
Thanks for testing! I guess you have the tinyPNG plugin, since that worked? But a broken saving should be somewhat easy to fix, I think, since it's just this relatively small bit of code:
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 18th Jun 2018 11:02
I guess I don't understand what exactly this is suppose to do? You make it sound as if AppGameKit has some native format, when in fact all I do to get from PS to AppGameKit is save my work as a png.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 18th Jun 2018 13:13 Edited at: 18th Jun 2018 13:16
Thanks for mentioning this, Phaelax! I'll try and explain it better.

Take a look at the attached image. It shows a .psd file with lots of stuff:
---- 1 backdrop sprite
---- 4 platform sprites
---- 4 star sprites
---- 1 ghost sprite
---- 1 player avatar sprite (animated, 10 frames)

Now, if you want to export this stuff to AppGameKit, you will first need to export 20 individual .png files. Then you need to convert the animation images into a sprite sheet. Then you need to write the code to import the .png as images and put each image into a sprite. Finally, you need that places each sprite in the right x and y position.

My script does that stuff!

Attachments

Login to view attachments
Richard_6
7
Years of Service
User Offline
Joined: 3rd Feb 2017
Location:
Posted: 18th Jun 2018 14:34
This looks interesting. I currently use a script to export the spritesheet animations which saves a lot of time. This is one step further.
Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 21st Jun 2018 17:09
So I could build my levels with Photoshop? And if I would use SmartObjects, I could reference to Sprites?
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 21st Jun 2018 19:21
@Xaby: The script exports each top-level layerset into a sprite. It simply merges the layerset into a normal layer, so you can put whatever inside it, including Smart Objects.
IronManhood
9
Years of Service
User Offline
Joined: 6th Feb 2015
Location: US
Posted: 22nd Jun 2018 00:31
Hmm, could you save the data to some file format? The you could write a plugin to load it with one call.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 22nd Jun 2018 01:46 Edited at: 22nd Jun 2018 01:46
Very handy if you use Photoshop


But I use graphicsgale to import/export and best part its free.
https://graphicsgale.com/us/
fubar

Login to post a reply

Server time is: 2024-11-23 20:42:42
Your offset time is: 2024-11-23 20:42:42