This project is read-only.

Few more requests for SpriteVortex

Dec 4, 2010 at 8:18 PM

Feature proposals for 1.4.

1. Semi-transparent grid as option will be very good. Grid step should be adjustable, e.g. from 8 to xx pixels. Color of grid lines can be changed from options. Ruler will be a good bonus. 

2. Ability to change sprite origin (since 0.8 Vortex will suport origin point for sprites).

3. All of commands from toolbar should be duplicated in main menu strip (with hot key description).

Dec 5, 2010 at 2:17 AM
Edited Dec 5, 2010 at 2:19 AM

1. Do you mean grid on main display ?. I tried to add it before but failed can't remember exactly why, think it was because it wasn't zooming correctly. Can you clarify exactly why do you think grid is useful ? Before i was going to use it for grid cutting . Just one more cutting method together with Alpha Cut.


2. Nice, this will be when 0.8 is released then.


3, Yeah forgot this. I can add this for 1.3


If you have any more feature proposals just say  : )

Dec 6, 2010 at 8:15 PM
Edited Dec 6, 2010 at 9:48 PM

Grid is useful for navigation in spritesheet. I like any kind of grids, so it could be very personal...

Feedback for 1.3:

1. Please, remove exit on escape. It is anoying... I lost my work twice. I don't know any app which exits on esc. Also, exit prompt is very desirable.

2. Please add buttons/shortcuts for Zoom In/Zoom Out (I still can't use zoom on my notebook)

3. Ctrl + S is save shortcut... Why you didn't made Ctrl+O for open spritesheet, Ctrl+S for save. Try to avoid combined shortcuts like Ctrl + Alt + .. until it is really needed.

4. At some point when I was selecting sprite with Ctrl + Mouse Button something breaked and SpriteVortex entered in permanent sprite selection button... Please check state management code for possiblity of it.

5. When I was removing sprites from animation line I got permanent exception box.

6. Options are not saved on exit.

7. Please add SpriteVortex icon to form (currently it is only for entire application).

8. You can round text drawing (vector.Floored) coords to avoid font blurring. Try to resize main SpriteVortex window and you'll see what I mean.

9. Can you make sprite coords in property box editable? It will be usefull for some cases.

Keep going! Waiting for fixes :)

Dec 7, 2010 at 1:37 AM

Thanks for the feedback ! In fact i have great pleasure in solving bugs and fixing things so it's ok :)


1. Ok . I personally love close program with escape but it's personal :)

2. Noted.

3. Man i suck at defining shortcuts.... : ( Can you suggest what shortcuts do you thing is better ?

4. I think i know what this is. You were using sprite markup and it messed up ok. But when you released the control and mouse what happened. Sprite markup needs to be improved anyway.

5. This was ok before but surely something must have broken it . I'll see it.

6. Yeah my bad. Time for a Config.xml

7. Ok

8. Hum i was wondering why it was so blurred... Ok noted.

9. Noted.

I'll fix this and then add grid . Thanks : D

Dec 7, 2010 at 2:59 AM
Edited Dec 7, 2010 at 4:11 AM

Some things:

About blurred text, just tested here and it's perfectly clear. With any size of window ... strange

Think i fixed number 4. If it is what i think it happened when you released control but kept mouse pressed, instead of release mouse and then control. Is this what happened?

About crash when deleting frames i couldn't reproduce this. Must be a special case. If you can reproduce it just say me the steps.

Dec 8, 2010 at 10:17 PM

I meant small artifacts with linear filtering and subpixel coords: Picture

Not exactly. I don't remember when I released control, but when clicked again it was still in selection mode.

I'll try to play with source code in debug mode to find a reason of crush.

BTW, one of Vortex users asked to put animation sample into SpriteVortex release bundle. Also he is interested in making animation for his GIS project using SpriteVortex. I told him that complete integration will be available in 0.8.

Dec 8, 2010 at 11:34 PM

Um, then this is another problem. I'll investigate it further.

Ok. I removed frames in all forms but it didn't crash. Gonna keep trying too.

Yeah i have to redo the animation sample . I think i'll pack the generic things in a DLL and make an example using it.

Dec 8, 2010 at 11:46 PM

Man vector.Floored is awesome ! Text looked bad all along because of it and now it's clear and crisp :D

Do you think i could apply this to the frame rects on the sprite sheet ? I use Rect and it uses float too. Maybe Rect class could be changed to generic in the future like Rect<int> or Rect<float>... XNA uses Rectangle and RectangleF but Rect<> is more elegant....


Dec 12, 2010 at 11:34 AM

I know that Rect<T> looks very interesting, but it is question of peformance and functionality. I guess XNA dev team choosed to have Rectangle/F form because it is most efficient.

BTW, could you implement functionality to adjust sprite origin point point in SpriteVortex. It is very important. I tried to make few animations but some sprites are jumping.

Also I'm going to create special class SpriteBundle which can load sprite animation from SpriteVortex and assemble atlases. It is strongly required for prototyping GUI, CSS.

And last... About relative path in <Texture>. It should be relative to the target directry of exported animation.. Why? Because images and XML definition is part of user's app and should be together.

Dec 12, 2010 at 5:16 PM
Edited Dec 12, 2010 at 5:25 PM

Yeah i realized Rect<T> is not very efficient.

About animation jumping the program handles this since the first version it's the offset... You just drag the sprite to desired position or press directional keys (in animation preview). The sprite origin is set to center for every sprite. So the offset value represents the offsetting from sprite center. Have you missed this or i didn't understand what you mean ?

SpriteBundle would be great. I haven't made a new class to load it because i'm still working on version 1.4 because it will introduce more changes than the previous version... And about that bug when removing frames from animation i still cannot reproduce it ... it works fine here.

Texture path is relative to exported XML path as you requested before . Is it not right ?


Dec 12, 2010 at 6:02 PM

Sorry, my bad. Offset works fine. Just didn't get how to use it. Relative path - the same. Seems today I'm inattentive. :)

