Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
af29b00
Cut and paste radial progress bar from unity manual
thompson318 Mar 23, 2026
201ea06
Update progress bar with launch progress
thompson318 Mar 23, 2026
80633b4
Timer position
thompson318 Mar 23, 2026
b7eaaf9
Add panel settings
thompson318 Mar 23, 2026
d3c0761
Countdown time prefab can't be easily paused, so create our own timin…
thompson318 Mar 23, 2026
c3a5175
Only reduce time if gaze is steady
thompson318 Mar 23, 2026
adfbab2
Remove timer at end
thompson318 Mar 23, 2026
84beab0
update uxml
thompson318 Mar 23, 2026
dc55021
You need to move head and hold gaze in order to decrement the timer.
thompson318 Mar 24, 2026
3dd9be4
Added adaptive difficulty setting for gaze point
thompson318 Mar 25, 2026
37734b8
Put gaze and speed logic in one object, to avoid having to call betwe…
thompson318 Mar 25, 2026
4fda392
Updated scene
thompson318 Mar 25, 2026
bc74c30
tidy up launch animation
thompson318 Mar 25, 2026
9976a2e
De-duplicated sprite logic
thompson318 Mar 25, 2026
f658004
Tidy up code into more discrete functions
thompson318 Mar 25, 2026
48414c9
Put debug write in separate function
thompson318 Mar 25, 2026
e65a463
Added some adaptive diffculty based on the number of games played
thompson318 Mar 26, 2026
0dac1f2
Added a sprite scale and move based flame effect.
thompson318 Mar 26, 2026
ed64d79
Flames nicely sized and follow rocket at launch
thompson318 Mar 26, 2026
dc9d15a
Added gantry, flame and ground srpites.
thompson318 Mar 26, 2026
2115c3e
Some smoke paricles
thompson318 Mar 30, 2026
dbfe42c
A smoke emitter on each side
thompson318 Mar 30, 2026
383c0a4
Tweeked defaults and add a smoke scaling option.
thompson318 Mar 30, 2026
181c3ae
Stop smoke at launch.
thompson318 Mar 30, 2026
2704792
Screen centring
thompson318 Mar 30, 2026
963ba95
Trying to use units scaled to screen for UI element
thompson318 Mar 31, 2026
6c3b208
Add a scaling factor, because I can shake faster than I nod
thompson318 Mar 31, 2026
18607fe
Trying to get UI scaling right with some help from Claude sonnet 4.6
thompson318 Mar 31, 2026
b528c3a
Turn off extra displays
thompson318 Mar 31, 2026
ce21f69
Fix bug after rebase (stray LaunchCode)
thompson318 Mar 31, 2026
56d1ee8
Most recent game is first in list, not last.
thompson318 Mar 31, 2026
93c4654
Reverse order of list before returning so the subsequent calls to Las…
thompson318 Apr 1, 2026
3483deb
Merge branch 'st/fix-reverse-list' into st/rocket-launch-play-testing
thompson318 Apr 1, 2026
54f4966
Fix typo
thompson318 Apr 1, 2026
c9e0842
Merge branch 'st/fix-reverse-list' into st/rocket-launch-play-testing
thompson318 Apr 1, 2026
b4d1c05
First back to last after list change.
thompson318 Apr 1, 2026
2ec60e1
Trying to get the height scaling right
thompson318 Apr 1, 2026
e3fe998
Use radial fill on image instead of custom implementation.
thompson318 Apr 15, 2026
0a565c7
Tidy Scene
thompson318 Apr 15, 2026
a668fc7
Tidied up element names
thompson318 Apr 15, 2026
dd339c8
Implement an adaptive difficulty function.
thompson318 Apr 15, 2026
3bde345
Tidy format
thompson318 Apr 15, 2026
2192cf0
Grouped variables and updated docs.
thompson318 Apr 15, 2026
ea2c364
Formatting
thompson318 Apr 15, 2026
e5e5ec0
More documentation and tidied object in scene names.
thompson318 Apr 16, 2026
ec792d9
Merge branch 'main' into st/rocket-launch-play-testing
thompson318 Apr 16, 2026
87807f5
Sorting out graphical layers and tidying effects (#71)
mmcleod89 Apr 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 30 additions & 11 deletions docs/rocket-launch.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,37 @@
# Rocket Launch

The rocket launch mini-game increases the size of the rocket launch flame based on head movement (pitch or yaw)
and gaze steadiness.
The rocket launch mini-game requires the player to hold a steady gaze at a target object whilst
either shaking or nodding their head. If the gaze is steady and a minimum head speed is maintained
then a timer decrements until launch time is achieved.

## Main objects / values to edit during play testing

- **LaunchController**: Attached to the rocket object. Varies flame size depending on head motion and contains overall timer.
- Launch time: The overall time in seconds that the level takes.
- Head Pose Buffer Capacity (n) and speed time (s): head speed is measured as the average change in pitch or yaw over the time period speed time. The buffer will need to be sufficiently large to support the time based on game frame rate.
- speed scale: Scales the size of the flame based on head speed. A bigger number means a bigger flame.
- acceleration: The acceleration of the rocket when it launches.
- **LaunchController**: Attached to the rocket object. Controls the overall launch process.
- Launch time: The starting launch time in seconds. May be increased by adaptive difficulty features below.
- **Head Movement Variables**: Determine the amount of head movement required to decrement the timer.
- Head Pose Buffer Capacity (n) and speed time (s): head speed is measured as the average change in pitch or yaw over the time period speed time. The buffer will need to be sufficiently large to support the time based on game frame rate.
- Shake Speed Reduction: Because it is possible (for me at least) to shake my head quicker than I can nod, there is a scaling factor between the head speeds required for shaking or nodding. Setting to 0.5 for example means that the player must shake their head twice as fast as nodding to achieve the same effect.
- **Steady Gaze Variables**: Determine how steady the gave must be to decrement the timer.
- Timer Duration: How long (in seconds) the player must maintain a steady gaze to increment the count down code display.
- Gaze Pose Buffer Capacity (n) and gaze time (s), gaze steadiness is measured as the standard deviation of gaze over gaze time seconds. The buffer will need to be sufficiently large to support the time based on game frame rate.
- Gaze Tolerance - the allowable gaze standard deviation to be steady. Smaller number will require steadier gaze. This may be reduced by the adaptive difficulty settings below.
- Target Object if this is set you are required to look at that object, if not gaze can be anywhere on screen but must be steady.

- **User Interface Items**:
- Count down sprites: A list of sprites to use for the count down code display.
- Instructions Text: A text box to place the instruction text.
- Win Screen: Screen to show a successful launch.
- **Launch Speed Variables**: Control rocket behaviour at launch.
- acceleration: The acceleration of the rocket when it launches.

- **Debugging Variables**: Intended for debugging only.
- Use Mouse For Tracker: Can be used for debugging when no Tobii eye tracker is available.
- Gaze and Speed Status Text: Text boxes where we can write debugging information to screen.

- **FlameController**: Attached to the flame object, which is a child of the rocker object.
- Flicker Amplitude and frequency. At rest the flame will flicker slightly to match the aesthetics of other levels. Amplitude and frequency can be altered.
- Flame Speed Scale: The size of the flame will increase as the head speed increases. Increasing the scale will create a bigger flame.
- Flame Speed move: As the flame grows we also need to move it down relative to the rocket in order to prevent the flame appearing to come out of the top of the rocket. Faster head speeds or a larger flame speed scale will require a larger value for flame speed move.

- **LaunchCode**: Controls the random launch code and gaze steadiness
- Gaze Pose Buffer Capacity (n) and gaze time (s), gaze steadiness is measured as the standard deviation of gaze over gaze time seconds. The buffer will need to be sufficiently large to support the time based on game frame rate.
- Gaze Tolerance - the allowable gaze standard deviation to be steady. Smaller number will require steadier gaze.
- Target Object if this is set you are required to look at that object, if not gaze can be anywhere on screen but must be steady.
- **SmokeController**: Attached to ground left/right emitter.
- Smoke Emission Scale: A larger value will increase the amount of smoke emitted for a given head speed.
127 changes: 127 additions & 0 deletions projects/AstroBalance/Assets/Prefabs/LaunchProgressRing.prefab
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4244962871353435670
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1297730713443137943}
- component: {fileID: 4604732697548752065}
m_Layer: 5
m_Name: LaunchProgressRing
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1297730713443137943
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4244962871353435670}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -5}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4090822809295367550}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -959.9999, y: -539.99994}
m_SizeDelta: {x: 1056, y: 1056}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &4604732697548752065
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4244962871353435670}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7c88b2c285f9354de97ead891d715ca4, type: 3}
m_Name:
m_EditorClassIdentifier:
fillColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
--- !u!1 &5962618897390143818
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4090822809295367550}
- component: {fileID: 7663431619546614956}
- component: {fileID: 535554146585448550}
m_Layer: 5
m_Name: LaunchFill
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4090822809295367550
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5962618897390143818}
m_LocalRotation: {x: -0, y: -0, z: -1, w: 0.00000058114523}
m_LocalPosition: {x: 0, y: 0, z: 5}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1297730713443137943}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -180}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 960, y: 730}
m_SizeDelta: {x: 210, y: 210}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7663431619546614956
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5962618897390143818}
m_CullTransparentMesh: 1
--- !u!114 &535554146585448550
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5962618897390143818}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.8962264, g: 0.8383515, b: 0.10568706, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: -8180895760326893913, guid: 662bfaf6d26b3b448b5d093d156bac16, type: 3}
m_Type: 3
m_PreserveAspect: 1
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 0.693
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading