Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
x and y offsets
#1
What are they, I think that they have to do with names being blitted or something like that, but I can't figure it out. Any help? Confusedhock:
Reply
#2
Give an example, where you find these at?
Reply
#3
It's used for alot of things, Names, sprites if ou use 32x64, It's also used to make that 4 pixel raise in the sprite to give it depth.
Reply
#4
the x and y offsets are used to draw a somewhat smooth transition from one tile to another. They increase or decrease depending on the direction to move the sprite slowly or quickly across the screen. When the offsets reach a specific value, the move is considered complete. They are not used for the 4 pixel raise, but that is involved in the blting.
Reply
#5
I'm still a little confused...

So, it is like measuring where the sprite is from the edge of the screen to determine where it is in an animation?
Reply
#6
It's pretty much the same for players as enemies. When the player doesnt move, .XOffset and .YOffset both equals 0. When you first press the arrow button, either the X or Y becomes 32 and decreases towards 0 as the player is being moved.

You dont really know exactly how it works, its just important to know that you need it in order to make the player walk smoothly.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)