Mirage Source
x and y offsets - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: x and y offsets (/showthread.php?tid=882)



x and y offsets - Stomach Pulser - 17-04-2007

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:


- Da Undead - 18-04-2007

Give an example, where you find these at?


- Rezeyu - 18-04-2007

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.


- Misunderstood - 18-04-2007

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.


- Stomach Pulser - 18-04-2007

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?


- William - 18-04-2007

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.