17-04-2007, 11:56 PM
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?
hock:

x and y offsets
|
17-04-2007, 11:56 PM
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?
![]()
18-04-2007, 12:52 AM
Give an example, where you find these at?
18-04-2007, 01:15 AM
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.
18-04-2007, 01:43 AM
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.
18-04-2007, 01:52 AM
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?
18-04-2007, 12:50 PM
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. |
« Next Oldest | Next Newest »
|