World of Goo: Cursor

Game: World of Goo, made by 2D Boy

Replicated Feature: The shape and behavior of the mouse cursor

More Information: [Blog Post]

Using the Sample:

The most important element of the sample is the Cursor class. This is a DrawableGameComponent the handles the updating and drawing of the cursor. To add a cursor to your game, you simply add a cursor instance to your Components list.

By default, the cursor is made to look similar to the one in World of Goo, but I also provided plenty of customization points. There are several properties of this class that control how the cursor looks and behaves.

  • Looks
    • StartScale – the scale of the starting node in the cursor’s trail
    • EndScale – the scale of the ending node in the cursor’s trail
    • LerpExponent – controls how the transition from the StartScale to the EndScale is done
    • FillColor – the color used for the inside area of the cursor
    • BorderColor – the color used for the border of the cursor
    • BorderSize – size (in pixels) of the border around the cursor
  • Behavior
    • TrailStiffness – controls the stiffness of the springs between trail nodes. A higher value causes the springs to be stiffer, so the cursor will have a shorter elongation. A lower value will cause the cursor to have a longer trails
    • TrailDamping – controls the damping factor that affects the velocity of the trail nodes
    • TrailNodeMass – specifies the mass of each node

Most properties are also modifiable using the keyboard at runtime, so you can experiment with different values.

To control the cursor, you can use either the mouse, or a gamepad.

Screenshots:

GooCursor 2009-01-26 00-34-27-52 GooCursor 2009-01-26 00-34-29-77

GooCursor 2009-01-26 00-34-59-21 GooCursor 2009-01-26 00-35-43-53

GooCursor 2009-01-26 00-36-14-92 GooCursor 2009-01-26 00-37-23-76

GooCursor 2009-01-26 00-38-05-53 GooCursor 2009-01-26 00-39-30-55

GooCursor 2009-01-26 00-40-10-53

Download: GooCursor.zip

  • #1 written by shane
    about 3 years ago

    Music is bliss on XNA forums, I was searching some stuff about the Viewport class you suggested I use, and ended up on your website through google, taking advantage of the irony, I decided to browse it, and I love how you replicated this cursor.

    to be honest, the only 2 things i liked in world of goo was the cursor, and the actual goo placement programming. good job on the replication, and your programming amazes me. that is all.

  • #2 written by Catalin Zima
    about 3 years ago

    I’m glad you like it, and hope you find it useful.
    I liked the idea for World of Goo (and the cursor, obviously), but it didn’t keep me interested enough to make it through to the last level. Maybe some other time, when I’m need of a quick gaming session :)

  • #3 written by f1sh
    about 3 years ago

    Hey mate, can I use this cursor in Windows ? Please reply. Many thanks

  • #4 written by Catalin Zima
    about 3 years ago

    @fish: No, you can only use it inside XNA applications.

  • #5 written by Windgate
    about 3 years ago

    I have programmed this cursor too, it is on my game, here you con download an play/edit it:

    http://www.mediafire.com/file/4wbowzmomqv/JustFantasy!0.6a.zip

  • #6 written by Hotgoblin
    about 3 years ago

    i want use it on desktop :(

  • #7 written by Catalin Zima
    about 3 years ago

    @Hotgoblin sorry, you can’t

  • #8 written by Sean McDirmid
    about 3 years ago

    I replicated the Goo cursor in WPF using Bling’s physics support. Nice effect!

  • #9 written by Tomas Skelton
    about 3 years ago

    @Catalin is it computationally impossible ? Is anyone able to make this cursor ? I would pay $4.99 for it no doubt.

  • #10 written by Catalin Zima
    about 3 years ago

    @Tomas: It’s technically impossible to use this code for the cursor in Windows

  • #11 written by eslam_jazz
    about 2 years ago

    thaaaaaaaaaaaaaanks

  • #12 written by David
    about 2 years ago

    Just want to let you know that I was working on something similar. You can have a look on my website http://curltable.the-yard.net/curltable/mouse-trail

  • #13 written by superkk99
    about 2 years ago

    DUDE’S I DID EVERTHING IT WONT WORK!!!!!!!!!!!!!!!!! PLEASE HELP ME *cry’s*

  • #14 written by Catalin Zima
    about 2 years ago

    Did you try simply running the sample?

  • #15 written by superkk99
    about 2 years ago

    no i dont know what that is.

  • #16 written by umar muzammil
    about 2 years ago

    i had tried to use the ‘goocursor.zip’ but it is not a cur file.
    now what can i do ??????????????

  • #17 written by Catalin Zima
    about 2 years ago

    You can’t use this in windows. This is just for use in a game made with XNA

  • #18 written by Marco Sperling
    about 2 years ago

    Sorry I had to laugh when I read all the questions about an actual windows cursor implementation that a lot of commenters asked for.
    An actual proof of how influential World of Goo was?
    Good job on your sample, Catalin :)

  • #19 written by Antonio Liñán
    about 1 year ago

    Hi, you helped me a lot, and I’ve just modified a little your code for making it better (I think), and I want to share it with you, I made a video so you can see the the results:

    http://vimeo.com/20019564

    If you want me to put the very simple code of the modification, just answer me.

    Thank you for sharing!

  • #20 written by Tomas
    about 1 year ago

    Thanks a lot for the example. The clear code is really helpful!
    Can you please explain in short how the texture is a 32×32 square, but the final draw makes it a circle? I figured out myself that it probably has something to do with the blendstate. Thanks!