Advertisement

What is offset?

Started by March 11, 2017 06:49 PM
4 comments, last by Josh Green 7 years, 8 months ago

Pretty simple question and I didn't find any place that explains it in the context of game development, wiki explains offset in the context of geometry (parallel curves) and I am pretty sure its not the same offset in game development. I use Unity, and I encounter this term a lot.

Please explain it to me, thank you in advance.

It's the same concept and is applied to various things. Commonly it refers either to a geometric offset or to an offset from a memory address. If you explain where you're seeing it then it can be explained more directly.

void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.
Advertisement
An offset generally just means the same thing it means in math, it is the distance between two things.

When talking about a memory address offset, it is the distance from the starting pointer, with zero meaning it starts at the same place.

When talking about a graphics offset, it is the distance from the original, with zero meaning it is at the same place.

For curves, it might be the distance from the original for control points, or for parametric joints, or other things. But even so, offset still generally means the distance from the original.

It's the same concept and is applied to various things. Commonly it refers either to a geometric offset or to an offset from a memory address. If you explain where you're seeing it then it can be explained more directly.

I currently make 2D mobile games and I see it a lot when I read tutorials, not about memory address but on other stuff, graphics in general.

If it's in the context of graphics then it's a geometric offset of some kind. Probably a texture offset or just a model displacement.

Again, with a specific example you can get a specific explanation.

void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

Below is an example of an offset, it involves two objects, where one is constantly is setting its position to the other objects position + a small amount in a direction (this is the offset)

point A (position) <--------------------------> Camera (position)

The offset

So, if you imagine in a RPG the camera is always a set amount behind you character, this distance would be the offset between the camera and the character.

This is just example; an offset can be used for lots of different things as you have seen in your travels. But it generally means the constant difference between the value of something, to the value of something else.

Hope that helps

Learn to create games through our vibrant platform of easy-to-follow video training material. Getting recognition of the knowledge and skills you gain from the courses is essential. We can provide you with globally recognised City & Guilds accredited certificates.

www.polygoncollege.com

This topic is closed to new replies.

Advertisement