Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Bitmap Collisions Physics Usage Examples #283

Open
wants to merge 5 commits into
base: usage-examples
Choose a base branch
from

Conversation

ShaunR1991
Copy link

Description

This pull request adds simple usage examples for the following bitmap collision physics functions in SplashKit:

  • bitmap_circle_collision
  • bitmap_circle_collision_at_point
  • bitmap_circle_collision_for_cell
  • bitmap_circle_collision_for_cell_at_point
  • bitmap_circle_collision_for_cell_with_translation
  • bitmap_collision
  • bitmap_collision_at_points
  • bitmap_collision_for_cells
  • bitmap_collision_for_cells_at_points
  • bitmap_collision_for_cells_with_translations
  • bitmap_point_collision
  • bitmap_point_collision_at_point
  • bitmap_point_collision_for_cell
  • bitmap_point_collision_for_cell_at_point
  • bitmap_point_collision_for_cell_with_translation
  • bitmap_point_collision_with_translation
  • bitmap_rectangle_collision
  • bitmap_rectangle_collision_at_point
  • bitmap_rectangle_collision_for_cell
  • bitmap_rectangle_collision_for_cell_at_point
  • bitmap_rectangle_collision_for_cell_with_translation

The purpose of this update is to help users understand the functionality of these bitmap collision physics functions in SplashKit by providing detailed examples across supported languages (C++, C#, and Python).

Each example includes:

  • C++ Code
  • C# Code (Top-Level and Object-Oriented versions)
  • Python Code
  • Text Description File
  • Image of Output
  • Resource zip file

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (update or new)

How Has This Been Tested?

All functions were run and tested to ensure output was as expected.

Testing Checklist

  • Tested in latest Chrome
  • Tested in latest Firefox
  • npm run build
  • npm run preview

Checklist

If involving code

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

If modified config files

  • I have checked the following files for changes:
    • package.json
    • astro.config.mjs
    • netlify.toml
    • docker-compose.yml
    • custom.css

Additional Notes

Each example is designed to demonstrate only the basic functionality of bitmap collision physics functions in SplashKit. The resources provided will enable users to replicate, modify, and understand how to implement the functions and what the expected outputs might look like.

Copy link

netlify bot commented Nov 23, 2024

Deploy Preview for splashkit-io ready!

Name Link
🔨 Latest commit 186bfa8
🔍 Latest deploy log https://app.netlify.com/sites/splashkit-io/deploys/6741b1ef340c470008a4e595
😎 Deploy Preview https://deploy-preview-283--splashkit-io.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ShaunR1991 ShaunR1991 changed the base branch from main to usage-examples November 23, 2024 10:52
Copy link

netlify bot commented Nov 26, 2024

Deploy Preview for splashkit-usage-examples ready!

Name Link
🔨 Latest commit 7c90930
🔍 Latest deploy log https://app.netlify.com/sites/splashkit-usage-examples/deploys/674badc432f73f0008fd38cb
😎 Deploy Preview https://deploy-preview-283--splashkit-usage-examples.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

@ctrlvish ctrlvish left a comment

Choose a reason for hiding this comment

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

I've reviewed the function

bitmap_circle_collision
bitmap_circle_collision_at_point
bitmap_circle_collision_for_cell
bitmap_circle_collision_for_cell_at_point
bitmap_circle_collision_for_cell_with_translation

  • All required files are present.
    • Title and explanation (.txt)
    • C++ code
    • C# code (top-level statements)
    • C# code (Object-Oriented Programming)
    • Python code
  • Code correctly uses Splashkit functions.
  • Code clearly demonstrates the function.
  • All versions maintain the same structure and comments.
  • C++ code ran correctly.
  • C# top level code ran correctly.
  • C# OOP code ran correctly.
  • Python code ran correctly.

feedback: C# files are missing comments for these 5 programs

bitmap_collision
bitmap_collision_at_points
bitmap_collision_for_cells
bitmap_collision_for_cells_at_points
bitmap_collision_for_cells_with_translations

  • All required files are present.
    • Title and explanation (.txt)
    • C++ code
    • C# code (top-level statements)
    • C# code (Object-Oriented Programming)
    • Python code
  • Code correctly uses Splashkit functions.
  • Code clearly demonstrates the function.
  • All versions maintain the same structure and comments.
  • C++ code ran correctly.
  • C# top level code ran correctly.
  • C# OOP code ran correctly.
  • Python code ran correctly.

bitmap_point_collision
bitmap_point_collision_at_point
bitmap_point_collision_for_cell
bitmap_point_collision_for_cell_at_point
bitmap_point_collision_for_cell_with_translation
bitmap_point_collision_with_translation

  • All required files are present.
    • Title and explanation (.txt)
    • C++ code
    • C# code (top-level statements)
    • C# code (Object-Oriented Programming)
    • Python code
  • Code correctly uses Splashkit functions.
  • Code clearly demonstrates the function.
  • All versions maintain the same structure and comments.
  • C++ code ran correctly.
  • C# top level code ran correctly.
  • C# OOP code ran correctly.
  • Python code ran correctly.

Final notes: Kindly make the one correction on the .cs files for bitmap circle collision programs. Thank you!

Copy link

@ctrlvish ctrlvish Nov 28, 2024

Choose a reason for hiding this comment

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

Add code comments to this oop file, and the top-level statement version. For all the bitmap_circle_collision usage examples in c#. Total of 10 code files to add comments.
bitmap_circle_collision
bitmap_circle_collision_at_point
bitmap_circle_collision_for_cell
bitmap_circle_collision_for_cell_at_point
bitmap_circle_collision_for_cell_with_translation

Copy link
Author

Choose a reason for hiding this comment

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

Good spot! Thanks for the thorough review. These have been amended.

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