Skip to content

Conversation

@Sparsh300
Copy link

Added three new usage examples to support beginner learning:

• graphics/01-basic-drawing.mdx
• input/01-mouse-position.mdx
• sprites/01-basic-sprite.mdx

Each file follows the SplashKit Usage Example Style Guide:

  • Proper front-matter (title, description, language)
  • Single fenced code block
  • Clean, consistent comments
  • Simple, beginner-accessible examples

Testing

  • Verified rendering using astro dev (DocSearch disabled locally)
  • Build validated with npm run build

Requesting feedback and approval.

@netlify
Copy link

netlify bot commented Dec 7, 2025

Deploy Preview for splashkit failed.

Name Link
🔨 Latest commit c72d70d
🔍 Latest deploy log https://app.netlify.com/projects/splashkit/deploys/69439697ea69180008c2ef65

@Sparsh300
Copy link
Author

Hi team, the Netlify deploy failed due to missing DocSearch environment variables.
These variables are not available for contributor PRs, so this is expected.
The usage-example files are correctly formatted and do not affect deployment logic.
Ready for review.

@222448082Ashen
Copy link

222448082Ashen commented Dec 13, 2025

General Information

  • Type of Change: Clearly indicate the type of change (choose one):
    • Bug fix
    • New feature
    • Breaking change
    • Documentation update

Code Quality

  • Repository: Is this Pull Request made to the correct repository? (Thoth-Tech NOT SplashKit)
  • Readability: Is the code easy to read and follow? If not are there comments to help understand the code?
    • Issue: Files use .mdx format instead of the standard usage example format (.cpp, .cs, .py, .txt, .png/.gif)
  • Maintainability: Can this code be easily maintained or extended in the future?
    • Issue: Does not follow established usage example conventions outlined in CONTRIBUTING.mdx

Functionality

  • Correctness: Does the code meet the requirements of the task?
    • Issue: File structure does not match the expected usage example format
    • Issue: Missing required file variants:
    • Missing .txt description files
    • Missing C# OOP version (-oop.cs)
    • Missing C# top-level version (-top-level.cs)
    • Missing Python version (.py)
    • Missing output screenshots (.png/.gif)
    • Issue: File naming doesn't follow the <function_unique_global_name>-<number>-example.<ext> pattern
  • Impact on Existing Functionality: Has the impact on existing functionality been considered and tested?
    • Issue: Build fails due to missing DocSearch environment variables (see terminal output)

Testing

  • Test Coverage: Are unit tests provided for new or modified code?
    • N/A for usage examples
  • Test Results: Have all tests passed?
    • npm run build - FAILED (DocSearch env variables missing)
    • Tested in latest Chrome
    • Tested in latest Firefox
    • npm run preview

Documentation

  • Documentation: Are both inline and applicable external documentation updated and clear?
    • Code examples are functional but don't include:
      • Text descriptions (.txt files)
      • Resource files for sprite example (player.png needs Resources zip)

Pull Request Details

  • PR Description: Is the problem being solved clearly described?
    • Title indicates "add three basic usage examples"
  • Checklist Completion: Have all relevant checklist items been reviewed and completed?
    • Awaiting author's completion

Required Changes Before Approval

Critical: This PR does not follow the established usage example contribution guidelines. Please refer to CONTRIBUTING.mdx and restructure as follows:

For each example, create these files:

Basic Drawing Example (demonstrating fill_circle, fill_rectangle, draw_line):

fill_circle-X-example.txt
fill_circle-X-example.cpp
fill_circle-X-example-oop.cs
fill_circle-X-example-top-level.cs
fill_circle-X-example.py
fill_circle-X-example.png

Mouse Position Example (demonstrating mouse_x and mouse_y):

mouse_x-X-example.txt
mouse_x-X-example.cpp
mouse_x-X-example-oop.cs
mouse_x-X-example-top-level.cs
mouse_x-X-example.py
mouse_x-X-example.png (or .gif if interactive)

Sprite Example (demonstrating create_sprite and draw_sprite):

create_sprite-X-example.txt
create_sprite-X-example.cpp
create_sprite-X-example-oop.cs
create_sprite-X-example-top-level.cs
create_sprite-X-example.py
create_sprite-X-example.png
create_sprite-X-example-resources.zip (containing Resources folder with player.png)

Remove:

  • 01-basic-drawing.mdx
  • 01-mouse-position.mdx
  • 01-basic-sprite.mdx

@Sparsh300 Sparsh300 marked this pull request as draft December 13, 2025 09:19
@Sparsh300
Copy link
Author

Thanks for the detailed review. I’m restructuring the three examples to the required multi-file format (cpp/cs/py/txt/png + resources zip) as per CONTRIBUTING.mdx. I’ll push updates shortly.

@Sparsh300
Copy link
Author

Update Based on Reviewer Feedback

I have updated the pull request to follow the full SplashKit usage-example contribution guidelines.
The previous .mdx files have been removed and the examples have been re-created in the correct multi-language format.

Changes Completed

  1. Removed incorrect files

Deleted:

01-basic-drawing.mdx

01-mouse-position.mdx

01-basic-sprite.mdx

  1. Added correct usage example structure

Each example now includes all required variants:

Basic Drawing (fill_circle)

fill_circle-01-example.txt

fill_circle-01-example.cpp

fill_circle-01-example-oop.cs

fill_circle-01-example-top-level.cs

fill_circle-01-example.py

fill_circle-01-example.png

Mouse Position (mouse_x)

mouse_x-01-example.txt

mouse_x-01-example.cpp

mouse_x-01-example-oop.cs

mouse_x-01-example-top-level.cs

mouse_x-01-example.py

mouse_x-01-example.png

Sprite (create_sprite)

create_sprite-01-example.txt

create_sprite-01-example.cpp

create_sprite-01-example-oop.cs

create_sprite-01-example-top-level.cs

create_sprite-01-example.py

create_sprite-01-example.png

create_sprite-01-example-resources.zip (contains Resources/player.png)

  1. Clean commit

  2. Verified Locally

File structure matches CONTRIBUTING.mdx.

Examples load correctly in the local Starlight dev environment.

No remaining autogenerated file modifications.

Ready for Review

Please let me know if you’d like any formatting or naming adjustments.

@Sparsh300 Sparsh300 marked this pull request as ready for review December 13, 2025 09:59
@Sparsh300
Copy link
Author

Added a new key_down input usage example following the required naming and multi-file structure (.txt, .cpp, C# OOP, C# top-level, .py, .png).

@Sparsh300
Copy link
Author

To help contributors understand the necessary usage-example format, a brief checklist and filename example have been added to public/usage-examples/CONTRIBUTING.mdx.

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