Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (498)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  [LWJGL] Spritomatic - sprite creation tool (for programmers)  (Read 2311 times)
0 Members and 1 Guest are viewing this topic.
Offline Apex5

Junior Member


Medals: 1
Projects: 1



« Posted 2013-04-05 19:03:54 »

With a twist!
The initial idea
So I basically have been using some of the standard sprite creation tools out there, and one of the things that annoyed me was their limited capacity for easing actual development, the most common use being the ability to create sprite sheets that could then be interpreted by code.
What annoyed me was the fact that I'd have to go from creating animations in a sprite editor, to exporting a sprite sheet png, to writing code to find it as a resource and then to putting things in, usually via a constructor, to let my program know the width/height of a specific animation, no of frames, duration etc.
I got to thinking that it would be great to be able to write all the animations inside the editor, and then merely click an export button and be rendering the sprite within 2 lines of code.
In essence, that's what I've achieved so far:
<a href="http://www.youtube.com/v/E5o3AOTlIzA?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/E5o3AOTlIzA?version=3&amp;hl=en_US&amp;start=</a>
Technical aspect
Essentially all the animation/sprite data is serialized from the editor and put into the res folder; then a xml file with all the resource links in is generated; then a resource manager class + several others are unpacked from a internal zip into a package in the src folder and when the program is run the resource manager reads the xml and then the serialized data and generates some sprite objects that can be gotten through their names in the editor.
It simplifies rendering of an animation to Sprite.Render(x,y,width,height), and changing animation to Sprite.setAnimation("anim name in editor"). I still need to put in some controls for pausing/setting frames etc. Render also acts like a game tick to handle animation timing, so might make them seperate for more control.
Done so far
  • Exporting an animation as GIF
  • Exporting a sprite sheet as png
  • Exporting to a lwjgl project, sprite useable in 1-2 lines of code
  • Basic sprite editor with saving/loading, color chooser, project management etc etc
Still to do
  • Stop drawing to canvas when clicking on dropdowns that drop down over it XD (facepalm worthy bug)
  • Zooming is a little annoying on large images as centered to top left
  • interface changes
  • Property menus
  • Bug testing
  • Write custom color chooser as I feel using JColorChooser is not the way to go
  • evaluate export destinations
  • Many other things I am sure ^^
Hopefully will have a release out soon, once I feel it is user friendly, and then will be able to release source code if I manage to tidy it up alot C: Just feeling out to see if it would be helpful to anyone else now that the general idea is implemented.
Offline davedes
« Reply #1 - Posted 2013-04-05 19:35:25 »

You might want to change the name... Smiley

Spriter

Offline Apex5

Junior Member


Medals: 1
Projects: 1



« Reply #2 - Posted 2013-04-05 20:17:54 »

Hehe, yeah I saw that Sad
Thought it might be good as non commercial until I can find a better name; better to be safe I guess, will change the title to something just as ingenious Wink
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Nate

JGO Kernel


Medals: 128
Projects: 3
Exp: 14 years


Esoteric Software


« Reply #3 - Posted 2013-04-06 14:35:18 »

Don't worry, no one uses Spriter anyway. Pointing  BAZINGA!  Grin

Offline Sammidysam
« Reply #4 - Posted 2013-04-06 15:26:45 »

It looks very interesting and helpful.  I'll probably test it out when a release comes out.  One thing I am not a huge fan of, however, is that it exports code into the project.  It allows for customization, but I feel like much of it seems to be able to be stored within the library (if there is a library).  It's not a huge problem as many may like it, but I'm not a big fan of it.  I would be able to work with it but I'd just prefer if more data is stored within the library.  Also, in an unrelated note, I feel like the folder "res" in your project shouldn't be a source folder.  I'll be sure to try this out when a release comes out Cheesy
Offline Apex5

Junior Member


Medals: 1
Projects: 1



« Reply #5 - Posted 2013-04-06 19:28:13 »

Hehe C:
Thanks, would be super awesome! Can cut it down to 2 classes if need be, but expanded one to 3 so less memory would be used at runtime. I saw matheus23's xml loader that stored alot of the animation data in the xml file, which could be handy in just reducing it down to a resource loader class :3 Will have to think about it. It's not meant to be, just left over from when I was trying to fix an inputstream problem and ended up following a instruction that didn't work Tongue
Cheers!
Offline matheus23

JGO Wizard


Medals: 97
Projects: 3


You think about my Avatar right now!


« Reply #6 - Posted 2013-04-06 19:31:23 »

Hehe C:
Thanks, would be super awesome! Can cut it down to 2 classes if need be, but expanded one to 3 so less memory would be used at runtime. I saw matheus23's xml loader that stored alot of the animation data in the xml file, which could be handy in just reducing it down to a resource loader class :3 Will have to think about it. It's not meant to be, just left over from when I was trying to fix an inputstream problem and ended up following a instruction that didn't work Tongue
Cheers!
Shocked

No, less classes != better. Also, memory won't be touch that much, since you need to store the same information anyways, only in 2 classes instead of 1 (<- example).

Just so you know, my ResourceLoader is implemented with 19 classes in total, not counting the backend (3 classes) and the utility classes (7 classes).

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline Jimmt
« League of Dukes »

JGO Kernel


Medals: 114
Projects: 4
Exp: 3 years



« Reply #7 - Posted 2013-04-07 05:52:49 »

Looking pretty good, waiting for that release Wink
Offline vbrain
« Reply #8 - Posted 2013-04-09 04:00:43 »

Don't worry, no one uses Spriter anyway. Pointing  BAZINGA!  Grin

I use Spriter.
BAZINGA!
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (16 views)
2014-04-15 18:08:23

BurntPizza (14 views)
2014-04-15 03:46:01

UprightPath (27 views)
2014-04-14 17:39:50

UprightPath (12 views)
2014-04-14 17:35:47

Porlus (29 views)
2014-04-14 15:48:38

tom_mai78101 (51 views)
2014-04-10 04:04:31

BurntPizza (110 views)
2014-04-08 23:06:04

tom_mai78101 (211 views)
2014-04-05 13:34:39

trollwarrior1 (180 views)
2014-04-04 12:06:45

CJLetsGame (185 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!