Numbering sprites (suggestion)

Started by Alynn, Fri 12/12/2003 15:31:53

Previous topic - Next topic

Alynn

This isn't huge, but it would be a nice feature for some people (me included).

Basicly when importing sprites it automaticly numbers the sprites with the lowest number available and then numbers the rest (if you did a multiple import) after that. I like to keep a certain numbering scheme (100-199 is main char sprites, 200-299 is another character, 0-50 are inventory items and 51-99 are their corrisponding cursor icons). But when I import the sprite sheets I would like to specifiy what numbers I want them to be instead of manually having to go in and change each number before I use them. When you are importing a sprite sheet with all character animations and it has 50 sprites on it, it takes quite awhile to renumber all of those, I would rather import the sprite sheet and tell the program start numbering from number 200 and go from there. Of course it would have to check if the number of sprites its importing overwrites any existing sprites in the folder. I leave it up to CJ how he wants to do that.....

Anyway just a suggestion :)

Pumaman

Well, the reason there's no feature like this is because the sprite numbers shouldn't matter. The sprite manager folders are used to group related sprites together, and then you shouldn't need to use the sprite numbers elsewhere, since you select them from within the sprite manager.

I'm not sure what advantage the numbering of the sprites can give you.

Ryukage

Quote from: Pumaman on Sun 14/12/2003 15:06:03
Well, the reason there's no feature like this is because the sprite numbers shouldn't matter. The sprite manager folders are used to group related sprites together, and then you shouldn't need to use the sprite numbers elsewhere, since you select them from within the sprite manager.

I'm not sure what advantage the numbering of the sprites can give you.

But that's not true.  There's a whole slew of text script functions where you have to provide the sprite numbers manually.  And sometimes you want to be able to select that number mathematically based on some other number -- for example: Space Quest 6 style inventory cursors.  SQ6 used neither the sloppy "use inventory graphics as cursor" setup nor a generic one-size-fits-all inventory cursor, it used a special cursor with a miniature picture of the item on it, which gave it a rather slick-looking interface and kept the inventory cursors consistent with the other modes.  To do this in AGS, you'd want to have a mathematical correspondance between the item number and the cursor sprite number, so that you don't have to code a massive if-else tree to get the right cursor.

It could be argued that custom properties can be used to store the cursor sprite number, but the same kind of issue can come up with GUI buttons and many other situations where custom properties aren't available or aren't up to the task.  So there's very good reason to force large sprite sheets to import into a specific range of sprite numbers.

(As you may surmise, I've been wanting this feature myself.)

Gilbert

Quote from: Ryukage on Mon 15/12/2003 21:51:08
But that's not true.  There's a whole slew of text script functions where you have to provide the sprite numbers manually.  And sometimes you want to be able to select that number mathematically based on some other number.

I agree on this part (and that's what I will really do), however, I think most users won't be benefited by this feature, as doing such tricks would be more technical tasks. Moreover if one has enough technical knowledge to do such things, he should be able to plan his game BEFORE importing sprites in random order, ie. he probably can handle it himself and import the sprites in the order he wants.

I think if this feature can be easily implemented, I do love to see it in the near future, but if it's not (which I think it's not as simple as it seems, as you need also to check for used slot numbers, etc. while importing sprites) I'll rather CJ making some other features more worth implementing first.

MrColossal

heh gil, aren't you the one who suggested rawdrawtriangle or something? how often does the normal AGSer use raw draw anything?

i think this is a very important feature that would make a lot of things easier especially organization of sprites.
"This must be a good time to live in, since Eric bothers to stay here at all"-CJ also: ACHTUNG FRANZ!

Gilbert

;D Hehe yeah, I was just asking if it's feasible to add it, I didn't even need it myself. Actually sprite numbering is something I really need, but I think it wouldn't hurt just changing them manually or organize-before-importing (if it's just for the sake of more organized stuffs we can just put them into different folders already), so it's not something that cant be done currently, just possibly more work.

Alynn

Well, like I said its all suggestion, I dont expect anything I ever suggest to make it in, after all in my program for my MUD I got tons of suggestions, I didn't use most of them, but the important ones I did. So I understand things that seem more important. I'm just an organized guy, and my sprites dont always get created in the same order, one day I'll work on icons, the next character sprites, and it just makes no sense to me to have a char ani that is numbered 18, 24, 40, 56 and so on and so forth, I'd rather them be 100, 101, 102, 103 (north) 110, 111, 112, 113 and so on...

And yes I do have multiple folders, I just thought this would be something nice, plus I hate going back to check on a sprite number, with the system I use now I never have to check, I already know exaxtly what sprite I am looking for.

But thats me, maybe I'm just crazy... wait... I AM!!! Horray....

I'm going to go drool in the corner now...

SSH

You could put lots of #defines in your header script to give nice names to your sprite numbers.

You could also maybe use an array to pick up sprite numbers correctly from some index, but I'm not aure what the best way to initialise such an array is...
12

Pumaman

Ok, I can see how this would be useful. It's not particularly hard to add either, so I'll bear it in mind for the next version. Thanks for the suggestion.

SMF spam blocked by CleanTalk