How to create a good mouse cursorCommunity Forums/Developer Stations/How to create a good mouse cursor
| I have tried to create a simple clean mouse cursor in photoshop, basically an arrow with a RGB 0,0,0 back ground but the edges still show little black dots and it looks HORRID in my app.|
Anyone have any pointers (excuse the pun) on how to make clean edged mouse cursors to use in a game?
| - Open Control Panel|
- Click on 'Mouse'
- Hit the 'Pointers' tab
- Select a pointer you like
- Take a screen grab (press Print Screen key)
- paste into image app
- cut out rect containing Pointer image
- fill background with a non-black colour (e.g. magic pink R:255 G:0 B:255)
- Save image
- Load image into your program
- Set ImageMask my_pointer_image,255,0,255
 P.S. I think you got the wrong forum. :)
| oops |
| In photoshop you need to uncheck the "antialiased" checkbox BEFORE you use the lasso tool (and other selection tools) to get nonsmoothed contours with all following painting operations. |
| anyone got any examples :-)|
email to me
| Well the mouse pointer in Xmas Bonus had an alphamap which I used to blend the edges (and shadow) with the backgroud. This is basically a bitmap with a white central portion and a grey outline. Then when you render the mouse pointer you use Writepixel fast to draw your normal mouse pointer and where the alphamap is white, draw it full strength colour and where it is grey, blend the pointer colour with the background. This gices an antialiased edge no matter what you move over. For me it was the only viable solution, sorry if it's a little complex. |
| Grey, do you have some example code? Maybe you could pop it in the code archives? |
| Here's one I made earlier...|
| sorry I forgot I posted in this thread. I posted this a while back, It's for Blitz PLus so should work for B3D I think ... It should be easier to achieve the same in BMax.|
Since writing this I split the functions up so I can prefill the alphamap and the image arrays. The only array that needs to be reread each frame is the background, so you can blend to it. Obviously you'll gain a speed increase if you do this too.