View Full Version : Custom Cursor Option?
Chris Evans
12-14-2004, 11:53 AM
Minor question:
I've noticed some games have the option to enable/disable the custom cursor.
I'm just curious what exactly is the purpose of the option?
Is it to satisfy people who dislike the custom cursor? Or is there some technical reason for disabling the cursor?
James C. Smith
12-14-2004, 04:41 PM
I believe it is because some video drivers don’t properly handle multi-colored cursors. I always avoided the whole issue by hiding Windows’ cursor and rendering my own cursor using my game's graphics engine rather than using the video drivers/hardware overlay effect.
svero
12-14-2004, 06:38 PM
We do the same thing James does. Our cursor is an in game sprite.
Chris Evans
12-14-2004, 06:48 PM
Cool, that's what I was planning to do (hide mouse, use game sprite). I was just wondering if there were any issues with it that I didn't know about.
Now that I look back on those games with custom cursor options, they do seem to use the windows multi-color cursor and not a game sprite.
Thanks! :)
Kai Backman
12-15-2004, 03:06 AM
I have one strong argument against using an in game sprite, but it is only valid for a subset of games where rendering speed may become low or vary a lot. The standard Windows cursor is responsive at all times, and let's you drop the framerate lower compared to if you used a sprite to render the cursor. Our games (simulation/strategy, wildly varying frame rates) require this to keep up the rapport with the player. The perception of response can be hugely increased just by a responsive cursor.
Tubular
12-15-2004, 07:07 AM
The standard Windows cursor is responsive at all times, and let's you drop the framerate lower compared to if you used a sprite to render the cursor.
This is the real reason. The cause of this is the fact that the Windows cursor runs at a hardware level. You'll notice that when Windows freezes solid, the mouse still moves, because the computer BIOS actually keeps track of the mouse movements for you. If you draw your own, in-game sprite, you're forced to respond to windows mouse messages and redraw the screen, running extra code and slowing things down slightly. And of course, if your game runs at a slow framerate, then the mouse will also move at a slow framerate along with it. That's why most games make the hardware cursor an option.
James C. Smith
12-15-2004, 09:03 PM
It doesn’t do much good to have a mouse cursor that looks responsive (moves when the window is frozen) but can’t do anything (clicks are ignored or responded to after a long delay). Also, as far as I know, the hardware cursor can’t have per pixel alpha blending but I could easily be wrong about that one. And finally, you can’t have more than one hardware cursor. This last point is not a problem for most games but my new games all support a single computer multi-player mode with multiple mice and multiple cursors so this requires that I draw them myself.
mkovacic
12-16-2004, 03:02 AM
It doesn’t do much good to have a mouse cursor that looks responsive (moves when the window is frozen) but can’t do anything (clicks are ignored or responded to after a long delay).
You're missing the point - it's not about the mouse responding when the game freezes, it's just that some games are perfectly playable at 10fps (on a low spec machine), but having the mouse updated at 10Hz is just awful.
Kai Backman
12-16-2004, 09:20 AM
I agree with Marin here James .. :)
You have to see the problem as psychological instead of technical. I have playtested this with several subjects and the results are the same. At the same 10fps the responsive cursor makes the player feel the game is ok where a 10fps cursor makes them feel the game is very slow. IMHO, it might have something to do with the fact that the player can identify with a fast cursor, but not with a slow .. :)
I went with drawing my own cursor because Windows' cursor blinked when the display was redrawn. (looks like it isn't hardware at all here... Win98, Radeon)
Edit: I now have a Radeon but I think the problem occured on the PC's integrated Savage card... I don't think I have tested using Windows' cursor in my game with the Radeon, in fact.
Tubular
12-18-2004, 04:56 AM
Though James has listed a few good reasons to not use the hardware cursor. I've never heard of an alpha-blended hardware cursor either. So it's a choice between more features and more functionality...
I went with drawing my own cursor because Windows' cursor blinked when the display was redrawn. (looks like it isn't hardware at all here... Win98, Radeon)
By "Hardware" they mean the BIOS, and not the video card. (Though the video card probably takes some part in it that I'm not aware of.) Some older 3D accelerated video cards might compete with the 2D portion of the card. Especially the old VooDoo cards, where 2D and 3D were on separate cards. This is the same thing that causes the taskbar to flicker on top of some games sometimes. Maybe an Alt+Tab will help? Or making sure the window is in focus before rendering to it? I've never found a catch-all for this problem, though. It should never happen in a window (as opposed to fullscreen) in any case.
I've edited my previous post, as I remembered the problem occured not on the Radeon but on the ProSavage 4 card.
However, the problem occured with many games, 2D or 3D, and in windowed mode.
vBulletin v3.6.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.