| Mirage Source http://www.miragesource.net/forums/ |
|
| x and y offsets http://www.miragesource.net/forums/viewtopic.php?f=201&t=1684 |
Page 1 of 1 |
| Author: | Stomach Pulser [ Tue Apr 17, 2007 11:56 pm ] |
| Post subject: | x and y offsets |
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? |
|
| Author: | Da Undead [ Wed Apr 18, 2007 12:52 am ] |
| Post subject: | |
Give an example, where you find these at? |
|
| Author: | Rezeyu [ Wed Apr 18, 2007 1:15 am ] |
| Post subject: | |
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. |
|
| Author: | Misunderstood [ Wed Apr 18, 2007 1:43 am ] |
| Post subject: | |
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. |
|
| Author: | Stomach Pulser [ Wed Apr 18, 2007 1:52 am ] |
| Post subject: | |
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? |
|
| Author: | Lea [ Wed Apr 18, 2007 2:37 am ] |
| Post subject: | |
When a character moves, it increases. When the offset reaches 32, the sprite is standing on the next tile. It gives the character the smooth transition. If it wasn't there, the character would just jump from tile to tile. |
|
| Author: | William [ Wed Apr 18, 2007 12:50 pm ] |
| Post subject: | |
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. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|