From c3f4a363dc38597b4a60fae5bd6b7c9ddaf39860 Mon Sep 17 00:00:00 2001 From: sharvani28 Date: Fri, 30 Aug 2024 16:41:49 +1000 Subject: [PATCH 1/3] Camera control functions --- .devcontainer/devcontainer.json | 27 ++++++++ .github/dependabot.yml | 12 ++++ .../Camera/Camera Control Functions draft.md | 64 +++++++++++++++++++ 3 files changed, 103 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .github/dependabot.yml create mode 100644 Tutorial Proposals/Camera/Camera Control Functions draft.md diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..da799a0 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,27 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet +{ + "name": "C# (.NET)", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0-bookworm" + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [5000, 5001], + // "portsAttributes": { + // "5001": { + // "protocol": "https" + // } + // } + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "dotnet restore", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..f33a02c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for more information: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +# https://containers.dev/guide/dependabot + +version: 2 +updates: + - package-ecosystem: "devcontainers" + directory: "/" + schedule: + interval: weekly diff --git a/Tutorial Proposals/Camera/Camera Control Functions draft.md b/Tutorial Proposals/Camera/Camera Control Functions draft.md new file mode 100644 index 0000000..9defd61 --- /dev/null +++ b/Tutorial Proposals/Camera/Camera Control Functions draft.md @@ -0,0 +1,64 @@ +# Tutorial Proposal + +## Title: Dynamic Camera Control with SetCameraPosition and ScreenRectangle + +## Introduction + +This tutorial aims to demonstrate the usage of the SetCameraPosition and ScreenRectangle functions in SplashKit. By the end of this tutorial, readers will learn how to implement dynamic camera movements and visual effects, allowing for interactive and immersive experiences in their projects. + +## Prerequisites + +To follow along with this tutorial, readers should have: + +- Basic knowledge of programming concepts. +- Familiarity with the Splashkit library. +- Installed Splashkit (<) and set up their development environment. + +## Functions Used + +- [Screen Rectangle](https://splashkit.io/api/camera/#screen-rectangle) +- [Set Camera Position](https://splashkit.io/api/camera/#set-camera-position) + +## Table of Contents + +1. Tutorial Details + + - Tutorial Structure + - Level of Difficulty + +2. Examples + + - Example 1: Creating a Zoom Effect on a Clicked Area + - Example 2: Following a Bitmap with User Mouse Clicks + +## Tutorial Details + +### Tutorial Structure + +This tutorial provides step-by-step instructions on using SetCameraPosition and ScreenRectangle functions to control camera behavior and create dynamic visual effects. + +### Level of Difficulty + +This tutorial is aimed at intermediate programmers with some experience in graphics programming and the SplashKit library. + +## Examples + +- **Example 1: Creating a Zoom Effect on a Clicked Area** + + This example demonstrates how to use SetCameraPosition to zoom into a specific area of a 9x9 coloured grid when a box is clicked. The camera adjusts to focus on the selected box, filling the screen with its color. + +- **Example 2: Following a Bitmap with User Mouse Clicks** + + In this example, we demonstrate how to use 'SetCameraPosition' and 'ScreenRectangle' to follow a bitmap as it moves in response to user mouse clicks. The bitmap, which represents a character or object in a game world, is initially loaded in the window. When the user clicks on the screen, the bitmap moves towards the clicked position. This showcases how to implement responsive camera controls that track an object's movement based on user interactions. + +## Expected Learning Outcomes + +After completing this tutorial, readers will be able to: + +- Understand the purpose and usage of SetCameraPosition and ScreenRectangle Functions. +- Implement dynamic camera movements and zoom effects in their SplashKit projects. +- Create interactive and immersive graphical applications with responsive camera controls. + +## Conclusion + +This tutorial demonstrated how to use SetCameraPosition and ScreenRectangle to create dynamic camera movements and zoom effects in SplashKit. SetCameraPosition enables precise control over the viewable area, allowing for smooth tracking of objects or specific scenes. ScreenRectangle helps define and visualize the current viewport. Together, these functions enhance interactivity and immersion, enabling developers to build engaging and responsive graphical applications. From 4d1d791861976fa2ad20cfa464d7ed263d87d60d Mon Sep 17 00:00:00 2001 From: sharvani28 <139297620+sharvani28@users.noreply.github.com> Date: Fri, 30 Aug 2024 16:49:13 +1000 Subject: [PATCH 2/3] Delete .devcontainer/devcontainer.json --- .devcontainer/devcontainer.json | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index da799a0..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,27 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet -{ - "name": "C# (.NET)", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0-bookworm" - - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [5000, 5001], - // "portsAttributes": { - // "5001": { - // "protocol": "https" - // } - // } - - // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "dotnet restore", - - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} From 18e3f13ffe4d9e3d099ffb167d9a1bb4003c1e33 Mon Sep 17 00:00:00 2001 From: sharvani28 <139297620+sharvani28@users.noreply.github.com> Date: Fri, 30 Aug 2024 16:49:33 +1000 Subject: [PATCH 3/3] Delete .github/dependabot.yml --- .github/dependabot.yml | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index f33a02c..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,12 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for more information: -# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates -# https://containers.dev/guide/dependabot - -version: 2 -updates: - - package-ecosystem: "devcontainers" - directory: "/" - schedule: - interval: weekly