|
|
speed of mouse movement!
#419911
03/16/13 15:26
03/16/13 15:26
|
Joined: Nov 2007
Posts: 318 Brasil, Paraná
NeoNeper
OP
Senior Member
|
OP
Senior Member
Joined: Nov 2007
Posts: 318
Brasil, Paraná
|
My game is running at 35 frames per second. I use the mouse to drag panels menus, but the speed of mouse is much slower, due to this low frames rate. Has some technique I can use to increase the speed of the mouse, without the need to increase the frames?
PS: I use mouse_map. when I refer to the speed of the mouse I mean the bmap accompanying the mouse. Be the mouse_map or the bmaps that are dragged by it
Last edited by NeoNeper; 03/16/13 15:26.
Please! Use easy words to be translated. because my English is not very good! Grateful. _______________________________________________________
|
|
|
Re: speed of mouse movement!
[Re: NeoNeper]
#419967
03/17/13 21:47
03/17/13 21:47
|
Joined: May 2009
Posts: 5,367 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,367
Caucasus
|
NeoNeper@ how do you move the mouse cursor? like this:
while(1){
vec_set(mouse_pos.x, mouse_cursor.x);
wait(1);
}
Or somehow different? If you move it, in a different way, make sure, that you use "time_step" with it:
camera.pan -= mouse_force.x * time_step;
|
|
|
Re: speed of mouse movement!
[Re: 3run]
#420015
03/18/13 14:54
03/18/13 14:54
|
Joined: Nov 2007
Posts: 318 Brasil, Paraná
NeoNeper
OP
Senior Member
|
OP
Senior Member
Joined: Nov 2007
Posts: 318
Brasil, Paraná
|
I USE
while(1){
vec_set(mouse_pos.x, mouse_cursor.x);
wait(1);
}
would be the correct way? mouse_pos.x = mouse_cursor.x * time_step; mouse_pos.y = mouse_cursor.y * time_step; ?
Last edited by NeoNeper; 03/18/13 14:58.
Please! Use easy words to be translated. because my English is not very good! Grateful. _______________________________________________________
|
|
|
Re: speed of mouse movement!
[Re: NeoNeper]
#420020
03/18/13 15:53
03/18/13 15:53
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
Your code is correct. Don't use the second snippet, i.t. don't multiply with time_step!
You're already using the windows mouse position. If the mouse does not move fast enough for you consider increasing the sensitivity in the control panel.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: speed of mouse movement!
[Re: Uhrwerk]
#420021
03/18/13 16:39
03/18/13 16:39
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
...and just a little tip: set mouse_mode = 4; once and mouse_pos gets updated automatically.
POTATO-MAN saves the day! - Random
|
|
|
Re: speed of mouse movement!
[Re: Kartoffel]
#420076
03/19/13 13:05
03/19/13 13:05
|
Joined: Nov 2007
Posts: 318 Brasil, Paraná
NeoNeper
OP
Senior Member
|
OP
Senior Member
Joined: Nov 2007
Posts: 318
Brasil, Paraná
|
yes currently use mouse_mode = 4 and vec_set(mouse_pos.x, mouse_cursor.x);. But as I reported earlier the speed of the mouse map is related to fps_max.
if I set fps_max = 60; its is good. the map of the mouse or click and drag of the panels are made in the same speed the mouse but if i SET fps_max = 35; Ohhh. the map of the mouse or click and drag of the panels are made in a long delay.
My main question is: how can accelerate the speed of the drag of the bmaps that follow the mouse, including the mouse map.without the need to use fps_max
Please! Use easy words to be translated. because my English is not very good! Grateful. _______________________________________________________
|
|
|
Re: speed of mouse movement!
[Re: 3run]
#420093
03/19/13 16:22
03/19/13 16:22
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
you can use mouse_sync = 1;
...but it looks like it only applies for the mouse cursor image, not mouse_pos - which makes it somehow useless.
POTATO-MAN saves the day! - Random
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|