Mouse cursor moves too slow on some game menus
Blitz3D Forums/Blitz3D Beginners Area/Mouse cursor moves too slow on some game menus
| ||
The mouse cursor in my game tends to move very slow over some screens. This only happens when the menus are displayed in the start of the game. During gameplay, the mouse moves at a normal speed over the screen. Anybody had a similar problem? |
| ||
I guess it's to do with your cpu being taken up with doing stuff other than moving the mouse pointer. what's your game actually doing at this point? Loading in media? whats your computer spec? are your menus 2D? ---oh - and is this Fullscreen or windowed and do you have debug enabled? |
| ||
My PC specs: Win 2000 64MB Nvidia GeForce2 MX/MX 400 800 Mhz 256 Ram DirectX 8 I have not loaded any 3d graphics yet. Only about 8 images of 800x600 in size. At that stage, my game is displaying one 2D image, which is the menu screen (Fullscreen), at a time. This only happens on some menu screens. I'll have a look. Maybe some processes are runnning in the background. |
| ||
Maybe your doing intensive graphics stuff, or your drawing alot of graphics to the screen at the menu part. If you want to send me your code, i'd be happy to take a look see :) |
| ||
The mouse have it's own IRQ, nothing should slow it down. It's a strange problem indeed. |
| ||
In fullscreen mode you obviously have to draw the mouse cursor yourself so it will only get updated according to the current FPS. I sounds like your FPS is chugging on the menu screens for some reason - can't tell without seeing code. |
| ||
I had a similar problem that never went away unless I restarted the game. Then there was a 50/50 chance of it working. It turned out to be a dodgy/broken graphics card. I get slowdown on all games but only sometimes..it's wierd but it's another posibility. If you dont get the problem on other games then I guess its your code like these guys say. You don't have your loadimage commands stuck in the while loop do you? |
| ||
Hi Just got back from vacation.. I had another look at my code and came across the following: The mouse only slows down when I draw Text to the screen. When I remove the Text part, then the mouse moves at a normal speed. Anybody know why the mouse moves slower when I render Text? Here's my code: function Demo_Menu() show_controls%=1 cnt_tex1$="Click on the Rod button on the Player's menu." cnt_tex2$="This action takes out\put away the rod." cnt_tex3$="Left click anywhere to start a cast." cnt_tex4$="Right click to release the line." While show_controls=1 Cls SetFont fntGeorgia5 Color 252,255,255 DrawImage menu_demo_controls,0,0 mx%=MouseX() my%=MouseY() If MouseHit(1) Then If mx >= 12 And mx <= 136 And my >= 520 And my <= 579 Then show_controls=0 EndIf EndIf ;Draw Text Text 53,191,cnt_tex1 Text 53,210,cnt_tex2 Text 53,230,cnt_tex3 Text 53,250,cnt_tex4 DrawImage cursor,mx,my Flip Wend end function |
| ||
The text command is very slow and should only be used for development/debugging purposes. For fast in game text use something like FonText... http://www.playerfactory.co.uk/fontext/ |
| ||
AFAIK, the Text command only causes problems (slowdown) if you're using old GFX drivers. Update them. I've never experienced significant slowdown using Text on either of my machines. However, using bitmapped fonts is generally preferable - especially if you plan on distributing your game and, so, can't be sure if the user has updated drivers. BTW 3DFish, move the 'SetFont fntGeorgia5' command to outside the main loop. :) |
| ||
Thanks for the replies shambler and big10p. I'll have a look at fonttext. I'll also update my gfx drivers and see what happens. Cheers |
| ||
He this say maybe enough. Blitz3D is designed to be a fast 3D game program. So text is not a part of the fast graphics part. Therefor Blitz3D send the text command troughout windows. and the graphics part directly to the graphics card. This means that text has a long way to go to the screen. This delay you program a bit. Just so you FPS is going under the 60. Below that your mouse wil go slower. |
| ||
This delay you program a bit. Yeah, by about two years. Why have you dug up an ancient thread?3DFish will have either solved the problem, upgraded his PC, or got bored of trying by now. |