About fail, I still going to find it my self. BTW if I select empty or out of texture region sprite message box with exception appears. This is real.

Dec 12, 2010 at 6:23 PM

Do you mean when using sprite markup with ctrl + rmb ? 

Dec 12, 2010 at 6:27 PM

Yep. Using Ctrl + Lmb (it is more comfortable for me).

Dec 12, 2010 at 6:40 PM

Damn why one more bug that happens to you and not to me... Maybe i just fixed it on my working version ? Are you able to compile it ? I'll upload the version i'm working now.

Dec 12, 2010 at 6:57 PM

I've downloaded and tested latest version. Seems both are fixed. Sorry for nerving you :)

New version looks very good! You'll get 5 stars again :)

Dec 12, 2010 at 7:06 PM

Hey you're not nerving me at all :) Don't worry :)

Thanks , i have to finish some things but it's almost done.

Oh, and about SpriteBundle , is it parsing the XML already ? . The XML format is finished so it's all good. 

Dec 12, 2010 at 7:30 PM

Yep, partially. SpriteBundle designed to support two formats. Currently I've implemented format 1 (Atlas, easiest one) : my own. 

The idea of atlas format is very simple: abilty to assemble atlases from separate images. Just imagine. You have 20 different images(not animations) in separate files. Simplest way is enumerate them in XML by name. And my BitmapAtlas assemble them runtime. I guess it is prefered for most of designers.

Second format I didn't complete yet - format of SpriteVortex. It also provides sprite by name mapping. But for this format I need to prepare player - animation class. Each time user want to create new animation instance it calls something like that:

SpriteAnimation anim = bundle.CreateAnimation("spriteVortexAnim");
SpriteAnimation anim = new SpriteAnimation(bundle.Animations["spriteVortexAnim"]);
So, SpriteAnimation will be a stateful playing animation which refers to animation description : sprites, offsets, timespans stored in SpriteAnimationInfo which can be obtained from SpriteBundle

Dec 12, 2010 at 7:35 PM

Great ! 


Dec 14, 2010 at 1:14 AM
Edited Dec 14, 2010 at 1:16 AM

Hey alex i just implemented grid like Paint.Net : You have a toggle grid button and when button is on and camera zoom is greater than a value draw the grid. 

The grid draw is like this:



if (GridEnabled && Camera.Zoom > 4f)
                        Point start = Camera.ScreenToWorld(Vector2.Zero).ToPoint();

                        for (int i = start.X; i < RenderRegion.Width; i++)
                        for (int i = start.Y; i < RenderRegion.Height; i++)

(yeah the code uses old vortex , i'll update when you release 0.8)


This drawing uses the camera transformation so the grid step is defined by the camera zoom. But the draw callings is high.

I tried drawing outside camera transoformation and stepping "i" and "j" depending on camera zoom like i += i*camera.Zoom but failed. I didn't expect it to work anyway


Well i feel this is not the kind of grid you wanted. But even if it's not i could keep it since it's useful in some cases. 

Other type of grid i have in mind would serve only one purpose: Cut sprites from a spritesheet that doesn't have transparent background and it's not supposed to have. It's one case that is likely to happen.


Dec 14, 2010 at 9:37 PM

Yep I wanted navigation grid with big step, but this one is very good for zoom. I like it.

It is hard to reach zoom x4, sometimes zooming freezes (using Ctrl + Left). Until I reset zoom on default. I've put some logging and realized mouse delta is 0 even I moving it hard:). So I changed gain multiplier from 0.01 to 0.5 for myself.

I've fixed grid alignment issue. My bad. Use new updated library.  :)

Found Issues (1):

1. I've got index out of range, you need add bound checking (when zoomed):

        public static Color ClearColor(ref Bitmap image, int x, int y)        {             return ClearColor(ref image, image.GetPixel(x, y));        }

Dec 14, 2010 at 10:52 PM
Edited Dec 15, 2010 at 3:20 AM

I'll plan better how to add this grid type later then.

Hard? Strange here i reach it very easily using ctrl +left. I put zoom multiplier low because before it was zooming too fast :) Just found the freeze will fix it thanks... it appears to be because of GUI since i changed the GUI loop.

About the grid alignment issue do you mean this:  "i += i*camera.Zoom"  ?This is wrong..... I tried it like this "i+= (int)Camera.Zoom", but it didn't work either . I thought like if you have a zoom of 1 step is 1. If the zoom is 2 step is two and so on but it's stepping wrong. Maybe i'll just step by one and draw inside camera transformation ? Don't know.

And thanks about the out of range , missed that :) Edit: Fixed

1.4 sure is going to be big, on code mainly. I grew tired of the fake state handling i was doing on main display and now i'm rewriting it all using a finite state machine ... much better :)