stride3d / stride3d/stride

Mouse cursor image unbounded from the game framerate

Open
#1,131 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-Graphics enhancement
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Is your feature request related to a problem? Please describe.
Custom mouse pointer images bounded to game framerate e.g. 60 FPS.
It seems some laggy. Mouse cursor must be such fast as possible.
I want to see mouse cursor unbounded from the game framerate.

Describe the solution you'd like
See code below. It will be easy to implement in Stride.Graphics.SDL.Cursor

Workaround:

  1. Download SDL2-CS sources
  2. Compile
  3. Make library reference to own project
  4. Use these code to achieve mouse cursor unbounded from the framerate
var surface = SDL.SDL_CreateRGBSurfaceWithFormatFrom(...);
var cursor = SDL.SDL_CreateColorCursor(surface, offsetX, offsetY);
SDL.SDL_SetCursor(cursor);

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in Stride.Graphics.SDL.Cursor, the file named in the issue, and compare its cursor handling with the SDL2-CS calls shown in the workaround. The work is done when custom mouse pointer images update independently of the game framerate and the cursor offset and image remain correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.