1 registered members (TipmyPip),
18,633
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Panel.pos_x/pos_y with var precision
#179791
01/24/08 19:59
01/24/08 19:59
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
Well, I move some panels very slowly with an effective speed of <1 pixellength per frame. Though, it seems, all panels are snapped on integers. The panel's motion is stuttering all the time and I can only circumvent it, when I set a low fps_max (=30) and move them with integer values without time correction via time_step to make it move smoothly. Entity panels are no option, since my panels move between other panel-layers, too. Here is some sample code: Code:
PANEL* pan; pan = ...;
pan->pos_y += 0.1 + sin(total_ticks) * 0.1 * time_step; pan->pos_x += sin(total_ticks) * 0.5 * time_step;
Can you please circumwent this by giving panels var precision? Cheers, Christian
Last edited by HeelX; 01/24/08 20:00.
|
|
|
Re: Panel.pos_x/pos_y with var precision
[Re: jcl]
#179793
01/25/08 12:36
01/25/08 12:36
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
Honestly, I do not get what you are driving at. The motion is in my example associated with a sin wave and the time_step value, which is not static if I do not limit the fps_max. Do you mean, that I take the position of my panel and add motion only to a second "position". When the position is 1 pixel or more related to the original panel, I move the panel? Hm, I will check it out. Thanks, that you will check it on your side, too  Cheers Christian
|
|
|
Re: Panel.pos_x/pos_y with var precision
[Re: jcl]
#205056
05/03/08 14:18
05/03/08 14:18
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
No, my suggestion would not work with a sine wave motion, only with a straight motion. I am not sure if DirectX allows to blend 2D objects between pixels at all, without going to 3D. But I've put this on my list of things to check. Did you checked this? If this doesn't work I will work out a custom solution for this.
|
|
|
|