Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
x and y values in sprites
#1
how can I measure the sprites x,y, w and h values in a easy way than to count each pixel?
Reply
Thanks given by:
#2
I know that you can measure w and h in paint. Go to the image -> choose Image -> go to Attributes and you have the w(Width) and h(Height) but x and y don't really know.
[Image: double-jump-YinYin-base-1.gif]
This is an inspiration from:
-YinYin's Character Development guide, to be more specific i took one of those bases.
-Urban Rivals' clan Skeelz, I took their uniform
I hope it's good. ^^
____________________________________________
TLOK | My sprites | Anime sprite contest | DeviantART |
Reply
Thanks given by:
#3
MS Paint features the pixel-count at the bottom of the window. In Win 7, it's in the bottom left.

You can thus easily measure the coordinates. If it's for finding suitable wpoints, for example, you'll have to add offsets.

Example: Spritesheet, each sprite is, according to the data, 79px wide and 79px tall. Add 1px to each for the line-separation (you see these green lines in template's spritesheets, they're not displayed in-game). Makes 80px each and is this fairly easy to calculate.
Let's say, you want to place a weapon at the coordinates (341,127) in bandit_0.bmp. Count the number of rows and columns (not to mix with the row/col-attributes in the dat-files, I don't know why those are the other way round). At this coordinate, we are in the second row and this is the fifth image. So, you'll have to subtract the sprite-sizes that are before. Makes for x: 341 - (5*80) = 21 and for y: 127 - (1*80) = 47. So, these are your coordinates.

Hope that makes things a bit clearer ;)
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by:
#4
(02-02-2012, 11:12 AM)Blue Phoenix Wrote:  MS Paint features the pixel-count at the bottom of the window. In Win 7, it's in the bottom left.

You can thus easily measure the coordinates. If it's for finding suitable wpoints, for example, you'll have to add offsets.

Example: Spritesheet, each sprite is, according to the data, 79px wide and 79px tall. Add 1px to each for the line-separation (you see these green lines in template's spritesheets, they're not displayed in-game). Makes 80px each and is this fairly easy to calculate.
okay i got this part :)
(02-02-2012, 11:12 AM)Blue Phoenix Wrote:  Let's say, you want to place a weapon at the coordinates (341,127) in bandit_0.bmp. Count the number of rows and columns (not to mix with the row/col-attributes in the dat-files, I don't know why those are the other way round). At this coordinate, we are in the second row and this is the fifth image. So, you'll have to subtract the sprite-sizes that are before. Makes for x: 341 - (5*80) = 21 and for y: 127 - (1*80) = 47. So, these are your coordinates.

Hope that makes things a bit clearer ;)
okay i got this part's last part but i dont know what u mean by at cordinates (341, 127) i mean where are they measured from? :O?


And can someone tell me how to code "what will happen when 2 specific balls hit each other"
Reply
Thanks given by:
#5
(02-02-2012, 11:21 AM)rhino.freak Wrote:  okay i got this part's last part but i dont know what u mean by at cordinates (341, 127) i mean where are they measured from? :O?

(0,0) is the top left corner. The y-axis faces downwards, the x-axis to the left.
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by:
#6
(02-02-2012, 11:55 AM)Blue Phoenix Wrote:  
(02-02-2012, 11:21 AM)rhino.freak Wrote:  okay i got this part's last part but i dont know what u mean by at cordinates (341, 127) i mean where are they measured from? :O?

(0,0) is the top left corner. The y-axis faces downwards, the x-axis to the left.

but where does it start from in the game? the background corner or what?
Reply
Thanks given by:
#7
It starts from the actual pic (the pic when is the character in that moment).Watch this tutorial for more:[Image: XYWH.jpg]


Quote:And can someone tell me how to code "what will happen when 2 specific balls hit each other"
The both go to their hit frames (if they are both state:3000 balls).
Reply
Thanks given by:
#8
okay i got it.. and about that hitting 2 balls i mean can we code or decide in a way that what will happen when ball A touches ball B and a special effect is formed, that dont works when ball A touches ball C..
Reply
Thanks given by:
#9
If balls came from the same team,then HEX editing is needed to release this (if you don't want to have a buggy view).
While if balls are from different teams,then it should not be that hard to code it.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)