Mir@k
|
|
« on: February 17, 2010, 11:32:42 AM » |
|
For example: http://www.pixeljoint.com/pixelart/49832.htmI'd like to know how to animate my stuff this way, i know it looks choppy/jaggy, specially on the metal parts, but i still love it, reminds me so much about castlevania..
|
|
|
Logged
|
|
|
|
pgil
Guest
|
|
« Reply #1 on: February 17, 2010, 01:08:05 PM » |
|
I've been interested in doing this myself, but I'm a little intimidated by it. I don't know if there's an easy way, but after a little searching I found [http://gmc.yoyogames.com/index.php?showtopic=462301&hl=skeletal+animation]this[/url], an extension with a few demos.
|
|
|
Logged
|
|
|
|
Ninja Dodo
|
|
« Reply #2 on: February 17, 2010, 01:38:32 PM » |
|
I don't think it makes anything easier. It just makes it more flexible. Like you could do stuff in 2D that you would otherwise only do in 3D, in terms of layering different animations based on context and things like that...
You'd have to carefully line up origin points but otherwise I can't imagine it being very technically complicated. Not sure you'd need skeletal animation. Just locking child objects to their parents should do, unless I'm missing something.
Maybe have a look at how they used to do limited animation in The Flintstones.
|
|
|
Logged
|
|
|
|
nikki
|
|
« Reply #3 on: February 17, 2010, 04:01:42 PM » |
|
i am not well known with game maker, but i know an animation package that deals with this moho anime studio. I've been looking into implementing something like this , basically you want to define parent-children relations between 'bones'. I am looking carefully now and there seems to be alot of pixel-animation of skew/distorting bodyparts. so i am guessing the frames have been done-up very carefully.. I've look even better and noticed the sprite sheets, well it's all rotating, displacing, frameswapping and careful laying of connection points for you ! so to answer your question yes there is a way, and no it'll not be easy, atleast not so easy as making a peanutbutter sandwich
|
|
« Last Edit: February 17, 2010, 04:10:01 PM by nikki »
|
Logged
|
|
|
|
Theotherguy
Level 1
|
|
« Reply #4 on: February 17, 2010, 04:03:12 PM » |
|
that sprite needs anti anti-aliasing sooooo badly. I don't know why pixel artists shy away from this.
|
|
|
Logged
|
|
|
|
nikki
|
|
« Reply #5 on: February 17, 2010, 04:08:22 PM » |
|
that sprite needs anti anti-aliasing sooooo badly. I don't know why pixel artists shy away from this. that might be because of the actual size in pixels of the image, when automagically anti-aliased , a percentually large portion of noise enters teh animation. or it could be some kind of purist thing
|
|
|
Logged
|
|
|
|
moi
|
|
« Reply #6 on: February 17, 2010, 04:16:16 PM » |
|
Yeah they're fucking purists.
One easy way to have this type of anims, would be to use a 3d engine. This way' you'd just build you sprites as 3d models with skelettons, but flat.
[EDIT] Oh wait! Game maker...
|
|
|
Logged
|
subsystems subsystems subsystems
|
|
|
Codestar
Level 1
One man, one game
|
|
« Reply #7 on: February 18, 2010, 09:13:21 AM » |
|
It's funny, it seems like everyone wants to learn how to do that now that they've seen that sprite on pixeljoint...
|
|
|
Logged
|
|
|
|
Sos
|
|
« Reply #8 on: February 18, 2010, 01:12:29 PM » |
|
The sprite reminds me of Gundam battle assault or metal slug.
Doing that will require using a pivot rotate function, if game maker has one.
|
|
|
Logged
|
|
|
|
Mir@k
|
|
« Reply #9 on: February 18, 2010, 11:48:19 PM » |
|
Game maker's rotate function sucks cocksicle. I guess it'd be easier on flash, but having to learn AS2/3 seems like quite a pain.
|
|
|
Logged
|
|
|
|
Sos
|
|
« Reply #10 on: February 19, 2010, 04:18:59 AM » |
|
Game maker's rotate function sucks cocksicle. I guess it'd be easier on flash, but having to learn AS2/3 seems like quite a pain.
Go flashpunk, thissone's easy. Also allegro can be your dearest friend, with easy pivot rotations and it's far simpler than any AS thing. void pivot_sprite(BITMAP *bmp, BITMAP *sprite, int x, int y, int cx, int cy, fixed angle);
aligns the point in the sprite given by (cx, cy) to (x, y) in the bitmap, then rotates around this point.
|
|
|
Logged
|
|
|
|
nikki
|
|
« Reply #11 on: February 19, 2010, 04:29:30 AM » |
|
in blitzmax it's pretty easy too : SetImageHandle(image,x,y) SetRotation(angle)
EDIT : MORE ON TOPIC: GM Manual\GML\Game Graphics\Drawing Sprites and Images :
draw_sprite_ext(sprite,subimg,x,y,xscale,yscale,rot,color,alpha): Draws the sprite scaled with factors xscale and yscale and rotated counterclockwise over rot degrees. color is the blending color (use c_white for no blending) and alpha indicates the transparency factor with which the images is merged with its background. A value of 0 makes the sprite completely transparent. A value of 1 makes it completely solid. This function can create great effect (for example partially transparent explosions).
when your not allowed to set the handle's or pivot point. i'll just assume it's set in the middle, to work around this you could just allign all your images to have their pivot point exactly in the middle.
|
|
« Last Edit: February 19, 2010, 04:37:09 AM by nikki »
|
Logged
|
|
|
|
Shiny
|
|
« Reply #12 on: February 19, 2010, 08:12:08 AM » |
|
You can pivot around an arbitrary axis in Game Maker using some d3d trickery like this: var pivotX; pivotX = sprite_get_width(sprite_index) / 2; var pivotY; pivotY = sprite_get_height(sprite_index) / 2;
d3d_transform_add_translation(-pivotX, -pivotY, 0); d3d_transform_add_rotation_z(image_angle); d3d_transform_add_translation(x, y, 0);
draw_sprite(sprite_index, image_index, 0, 0);
d3d_transform_set_identity(); (Yes, it works in 2D mode.) Or, y'know, just use the sprite_set_offset() function: sprite_set_offset(sprite_index, xOffset, yOffset); ... Pleeease don't barrage me with links to the introductions thread. (Edited: Fixed code error pointed out by Paul Eres.)
|
|
« Last Edit: February 21, 2010, 03:34:42 AM by Shiny »
|
Logged
|
|
|
|
pgil
Guest
|
|
« Reply #13 on: February 19, 2010, 11:27:31 AM » |
|
Yeah, rotation isn't complicated in Game Maker. The thing I don't get is when you have, say, a rotated arm attached to a body that is also rotated. How do you know where to translate the arm so that it's always attached to the same place on the body, however the body is rotated? I know I probably need to use sin and cos functions, but I've forgotten what little trig I did learn in school.
|
|
|
Logged
|
|
|
|
Tycho Brahe
|
|
« Reply #14 on: February 19, 2010, 11:36:26 AM » |
|
you need the angle and the distance from the pivot, then use trig to find the x and y distance to it. Assuming the angle is from the vertical (like a bearing) the x distance is going to be Sin(angle)*distance and the y distance is going to be Cos(angle)*distance.
Disclamer: this is probably wrong...
|
|
|
Logged
|
|
|
|
|
JOBA
Level 1
EZ
|
|
« Reply #16 on: February 19, 2010, 12:27:28 PM » |
|
that sprite needs anti anti-aliasing sooooo badly. I don't know why pixel artists shy away from this.
Because it looks better this way. Plus, gives me a castlevania vibe. From what i've seen so far, it seems like you have to roll out your own animation tool.
|
|
|
Logged
|
|
|
|
Theotherguy
Level 1
|
|
« Reply #17 on: February 19, 2010, 12:34:16 PM » |
|
I'm not sure what you mean by modular animation.
Do you mean that each part should be its own sprite, whose position and orientation are computed in real time?
Or do you simply want the effect of modular animation without it dynamically being computed?
If you just want the effect of modular animation, it should be trivial using any program that supports layering, shearing, and distorting of bitmaps. You then do all of the animation by hand, frame-by-frame with these modular components, and export the rasterized result.
EDIT:
Looking at the sprite sheet, its all done in real time. That's actually quite impressive.
|
|
|
Logged
|
|
|
|
takua108
Level 0
|
|
« Reply #18 on: February 20, 2010, 06:42:03 PM » |
|
If you're talking about Game Maker, lengthdir_x() and lengthdir_y() will come in mighty handy.
|
|
|
Logged
|
|
|
|
ஒழுக்கின்மை (Paul Eres)
|
|
« Reply #19 on: February 20, 2010, 08:48:45 PM » |
|
shouldn't var pivotX; pivotX = sprite_get_width(sprite_index) / 2; var pivotY; pivotY = sprite_get_width(sprite_index) / 2; be var pivotX; pivotX = sprite_get_width(sprite_index) / 2; var pivotY; pivotY = sprite_get_height(sprite_index) / 2; ? oh, and i use a *very* limited type of modular animation for some of the creatures in saturated dreamers. i just hardcode everything though.
|
|
|
Logged
|
|
|
|
|