The Daily Click ::. Forums ::. Klik Coding Help ::. Is it possible to keep frame size after creating rotated animation in MMF2?
 

Post Reply  Post Oekaki 
 

Posted By Message

Jatzek(DreamEvil Corp)



Registered
  21/06/2003
Points
  949

VIP Member
15th July, 2010 at 17:36:02 -

I am making a top down shooter. When I import my animation my frame size is 50x50, most of the space is transparent space, and my character is in the middle. When I use "Create rotated directions" it always crops the transparent space from my frame size, and this gives me a hard time with adjusting the hot spot for the character.

Is there any way to keep the frame size, or any easy way to adjust the hot spot?

 
"Some nightmares never go away"

I'm waiting for you in SILENT HILL!

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
15th July, 2010 at 18:28:01 -

For one, there are little quick move buttons on the left. I'm not sure how many people miss them, but they're very useful since they automatically place the spot that the button represents. Either: top, left, bottom, right, or corners will automatically place the hot spot or action spot in that location on the frame.

In addition to that, I don't think many people are aware that you can hold down CTRL while placing the hot spot/action spot, and it will place it on those same coordinates across all the frames in the animation. This also works in conjunction with the quick move buttons on the left side. So holding CTRL and clicking the Center button will place the hot spot in the center of each frame in the animation.

Hope this helps.

 
http://www.facebook.com/truediamondgame

Jatzek(DreamEvil Corp)



Registered
  21/06/2003
Points
  949

VIP Member
16th July, 2010 at 00:53:01 -

Already tried those out, the problem remains the same:|

It's because if I start with a 50x50 frame size, facing the UP direction, the middle there is 25x25. When I use the "Create Rotated Direction", the frame size for the UP-RIGHT direction will be something like 27x19. The middle position of that is 13x9, and this way the animation will be glitchy:|

 
"Some nightmares never go away"

I'm waiting for you in SILENT HILL!

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
16th July, 2010 at 00:55:17 -

When you create rotated directions, the hot spot changes too. Is it not rotating it exactly enough or something?

 

  		
  		

Jatzek(DreamEvil Corp)



Registered
  21/06/2003
Points
  949

VIP Member
16th July, 2010 at 00:57:28 -

Yes, I noticed that too, but because of the different frame size, the direction changing becomes glitchy. I could put up an example if it would help.

 
"Some nightmares never go away"

I'm waiting for you in SILENT HILL!

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
16th July, 2010 at 01:00:13 -

Have you tried shrinking the image before you create rotated directions?

An example never hurts.

 

  		
  		

Jatzek(DreamEvil Corp)



Registered
  21/06/2003
Points
  949

VIP Member
16th July, 2010 at 01:12:13 -

No success:|

My character is swinging his arms slightly while he is walking, this way when his arms are right next to him, cropping the image makes a smaller frame size, then at any other point when his hand is in a swing.

Sorry for my bad english, hope it's clear what I want to say:|

If not:
By cropping I get at frame like 28x20 but at frame 10 it will be only 24x16.

I am just creating the upload, it will be up in like 5 minutes.

EDIT 1: Hmm, something strange is happening here... I've created a simple program, with only one active object, including the animation, and with no events and nothing set, and the size is almost 5mb... while the full project on which I am working now is only 700kb size, TOGETHER with the animation...

Edited by Jatzek(DreamEvil Corp)

 
"Some nightmares never go away"

I'm waiting for you in SILENT HILL!

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
16th July, 2010 at 01:29:15 -

It's a good idea to pick a certain reference point when deciding where to put a hot spot. Centering it isn't always (or even usually) the best idea. Sometimes it depends on what you're programming. For instance, a platformer character might have a hot spot in the center at the bottom of the sprite. However, for an overhead sprite I would find a noticeable "landmark" on the head to put the hot spot, preferably in the middle of the head since it's rotating. Maybe a certain colored pixel or arrangement of pixels that you can pick out on all the frames.


EDIT: Also, you can always change the frames' X and Y dimensions to be the same, and position the sprite in the right place with the onion skin slider. http://jollycrouton.com/Uploads/images/onion.png

Edited by OMC

 

  		
  		

Jatzek(DreamEvil Corp)



Registered
  21/06/2003
Points
  949

VIP Member
16th July, 2010 at 01:42:56 -

Phew... I managed to shrink the fill size, and found a host to upload the file, cause my damn server is down at the moment.

http://www.2shared.com/file/5O3l5Ru-/problem.html

You can download the example I made from here, bottom right of the screen. Try running the program, and try moving around the bit (don't look at the animation speed, cause I didn't change those).

EDIT: I am trying out this onion skin slider, but I don't really understand how that works...:|

Edited by Jatzek(DreamEvil Corp)

 
"Some nightmares never go away"

I'm waiting for you in SILENT HILL!

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
16th July, 2010 at 02:00:33 -

It looks okay to me, but if you really want it to be smooth, put the hot spot in the middle of the head on all frames.

With the onion skin slider, the more to the left you drag it, the more of the previous frame you see. The more to the right you drag it, the more of the next frame you see.

If the automatically rotated hotspots aren't exact enough, there's nothing really you can do but change each one manually.

Edited by OMC

 

  		
  		

Jatzek(DreamEvil Corp)



Registered
  21/06/2003
Points
  949

VIP Member
16th July, 2010 at 02:14:15 -

Okay then, some hours of hotspot changing awaits me Thanks for the help anyways.

 
"Some nightmares never go away"

I'm waiting for you in SILENT HILL!

MBK



Registered
  07/06/2007
Points
  1578

VIP Member
17th July, 2010 at 11:44:07 -

There's a neat little trick called:

Fill the square with a color that your character is not using.
Only afterwards do you rotate it.
Since it sees there is color there, it won't shrink to fit during rotation.
Then all you'll need to do is make that color transparent with the fill tool in each direction
instead of fiddling with hotspots in each direction forever.

I know it's not the perfect solution, but it will save you some time.


 
Click Me! http://www.create-games.com/project.asp?view=main&id=1444

http://www.mediafire.com/download.php?aoo1dnnlq5i

Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?
   

Post Reply



 



Advertisement

Worth A Click