Author |
Message |
piezo
Joined: Mon Dec 25, 2006 5:11 am Posts: 103 Location: CA
|
Sprite Offsets
hell, sprite offsets in general. I tried looking for forum topics but there doesn't seem to be much discussion of the sprite offsets. I, as I'm sure others, are attempting to make larger than 90 pixel actors. The problem I'm running in to is how to change the offsets to accommodate the change in size.
For example, if I'm trying to move the position of the leg, there seems to be an offset for where the leg's bitmap is drawn from, where the leg is drawn from in relation to the body, where the foot is drawn in relation to the foot, on and on. Tons of different offsets. I could slowly figure this out via trail and error, but the devs must have some sort of guideline or roadmap for how the various offsets interact? Some sort of diagram? What are the x, y coords in relation to? the center? the bottom right? the top left? Complicating things is something like the leg bitmaps...their x, y offsets are reversed since the bitmap is horizontal while the bitmap in the game is used vertically.
I feel like i've been placed in and unknown city and I'm trying to make a map of my surroundings using breadcrumbs and string. It's slow work. Anyone got a map already?
|
Sat Dec 30, 2006 1:23 am |
|
|
Data
DRL Developer
Joined: Tue Jul 27, 2004 8:02 pm Posts: 428 Location: AZ
|
The SpriteOffset is FROM where you want the center of the actor's body, TO the top left corner of the sprite. Note that these values will always be negative!
This applies to all sprites, in fact. If you don't set any SpriteOffset, the very middle of the sprite is used as center point. The center is around which the whole thing will rotate, and is thus effectively the center of mass as well.
Then, all other offsets (JoinOffsets, etc) are going to be FROM the actor's center, TO the joints, or whatever you're defining.
|
Sat Dec 30, 2006 6:12 am |
|
|
piezo
Joined: Mon Dec 25, 2006 5:11 am Posts: 103 Location: CA
|
Data wrote: The SpriteOffset is FROM where you want the center of the actor's body, TO the top left corner of the sprite. Note that these values will always be negative!
This applies to all sprites, in fact. If you don't set any SpriteOffset, the very middle of the sprite is used as center point. The center is around which the whole thing will rotate, and is thus effectively the center of mass as well.
Then, all other offsets (JoinOffsets, etc) are going to be FROM the actor's center, TO the joints, or whatever you're defining.
... I love you? Hah thanks, that helps get my bearings. Giant stick figure coming right up.
|
Sat Dec 30, 2006 7:01 am |
|
|
Metroid48
Joined: Fri Dec 08, 2006 11:48 pm Posts: 67 Location: Canada, eh?
|
Why don't you make it FROM the top left corner TO the center point you wish to define? That would probably make it more intuitive and less confusing.
|
Mon Jan 01, 2007 2:26 am |
|
|
Data
DRL Developer
Joined: Tue Jul 27, 2004 8:02 pm Posts: 428 Location: AZ
|
Perhaps... although now the consistent paradigm is that everything is an offset from the center of the guy, including the sprite's upp left corner.
|
Tue Jan 02, 2007 12:26 am |
|
|
ASH33
Joined: Sat Dec 09, 2006 4:00 pm Posts: 137 Location: UnitedStates Cheez-its: 999K+
|
Metroid48 wrote: Why don't you make it FROM the top left corner TO the center point you wish to define? That would probably make it more intuitive and less confusing.
huh?
making it from center to top right makes perfect sense!
it shouldn't be the other way around
*from an internationally accepted standard of mesuring images*
down and right = positive
up and left = negitive
|
Tue Jan 02, 2007 2:27 am |
|
|
piezo
Joined: Mon Dec 25, 2006 5:11 am Posts: 103 Location: CA
|
hmm what is the center of the actor? Is it the body? But where does the body get drawn from? And how is character height related to that?
Could you clarify the following if i'm understanding it right:
I'm defining the leg. So the SpriteOffset for the Addactor = Leg, would define where the top left of the leg sprite would be in relation to the center of the actors body. Would I use this offset to 'attach' the leg? Or am I supposed to use the ParentOffset variable when defining the attachable objects in the Body definition?
|
Tue Jan 02, 2007 5:43 am |
|
|
Control
Joined: Tue Dec 12, 2006 1:09 am Posts: 698 Location: Plymouth, NC
|
uh..yeah, whats the difference between spriteoffset and parentoffset?
|
Wed Jan 03, 2007 7:06 am |
|
|
Alenth Eneil
Joined: Mon Dec 04, 2006 3:34 am Posts: 2378
|
Parent offset means it's attached to something else... I assume the offset works the same, from the center of the parent.
|
Wed Jan 03, 2007 8:25 am |
|
|
FarvanTorna
Joined: Sat Dec 02, 2006 11:51 pm Posts: 204
|
anyone care to explain joint offset a little better.
Cause im getting some weird stuff.
|
Sun Feb 18, 2007 6:15 am |
|
|
piezo
Joined: Mon Dec 25, 2006 5:11 am Posts: 103 Location: CA
|
FarvanTorna wrote: anyone care to explain joint offset a little better. Cause im getting some weird stuff.
The jointoffset is used to define the point around which the sprite will rotate - its usually in relation to another object though i.e. jointoffset for the arm would determine how it would rotate in relation to the body.
|
Sun Feb 18, 2007 11:45 am |
|
|
Nikica
Joined: Wed Jan 10, 2007 11:29 am Posts: 93 Location: Croatia
|
Where's the STICKMAN???
|
Sun Feb 18, 2007 4:09 pm |
|
|
FarvanTorna
Joined: Sat Dec 02, 2006 11:51 pm Posts: 204
|
piezo wrote: FarvanTorna wrote: anyone care to explain joint offset a little better. Cause im getting some weird stuff. The jointoffset is used to define the point around which the sprite will rotate - its usually in relation to another object though i.e. jointoffset for the arm would determine how it would rotate in relation to the body.
Yea I figured out what looked weird.
Just the joints looks weird.
|
Sun Feb 18, 2007 4:35 pm |
|
|
Kokits
Joined: Sun Dec 03, 2006 4:00 am Posts: 578 Location: America
|
Can someone make a diagram of how sprite offsets work?
All this topleft, rotate, middle crap has me confused.
|
Sun Feb 18, 2007 6:55 pm |
|
|
numgun
Joined: Sat Jan 13, 2007 11:04 pm Posts: 2932
|
same here and there are other body part offsets almost in the bottom of the actors .ini file.
what are they?
|
Tue Mar 06, 2007 2:30 pm |
|
|
|