PNG sprite rotator/scaler util v.1.03

Game Editor comments and discussion.

PNG sprite rotator/scaler util v.1.03

Postby DST » Mon Nov 22, 2010 11:32 pm

Greetings. I have made a Java util that allows you to rotate/scale sprites with full alpha (transparency) support.

I used it to create the bullet demo for Chai. viewtopic.php?f=4&t=9396

This is especially useful for particle fx, objects with trails, etc. etc.

This util formats rotations to fit the GE angle system.

It is a java util and requires java to run. Compatibility has been tested with 64 win7 and 64 ubuntu.

Hope you find this useful!

**Update v1.01: Fixed bug on non-square frame amounts.**
**Update v1.02: Fixed float bug on rotation amounts**
**Update v1.03: Fixed Multiple bugs:
Properly determines absolute filled sheets(no blank spots), and chooses closest combination to square that's possible. This means any frame number works - if you choose a prime number, your sheet will be 1xnumber, a square number will result in a sheet sqrt(number) x sqrt(number).
Zoom properly capped.
You can now drag the image with Right Mouse button.


snapx.jpg

snapx.jpg

DSTSpriteRotatorWindows1.03.zip
(263.71 KiB) Downloaded 276 times
Attachments
DSTSpriteRotatorLinux1.03.zip
(257.49 KiB) Downloaded 141 times
Last edited by DST on Sat Feb 05, 2011 1:12 pm, edited 7 times in total.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: PNG sprite rotator/scaler util v.1.0

Postby Chai » Tue Nov 23, 2010 2:18 am

This is awesomeeeee.
It's so much faster than my way.

Thank you very much for your contribution.
User avatar
Chai
 
Posts: 361
Joined: Sat Apr 30, 2005 2:26 pm
Location: Thailand
Score: 30 Give a positive score

Re: PNG sprite rotator/scaler util v.1.1

Postby schnellboot » Tue Nov 23, 2010 8:00 pm

What do I have to write in nFrames?
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: PNG sprite rotator/scaler util v.1.1

Postby schnellboot » Tue Nov 23, 2010 8:19 pm

2 little things:
1.Could you extend the FileName text field with a "Open .." button?
2.My mousewheel is broken, is there another way to zoom-out?

This tool rocks +1
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: PNG sprite rotator/scaler util v.1.1

Postby BloodRedDragon » Thu Nov 25, 2010 1:07 am

the filename wont work :( do you just put the name in or the full location?

Also, HYPNOTOAD!!!!! :P
Current projects:
Techno-Tank Arena: on hold
Techno-Tank SuperPortal (working title): 0.1%
Bowels of Galaxies: 35% (was a bit too optimistic)
User avatar
BloodRedDragon
 
Posts: 123
Joined: Tue Jan 29, 2008 10:07 pm
Location: The Underworld
Score: 5 Give a positive score

Re: PNG sprite rotator/scaler util v.1.1

Postby DST » Thu Nov 25, 2010 3:24 am

1. the file must be in the same directory with the exe file.
2. Just type the filename without the extension i. e. to load test.png you would just enter test

3. Yes i do plan to add a file dialog. Also, you should get a new mouse.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: PNG sprite rotator/scaler util v.1.1

Postby lcl » Thu Nov 25, 2010 8:41 pm

Wow this seems so cool! :D
Only one bad thing... I think I don't have java 'cause I can't run it. :P
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: PNG sprite rotator/scaler util v.1.1

Postby BloodRedDragon » Fri Nov 26, 2010 2:51 am

lcl wrote:Wow this seems so cool! :D
Only one bad thing... I think I don't have java 'cause I can't run it. :P

(insert slapstick trumpet of pity) :P

Ah, you have to load the file from the same location as the .exe now do you? i could've guessed. Cheers.
Current projects:
Techno-Tank Arena: on hold
Techno-Tank SuperPortal (working title): 0.1%
Bowels of Galaxies: 35% (was a bit too optimistic)
User avatar
BloodRedDragon
 
Posts: 123
Joined: Tue Jan 29, 2008 10:07 pm
Location: The Underworld
Score: 5 Give a positive score

Re: PNG sprite rotator/scaler util v.1.1

Postby jimmynewguy » Fri Nov 26, 2010 5:10 am

maaaaan i really need this and it looks awesome...I have java but when i run it i get an error message: "Could not find the main class: Program will exit!" :(
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score

Re: PNG sprite rotator/scaler util v.1.1

Postby Game A Gogo » Fri Nov 26, 2010 11:33 pm

works like a charm, great program here!
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: PNG sprite rotator/scaler util v.1.1

Postby BloodRedDragon » Tue Dec 07, 2010 1:14 pm

DST, I am going to use this for some animations in my game. Do you want credit and point whenever I produce a Game onto here (or outside of GE possibly) where one of the animations is created using this? :o
Current projects:
Techno-Tank Arena: on hold
Techno-Tank SuperPortal (working title): 0.1%
Bowels of Galaxies: 35% (was a bit too optimistic)
User avatar
BloodRedDragon
 
Posts: 123
Joined: Tue Jan 29, 2008 10:07 pm
Location: The Underworld
Score: 5 Give a positive score

Re: PNG sprite rotator/scaler util v.1.1

Postby DST » Thu Dec 09, 2010 1:20 pm

Glad you found it useful, but no, i don't need any credit for it. It's a simple utility that anyone could have made, really. I have some more i plan to tidy up and post in the future.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: PNG sprite rotator/scaler util v.1.03

Postby DST » Sat Feb 05, 2011 1:13 pm

Updated yet again, fixing most remaining problems. It will now always output completely filled sheets, and you can drag the image to see other areas of it.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: PNG sprite rotator/scaler util v.1.03

Postby schnellboot » Sat Feb 05, 2011 2:29 pm

nice
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: PNG sprite rotator/scaler util v.1.1

Postby speckford123 » Fri Feb 18, 2011 2:55 pm

lcl wrote:Wow this seems so cool! :D
Only one bad thing... I think I don't have java 'cause I can't run it. :P


You can always use what I've been using for the longest time,
Feral's sprite rotator. It's not java so it should work for you. :D
speckford123
 
Posts: 334
Joined: Fri May 05, 2006 6:33 pm
Score: 49 Give a positive score

Next

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest