Brief Description: This iteration now includes setting time limits, adjusting target size, dynamic score tracking, and starting the game via a start button. It also retains animation-focused enhancements like choosing which animations to see via a dropdown, adjusting animation speed via slider, reversing animations, allowing for simultaneous animations, and toggling the visibility of UI elements for a cleaner interface. The final version increases the user's experience through a completely redesigned UI, with better accessibility and aesthetics and optimized functionality for better gameplay.

Instructions:  Before starting the game, the user must select a size and a time limit. The game will not allow the user to start without these selections. Other options, such as movement and animations, are optional and do not need to be selected to begin the game. Once the game has started, these options cannot be changed and must be adjusted only after the game is stopped or has ended.

Feature 1: Display Cursor Position

Description:  Tracks the cursor's position on the screen in real time and displays the coordinates.

Input: Cursor location.

Process: The mouse position on the screen is tracked using Input.mousePosition and stored in a two-dimensional vector. The vector's x and y coordinates are then formatted and assigned to the TextMeshProUGUI.This portion of the code is inside the update function, which allows the position to update in real time. 

Output: The coordinates are updated in real-time in the screen's bottom left corner. 

Difference: Unlike the class project, this feature formats coordinate points differently. The functionality cannot be altered because it requires displaying the cursor position.

Feature 2: Change Time Limit 

Description: Updates the game's countdown timer based on the user-selected time limit.

Input: Selected time from the dropdown display

Process: The time limit is updated based on what the user selects from the dropdown. Once the time limit is selected, the countdown and time remaining variables are updated accordingly. This ensures that the timer will start at the correct time when the user decides to start the game. Output: Once the user starts the game, the timer will begin the countdown and display it in the top right corner. 

Difference: The class project does not have any feature resembling a timer.

Feature 3: Change Size

Description: Adjusts the size of the target object based on user input.

Input: Selected size from the dropdown display 

Process: The cube size is updated based on the user's selection from the dropdown menu. Once the size is selected, the object’s scale is updated, which will be reflected once the game begins. 

Output: Once the user begins the game, the object will reflect the size selected in the dropdown. 

Difference: The class project can change the size of the primitives in the UI; however, the size is adjusted using a slider, not a dropdown.

Feature 4: Start/Stop Timer

Description: Allows the user to start or stop the game and resets the timer if stopped.

Input: Click on the button to start or stop the game 

Process: The code first checks to see if the user has selected a time limit and size for the shape. If this condition is met, the countdown timer begins, and the cube will appear on the screen. If the user decides to click the button again, the game will be stopped, and the timer will be reset.

Output: Depending on the state, the button will be updated with “Start!” or “Stop.” Additionally, the timer will start updating, and cubes will begin to spawn on the screen. 

Difference: The class project does have a Start/Stop button 

Feature 5: Destroy Cubes and Update Score

Description: Updates the score and destroys cubes upon user interaction.

Input: Left-click on the cube 

Process: If the user clicks on the UI, the program detects whether the user clicked on the cube. If the ray cast intersects with the cube, the score is updated, and the cube is destroyed and replaced immediately. 

Output: The score is updated in the top right corner of the screen, and if the timer has not reached zero, another cube will spawn. 

Difference: In the class example, the user clicks on the screen to get the shapes to spawn, whereas, in my game, the cubes spawn after the start button is pressed and destroyed with a left click.

Feature 6: Alternating Cube Sizes

Description: Allows cubes to spawn at random sizes when toggled on or at a fixed size based on user selection when toggled off.

Input: Click the "Alternating Sizes" checkbox.

Process: The program checks whether the toggle is checked or unchecked. When the toggle is checked, the size dropdown menu disappears, and cubes spawn at random sizes (small, medium, large) determined by a random number between 1 and 3. The size dropdown reappears if unchecked, and cubes spawn at the selected size.

Output: Cubes spawn at random sizes when the toggle is on or at the size specified by the dropdown when the toggle is off.

Difference: The class project uses a "random scale" feature controlled by a slider, which adjusts sizes randomly within a set range. This feature eliminates the slider and directly assigns one of three predefined sizes.

Feature 7: Cube Movement (Vertical and Horizontal)

Description: Enables cubes to move either vertically (up and down) along the y-axis or horizontally (right and left) along the x-axis, based on user selection.

Input: Check the "Up/Down" or the "Right/Left" toggle.

Process: When selecting a toggle, the program turns off the other to prevent conflicting movements. The cubes move along the chosen axis (x or y) at a speed set by the user using the speed slider. If no speed is selected, the cubes remain stationary.

Output: When the game starts, the cubes move along the selected axis at the specified speed or remain stationary if no speed is set.

Difference: The class project does not include movement features, making this functionality unique to the game.

Feature 8: Cube Speed Control

Description: Adjust the speed of cube movement using a slider.

Input: Adjust the speed slider.

Process: The slider controls the speed at which cubes move in the selected direction (up/down or right/left). Setting the slider to zero keeps cubes stationary while increasing the value accelerates their movement. The maximum speed is capped at five.

Output: Cubes move in the chosen direction at speeds determined by the slider's value, ranging from stationary (0) to maximum speed (5).

Difference: The class project uses sliders to control object scaling and destruction timing, whereas this feature uses the slider exclusively to regulate movement speed.

Feature 9: Change Animation

Description: Updates the animation displayed on the target object based on user selection.

Input: Select an animation from the dropdown menu.

Process: The selected animation is applied to the target object. Once chosen, the animation is reflected when the game begins.

Output: The target object plays the selected animation once the game starts.

Difference: This feature is a requirement specified in the project instructions.

Feature 10: Animation Speed Control

Description: Adjust the speed of the animation using a slider.

Input: Adjust the animation speed slider.

Process: The slider lets the user control how fast the animation plays. At the base value, the animation speed is two, and at the maximum, it is five.

Output: The target animation plays at the speed set by the slider when the game starts.

Difference: This feature is a requirement specified in the project instructions.

Feature 11: Reverse Animation Toggle

Description: Allows animations to play in reverse when toggled on.

Input: Check or uncheck the reverse animation toggle.

Process: If the toggle is checked, animations play in reverse; if unchecked, animations usually play.

Output: Once the game starts, animations either reverse or usually, depending on the toggle state.

Difference: The class project/lecture did not demonstrate a feature with this functionality.

Feature 12: All Animations Toggle

Description: Plays all animations simultaneously when toggled on. Input: Check or uncheck all animation toggles. Process: If the toggle is checked, all animations play simultaneously. If unchecked, the user must select a specific animation to play. Output: When the game starts, all animations play if the toggle is on; otherwise, only the selected animation plays. Difference: The class project/lecture did not demonstrate a feature with this functionality.

Feature 13: Hide/Show Elements Button

Description: Toggles the visibility of UI elements on the screen. Input: Click the hide/show elements button. Process: Clicking the button toggles the visibility of UI elements. The same button is used to hide and show elements. Output: UI elements are hidden or displayed depending on the button's state. Difference: The class project/lecture did not demonstrate a feature with this functionality.

Feature 14: Project Selection Buttons

Description: Provides navigation to individual project scenes or functionalities.

Input: Click one of the project buttons (e.g., Project 1, Project 2, etc.).

Process: Clicking a button triggers the loading the corresponding project scene or functionality. Each button is uniquely mapped to its respective project.

Output: The corresponding project scene or feature is loaded and displayed on the screen.

Difference: The class project/lecture did not demonstrate a feature for multi-project navigation using dedicated buttons.

Feature 15: Back Button

Description: Returns the user to the project selection screen

Input: Click the back button.

Process: Clicking the button directs the user to the project selection screen

Output: The user is redirected to the project selection screen

Difference: The class project/lecture did not demonstrate a feature for returning to a previous menu with a dedicated back button.


Published 8 days ago
StatusReleased
PlatformsHTML5
AuthorARodier05
Made withUnity