View unanswered posts | View active topics It is currently Wed Jan 15, 2025 12:11 am



Reply to topic  [ 29 posts ]  Go to page 1, 2  Next
 Sprite Offsets 
Author Message
User avatar

Joined: Mon Dec 25, 2006 5:11 am
Posts: 103
Location: CA
Reply with quote
Post 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
Profile WWW
DRL Developer
DRL Developer
User avatar

Joined: Tue Jul 27, 2004 8:02 pm
Posts: 428
Location: AZ
Reply with quote
Post 
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
Profile ICQ
User avatar

Joined: Mon Dec 25, 2006 5:11 am
Posts: 103
Location: CA
Reply with quote
Post 
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
Profile WWW
User avatar

Joined: Fri Dec 08, 2006 11:48 pm
Posts: 67
Location: Canada, eh?
Reply with quote
Post 
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
Profile
DRL Developer
DRL Developer
User avatar

Joined: Tue Jul 27, 2004 8:02 pm
Posts: 428
Location: AZ
Reply with quote
Post 
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
Profile ICQ
User avatar

Joined: Sat Dec 09, 2006 4:00 pm
Posts: 137
Location: UnitedStates Cheez-its: 999K+
Reply with quote
Post 
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
Profile
User avatar

Joined: Mon Dec 25, 2006 5:11 am
Posts: 103
Location: CA
Reply with quote
Post 
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
Profile WWW
User avatar

Joined: Tue Dec 12, 2006 1:09 am
Posts: 698
Location: Plymouth, NC
Reply with quote
Post 
uh..yeah, whats the difference between spriteoffset and parentoffset?


Wed Jan 03, 2007 7:06 am
Profile

Joined: Mon Dec 04, 2006 3:34 am
Posts: 2378
Reply with quote
Post 
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
Profile
User avatar

Joined: Sat Dec 02, 2006 11:51 pm
Posts: 204
Reply with quote
Post 
anyone care to explain joint offset a little better.
Cause im getting some weird stuff.


Sun Feb 18, 2007 6:15 am
Profile WWW
User avatar

Joined: Mon Dec 25, 2006 5:11 am
Posts: 103
Location: CA
Reply with quote
Post 
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
Profile WWW
User avatar

Joined: Wed Jan 10, 2007 11:29 am
Posts: 93
Location: Croatia
Reply with quote
Post 
Where's the STICKMAN??? :cool: :nes:


Sun Feb 18, 2007 4:09 pm
Profile ICQ YIM WWW
User avatar

Joined: Sat Dec 02, 2006 11:51 pm
Posts: 204
Reply with quote
Post 
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
Profile WWW
User avatar

Joined: Sun Dec 03, 2006 4:00 am
Posts: 578
Location: America
Reply with quote
Post 
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
Profile WWW

Joined: Sat Jan 13, 2007 11:04 pm
Posts: 2932
Reply with quote
Post 
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
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 29 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.055s | 14 Queries | GZIP : Off ]