YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
21 stars 8 forks source link

In-Game: Add a new function to support setting cursor_sprite to an animated image and declaring its speed, starting sprite index, and scale #6789

Open AvioxArcade opened 1 month ago

AvioxArcade commented 1 month ago

Is your feature request related to a problem?

Setting cursor_sprite to a sprite resource is a helpful feature, but if your game utilizes a small resolution, multiple cursors, and/or animated cursors, the process gets over complicated very quickly.

For example, one cursor I use is an animated hourglass to communicate to the player they can't control the game at that moment. To animate it, I either need to be satisfied with a "1 frame per game frame" image speed, or convert a 15-frame animation into 15 separate sprites and animate it manually. (e.g. cursor_sprite = hourglass_sprites[hourglass_image];) It just so happens in this example, the game is also low-res and the cursor is pixel art, so on modern monitors, I need to scale the sprite up when the game window is scaled up, which means I have 15 sprites per supported scale, just for one cursor sprite. (e.g. cursor_sprite = hourglass_sprites[scale][index]) Let's not even mention I have 14 OTHER cursors in use. (e.g. cursor_sprite = cursor_sprites[type][scale][index])

Describe the solution you'd like

Support for a cursor_speed that imitates image_speed and cursor_index that imitates image_index would be great. cursor_scale to mimic image_xscale/image_yscale would also be a incredibly valuable add.

Describe alternatives you've considered

  1. just draw the sprite on the GUI layer and not use the cursor_sprite feature. (sacrifice cursor smoothness, et. al)
  2. give up on supporting multiple cursor sprites
  3. dynamically create sprites & scaled sprites @ runtime (hinders texture pages, can easily lead to leaks)
  4. (what I'm currently doing) -- manually create hundreds of individual sprites for cursor management

Additional context

No response

stuckie commented 1 month ago

You would be better to draw this yourself as you would have more control over how it is presented.

AvioxArcade commented 1 month ago

If it's not a feature worth supporting, then I suggest you deprecate it and mention that it's intended for compatibility only in the manual