Skip to content

Add move_sprite_to usage example - #783

Open
Osaid2993 wants to merge 1 commit into
thoth-tech:mainfrom
Osaid2993:move-sprite-to-usage-example
Open

Add move_sprite_to usage example#783
Osaid2993 wants to merge 1 commit into
thoth-tech:mainfrom
Osaid2993:move-sprite-to-usage-example

Conversation

@Osaid2993

Copy link
Copy Markdown

Description

Splashkit Function: move_sprite_to

Overview of example functionality: This example shows how to use move_sprite_to to move a sprite to the position selected by the user. When the user clicks anywhere inside the window, the sprite is moved to the mouse coordinates.

Note: This example requires player.png to run. You can find it in the Sprites section of the Resources page. Download the resources and copy player.png into your project's Resources/images folder.

Example Output:
move_sprite_to-1-example

Files Included

  • C++ code
  • C# code (Top-Level statements)
  • C# code (Object-Oriented Programming)
  • Python code
  • Relevant title for the example (.txt)
  • Screenshot

Usage Example Checks (READ CAREFULLY)

  • Code uses Splashkit function above
  • Code does not use non-Splashkit functions
  • Code does not use extra function declarations or extra classes
  • Code does not violate any of the Thoth Tech SplashKit Style Guide rules
  • Simple, clear demonstration of the function
  • Tested in Chrome and Firefox

@netlify

netlify Bot commented Jul 21, 2026

Copy link
Copy Markdown

Deploy Preview for splashkit failed.

Name Link
🔨 Latest commit 5f120a3
🔍 Latest deploy log https://app.netlify.com/projects/splashkit/deploys/6a5f8a49d6821900086b2b51

@kottochii kottochii left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested and it worked (the programs run as expected), however, as the player.png is not provided, the code itself cannot be just copied and pasted (which is the expectation for Usage Examples section). It should be somehow commented that the program expects the PNG file and where it is expected (in this case ./images/player.png), or the file should be provided to the viewer in another way.

@Osaid2993

Copy link
Copy Markdown
Author

@kottochii I actually added a note to the PR description explaining that player.png is required, where to download it (Resources > Sprites), and that it should be placed in the Resources/images folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants