Skip to content

Add move_camera_to usage example - #798

Open
jankiluitel wants to merge 4 commits into
thoth-tech:mainfrom
jankiluitel:feature/camera-follow-player-example
Open

Add move_camera_to usage example#798
jankiluitel wants to merge 4 commits into
thoth-tech:mainfrom
jankiluitel:feature/camera-follow-player-example

Conversation

@jankiluitel

@jankiluitel jankiluitel commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR adds a new move_camera_to usage example demonstrating how to create a camera that follows a player around a world larger than the screen.

Files Added

  • move_camera_to-1-example.cpp
  • move_camera_to-1-example.py
  • move_camera_to-1-example.txt

Testing

  • C++ example compiled and ran successfully.
  • Python example ran successfully.
  • Player movement works using WASD and Arrow keys.
  • Camera follows the player correctly.
  • Camera remains within the world boundaries.
ScreenRecording2026-08-02at2 02 49AM-ezgif com-video-to-gif-converter

@netlify

netlify Bot commented Jul 30, 2026

Copy link
Copy Markdown

Deploy Preview for splashkit failed.

Name Link
🔨 Latest commit 72653f4
🔍 Latest deploy log https://app.netlify.com/projects/splashkit/deploys/6a6e193e1f7812000802e1bb

@Rhinoatron Rhinoatron 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.

Amazing work on this task. The larger game world is visually engaging, the world objects make the camera movement easy to see, and the player and camera movement appear to work well. However, I’d like to request a few changes before approval. The task requires implementations in C++, Python, C# OOP, and C# top-level, but both C# versions are currently missing. The required GIF also needs to be added to the public/usage-examples/camera/ folder. I can see the recording embedded in the PR description and is not included as one of the repository’s usage-example files. Once the two C# implementations and the GIF are added, I’ll be happy to take another look. 🙂

@jankiluitel

Copy link
Copy Markdown
Collaborator Author

Amazing work on this task. The larger game world is visually engaging, the world objects make the camera movement easy to see, and the player and camera movement appear to work well. However, I’d like to request a few changes before approval. The task requires implementations in C++, Python, C# OOP, and C# top-level, but both C# versions are currently missing. The required GIF also needs to be added to the public/usage-examples/camera/ folder. I can see the recording embedded in the PR description and is not included as one of the repository’s usage-example files. Once the two C# implementations and the GIF are added, I’ll be happy to take another look. 🙂

Thanks for taking the time to review my PR and for the helpful feedback.

I have now addressed all of the requested changes:

Added the C# OOP implementation.
Added the C# Top-Level implementation.
Added the required move_camera_to-1-example.gif to the public/usage-examples/camera/ directory.

The changes have been committed and pushed to this PR. When you have a chance, I'd appreciate it if you could take another look. Thank you!

@Rhinoatron Rhinoatron 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.

Thank you for making the requested changes I’ve reviewed the latest commits and confirmed that the C# OOP and C# top level implementations have now been added, along with the required GIF in the correct usage example folder. All four versions demonstrate the same player movement and camera following behaviour within a larger game world, and the example meets the task requirements. Approved!

@Osaid2993 Osaid2993 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.

Hi @jankiluitel, nice visual example. Could you simplify it so move_camera_to stays the main focus? Please also remove non-SplashKit functions like Math.Max, Math.Min, max, and min, and update the C# top-level colours to use functions like ColorWhite() and ColorBlack().

Once updated, I’ll review it again.

@jankiluitel

Copy link
Copy Markdown
Collaborator Author

Hi @jankiluitel, nice visual example. Could you simplify it so move_camera_to stays the main focus? Please also remove non-SplashKit functions like Math.Max, Math.Min, max, and min, and update the C# top-level colours to use functions like ColorWhite() and ColorBlack().

Once updated, I’ll review it again.

Thanks for the review and feedback! I've now simplified the example so that move_camera_to() is the main focus, removed the non-SplashKit helper functions (Math.Max, Math.Min, max, and min), updated the C# top-level implementation to use SplashKit colour functions, and replaced the GIF to match the updated example. The changes have been pushed, and I'd appreciate it if you could take another look. Thanks!

@himanshigaba22 himanshigaba22 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.

Great work! The requested changes have been addressed, including the C# implementations, GIF, and simplification of the example to keep move_camera_to() as the main focus. The example is now clear, consistent across all languages, and demonstrates the target function well. Approved

@Abod-A Abod-A 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.

works on my end good job.

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.

5 participants