Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: [Completed] Sprite Builder  (Read 3666 times)

0 Members and 1 Guest are viewing this topic.
[Completed] Sprite Builder
« on: October 17, 2010, 09:08:24 am »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Posts: 728
Created in: c#
Requires: PyxTools.dll (Included in download), .net 2.0

Information:
For advanced users, who want to get the most out of their game resources. This tool creates data on combining small sprites into bigger sprites. Which could be useful in keeping game resources low. Instead of having 30+ sprites of a character, you could have 1 small sprite sheet that has all the parts of the sprites, and draw all the pieces together, to make those same 30+ sprites. This could be used for big bosses that can be separated and segmented into smaller pieces. It could have a much lower cost resource wise on different pallets for the same sprite, and not having to manage that resource externally. You get more out of the tool if you have a game engine that can scale, and rotate. (eg. GM Pro)

How To Use:
Have your segmented sprite sheet ready. Click File>New. Choose a name, frame dimensions, and frame amount for your sprite. Click Tools>Add Sprite Sheet. Click the picture button, and select your segmented sprite sheet. Choose the tile size, and click "Ok". (You can add and delete many sprite sheets.) Select a sprite part, (You can add and delete parts) and click the desired tile from the desired sprite sheet. To move the sprite around, you can click and hold on the Sprite Editor and move the part around. Click the arrows for fine tuning the position of the part. You can add and delete frames as needed. After you have the desired results, click Tools>Script Viewer. Click the Create Script button to view the data. (Custom prototypes can be typed in for your own custom data) A typical GM custom prototype would be this: draw_sprite_ext(var_sprite, var_frame, x + var_x, y + var_y, var_scalex, var_scaley, var_angle, image_blend, image_alpha);

Screens: http://beta.zfgc.com/index.php/projects/gallery/index/9
Downloads: http://beta.zfgc.com/index.php/projects/downloads/index/9
« Last Edit: April 22, 2015, 02:18:04 am by 4Sword »
Logged
  • Pyxosoft
Re: Sprite Builder
« Reply #1 on: October 17, 2010, 09:44:54 am »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3725
Sweet. You haven't added a spritesheet as an example to try out the tool. Ah well. I assume you made this with Visual Studio C# 2008 Express. I shall take a look at the source to learn.
Logged
Re: Sprite Builder
« Reply #2 on: October 17, 2010, 09:48:45 am »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Posts: 728
I made it with 2010 actually. Yeah let me add some samples here, didn't think of that.
Logged
  • Pyxosoft
Re: Sprite Builder
« Reply #3 on: October 17, 2010, 11:11:27 am »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3725
I don't know, but it seems that the spritebuilder does not accept sheets whose frame height is smaller than 16. And I guess it is the same with the framewidth. Is this correct or am I doing something wrong.
Logged
Re: Sprite Builder
« Reply #4 on: October 17, 2010, 05:43:42 pm »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Posts: 728
The arms sample sheet I have up is 8 X 160. I know that one works. The frame height numeric up and down will be in the red if it is greater than the actual height of the image. So just put it to 8 and hit enter. The lowest a sprite sheet can be is 8 X 8.
Logged
  • Pyxosoft
Re: Sprite Builder
« Reply #5 on: October 17, 2010, 06:16:46 pm »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3725
Then I am really must be doing something wrong because I cannot. Hitting enter does not work either. See attachement.
Logged
Re: Sprite Builder
« Reply #6 on: October 17, 2010, 06:26:00 pm »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Posts: 728
Ummm Niek my friend, you loaded a thumb, which is probably smaller than 8 X 8 in one of the dimensions. I'm actually surprised it allowed you to load it. That I must test.
« Last Edit: October 17, 2010, 06:29:02 pm by Xfixium »
Logged
  • Pyxosoft
Re: Sprite Builder
« Reply #7 on: October 17, 2010, 06:35:55 pm »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3725
Oh yeah, didn't notice that one yet. I'm so stupid. It was actually 7 high. Thnx
Logged
Re: Sprite Builder
« Reply #8 on: October 17, 2010, 06:45:39 pm »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Posts: 728
np, it's weird it loaded it in the first place. When that is technically not allowed by the supported file types that I defined in the OpenFileDialog's filter property. It's Microsoft's OpenFileDialog object's fault too. It is very interesting. I also noticed it doesn't dispose of the file stream either. So if another app wants to write over an image that was loaded, it won't be able to. Unless Sprite Builder is closed. Thanx for letting me know.

EDIT: Ok I found out a bunch of things. The thumb from here is still a regular .png image, thus why it still loads. Not an error on the OpenFileDialog object. The file stream being made from Bitmap.CreateFromFile is the real culprit. It somehow still has a handle on the image file it loads. Thus preventing any other external program from saving under the same file name. I used another method where I have control of the stream, and still get the image data. Hopefully it doesn't create any new errors. I also added a status strip at the bottom of the tileset form to show the actual dimensions of the image.
« Last Edit: October 17, 2010, 07:45:23 pm by Xfixium »
Logged
  • Pyxosoft
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.207 seconds with 55 queries.