Topic:   Custom cursors   (Read 15944 times)


0 Members and 1 Guest are viewing this topic.

Zoo


  • GMG Extraordinaire

  • ***


  • Posts: 1686
    • My Bandcamp
Custom cursors
« on: February 13, 2011, 12:08:04 PM »
I read somewhere GM can have custom cursors for games. How does this work? I want to have a gun-scope crosshairs for a game I'm making.
Kirby, your pudgy buddy from dream land, is back again on the game boy®!

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: Custom cursors
« Reply #1 on: February 13, 2011, 11:51:50 PM »
I know there are some default cursors, like direction arrows or a hand etc., but I don't know that there's a way to customize them.
« Last Edit: February 13, 2011, 11:52:10 PM by Connors »
Warning: The above post may have been modified multiple times.

"In a great game, the character must never perfectly obey the user's command"
 - Tim Rogers

http://connorspuzzles.tumblr.com/

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Custom cursors
« Reply #2 on: February 14, 2011, 02:07:45 AM »
It involves replacing the resource files I think. I can't remember how though, as I've never done it before.
I survived the spammage of 2007

GMG Mike


  • Administrator

  • GMG-er

  • *****

  • no avatar

  • Posts: 536
    • mikerichardson.name
Re: Custom cursors
« Reply #3 on: February 14, 2011, 12:20:59 PM »
You can use Rezilla to customize the cursors. It's an old PowerPC program but it will run on new Macs with Rosetta. OS X will automatically download Rosetta if you don't already have it installed.

http://sourceforge.net/projects/rezilla/

Check the GameMaker Read Me file for more information on how to install the custom cursor.
« Last Edit: February 14, 2011, 12:21:18 PM by Mike_Richardson »

Zoo


  • GMG Extraordinaire

  • ***


  • Posts: 1686
    • My Bandcamp
Re: Custom cursors
« Reply #4 on: February 14, 2011, 03:07:25 PM »
thanks, anyone know how to put them in a game?
Kirby, your pudgy buddy from dream land, is back again on the game boy®!

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Custom cursors
« Reply #5 on: February 14, 2011, 05:00:23 PM »
Here's the instructions from More Notes (packaged with Mac GameMaker):

----- CREATING CUSTOM CURSORS -----
You can create up to 10 new cursors to use in your game. Use ResEdit or other resource editor to create "crsr" resources. Put the resources in your project file. Don't put them in the GameMaker application. Make sure the game is not open in GameMaker while you are adding cursors or they will not be displayed. In ResEdit, use "Get Resource Info" in the "Resource" menu to name and renumber the cursors. The new cursors must have a name for them to show up in GameMaker. The resource ID numbers must start at 1010 and continue with 1011, 1012, and so on for as many cursors as you create.
I survived the spammage of 2007

Zoo


  • GMG Extraordinaire

  • ***


  • Posts: 1686
    • My Bandcamp
Re: Custom cursors
« Reply #6 on: February 14, 2011, 05:46:19 PM »
Ok, you got me. What the heck is ResEdit? lol
Kirby, your pudgy buddy from dream land, is back again on the game boy®!

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: Custom cursors
« Reply #7 on: February 14, 2011, 06:01:24 PM »
A resource fork editing application.

Al Staffieri


  • GMG-er

  • **

  • no avatar

  • Posts: 452

  • I love GameMaker
Re: Custom cursors
« Reply #8 on: February 14, 2011, 07:04:31 PM »
Quote
Ok, you got me. What the heck is ResEdit? lol

As Mike said you can use Rezilla in place of ResEdit (ResEdit does not work on new Macs). Open your game in Rezilla. In the Resources menu select New Resource. For resource type put crsr. For ID put 1010. Then enter a name for the cursor. Then press Create and you'll get a window to draw a new cursor. Then save and that's it. It will be available in your game.

Zoo


  • GMG Extraordinaire

  • ***


  • Posts: 1686
    • My Bandcamp
Re: Custom cursors
« Reply #9 on: February 14, 2011, 08:41:03 PM »
Sweet!
EDIT: That works. OMG This will be so useful. How do you change it's size?
« Last Edit: February 14, 2011, 08:49:27 PM by zoo804 »
Kirby, your pudgy buddy from dream land, is back again on the game boy®!

GMG Mike


  • Administrator

  • GMG-er

  • *****

  • no avatar

  • Posts: 536
    • mikerichardson.name
Re: Custom cursors
« Reply #10 on: February 15, 2011, 05:35:30 PM »
Quote
Sweet!
EDIT: That works. OMG This will be so useful. How do you change it's size?

You can't. "crsr" style cursors can only be 16x16. You can draw it smaller than that but not bigger.

Zoo


  • GMG Extraordinaire

  • ***


  • Posts: 1686
    • My Bandcamp
Re: Custom cursors
« Reply #11 on: February 16, 2011, 03:19:02 PM »
Oh well. doesn't really matter anyway. the normal size is big enough.  :P
Kirby, your pudgy buddy from dream land, is back again on the game boy®!

Al Staffieri


  • GMG-er

  • **

  • no avatar

  • Posts: 452

  • I love GameMaker
Re: Custom cursors
« Reply #12 on: February 17, 2011, 07:03:44 AM »
Depending on what you want, there are two built in cross hair cursors. You can try one of these.

SETCURSOR 2
SETCURSOR 3

There are also some cursors I made at:
http://alstaffieri.com/gmaddons.html#cursors

You can open that file with Rezilla and add them to your game. Thyere is a crosshairs cursor in there.
« Last Edit: February 17, 2011, 07:07:11 AM by AlStaffieri »

Zoo


  • GMG Extraordinaire

  • ***


  • Posts: 1686
    • My Bandcamp
Re: Custom cursors
« Reply #13 on: February 17, 2011, 03:19:05 PM »
those are pretty good.
Kirby, your pudgy buddy from dream land, is back again on the game boy®!

GMG Kurt


  • GMG-er

  • **


  • Posts: 682

  • Sorry for being such a noob
Re: Custom cursors
« Reply #14 on: March 06, 2011, 08:53:19 PM »
This block of code also works for changing the arrows, and is much simpler, and doesn't conform to arrow size constraints.
It can also act as a sprite for use in Avoider games

(make sure to check the loop script option)
SETCURSOR -1
REPEAT 100
  SPRITE 1 MouseHorz MouseVert  file.gif
END REPEAT

There are only two things wrong with it.

changing the repeat variable to a lower value will cause choppier movement, because of the loop script code, and the number (even as small as 100) will cause a delay with other commands being executed, since the repeat command has to run through

The setcurser command, using negative numbers doesn't seem to work on my computer, maybe on yours. I don't know
Just your average Weekend Warrior.
Yes I know I have bad spelling, it's what makes me such a good programmer!

"Old art, weather magnificent or wretched, is always the raw material of new art. The artist's job, though, is to