English Knife skins bigger than 32x32

4 replies
Goto Page
To the start Previous 1 Next To the start
11.11.14 05:02:38 pm
Up
maharaja
User
Offline Off
Hello

I got a question about knife skin resolution change. I wanted to create some 'high quality' knife skin, but i had to resize the knife.bmp to 64x64, and the question is:
What will be the 'hotspot' ( place where player holds the knife ). (x, y)

In basic 32x32 image its like 12x24, does in 64x64 it gona 'go' to 24x48.

( sorry for bad english... )
IMG:http://www.gry-pegasus.xaa.pl/images/nesplayer.gif
11.11.14 05:05:20 pm
Up
Alistaire
User
Offline Off
(28, 40)
IMG:http://i.imgur.com/5zhwOTP.png
11.11.14 05:11:30 pm
Up
maharaja
User
Offline Off
How can i calculate the (x, y) ( of 'hotspot') if i wanted to do bigger ones is there some kind of 'formula' to do this?

btw Thanks
IMG:http://www.gry-pegasus.xaa.pl/images/nesplayer.gif
11.11.14 05:33:57 pm
Up
Alistaire
User
Offline Off
32x32 -> 64x64 is an increase by 32 in width and height. You only need the increase in width and height to know your new position, which should be half the increase to keep the sprite centered. Half of 32 is 16, so you add 16 to your current x position, and because 64x64 and 32x32 are both squares the increase in height is the same as width, you add 16 to your current y position too.

Code:
1
2
3
4
5
6
--(x, y) is position on canvas size w * h

x' = x + ( w - w' ) / 2
y' = y + ( h - h' ) / 2

--(x', y') is position on canvas size w' * h'
IMG:http://i.imgur.com/5zhwOTP.png
11.11.14 05:46:46 pm
Up
maharaja
User
Offline Off
@user Alistaire: Again thank you
IMG:http://www.gry-pegasus.xaa.pl/images/nesplayer.gif
To the start Previous 1 Next To the start