Mouse cursor moves too slow on some game menus

Blitz3D Forums/Blitz3D Beginners Area/Mouse cursor moves too slow on some game menus

3DFish(Posted 2004) [#1]
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?

_PJ_(Posted 2004) [#2]
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?

3DFish(Posted 2004) [#3]
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.

Ross C(Posted 2004) [#4]
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 :)

eBusiness(Posted 2004) [#5]
The mouse have it's own IRQ, nothing should slow it down. It's a strange problem indeed.

big10p(Posted 2004) [#6]
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.

Grimmy(Posted 2004) [#7]
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'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?

3DFish(Posted 2004) [#8]

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()

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

SetFont fntGeorgia5
Color 252,255,255

DrawImage menu_demo_controls,0,0


If MouseHit(1) Then
If mx >= 12 And mx <= 136 And my >= 520 And my <= 579 Then

;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

end function

Shambler(Posted 2004) [#9]
The text command is very slow and should only be used for development/debugging purposes.

For fast in game text use something like FonText...

big10p(Posted 2004) [#10]
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. :)

3DFish(Posted 2004) [#11]
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.


Fernhout(Posted 2007) [#12]
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.

GfK(Posted 2007) [#13]
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.