How to create a good mouse cursor

Community Forums/Developer Stations/How to create a good mouse cursor

Boiled Sweets(Posted 2005) [#1]
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?


big10p(Posted 2005) [#2]
- 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

[edit] P.S. I think you got the wrong forum. :)


Boiled Sweets(Posted 2005) [#3]
oops


jfk EO-11110(Posted 2005) [#4]
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.


Boiled Sweets(Posted 2005) [#5]
anyone got any examples :-)

email to me


Grey Alien(Posted 2005) [#6]
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.


Boiled Sweets(Posted 2005) [#7]
Grey, do you have some example code? Maybe you could pop it in the code archives?


Rob Farley(Posted 2005) [#8]
Here's one I made earlier...




Grey Alien(Posted 2006) [#9]
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.

http://www.blitzbasic.com/codearcs/codearcs.php?code=1475

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.