Skip to content

Module 1: integrate the team's version (Mosquito-Project-Final, New_Boy) - #58

Merged
RomeXO10 merged 44 commits into
mainfrom
module-1-integration
Oct 6, 2026
Merged

RomeXO10 merged 44 commits into
mainfrom
module-1-integration

Conversation

@RomeXO10

@RomeXO10 RomeXO10 commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Module 1 has been developed in a separate repository, Vathsana7/Mosquito-Project-Final (branch New_Boy, last commit 5 September). This PR brings that version into this repo. It takes the team's side for everything first, then re-applies only a few of our own changes on top.

How it was merged

That repo started on 10 June as a file copy of this repo's main at e8d4b7d (2,861 of 2,865 files identical), but without its git history. Its 32 commits are grafted onto e8d4b7d, with authors, dates and messages unchanged. Git therefore sees a real common ancestor, and the team's history shows up in git log and git blame. This adds about 8 MB to the repo.

The merge commit takes their side for everything:

  • Assets/1.TeamWorkspace/Module1/ is exactly their GameTesting/ folder, under our folder name.
    • Their main scene keeps its new name, Module1/Scene/Main Scene.unity. It has the same GUID as the old Module_1_MainScene.unity, so references still resolve.
    • Our Module 1 work since June is not in the merge commit: the HUD, intro and end screens, the proboscis blood fill, the DangerSource rename, desktop controls and the baked lighting.
  • Every other asset they changed, added, moved or deleted takes their version. Assets are matched by GUID rather than by git's rename guesses; on the raw merge, git paired several unrelated animation files.
  • Assets they did not touch keep ours, so Module 2 and the rest of main are unchanged.

Exceptions, where taking theirs literally would have broken something:

What Done instead Why
Fantasy Skybox FREE Kept at Assets/Packages/ Both sides imported the same package with the same GUIDs; two copies would clash
README.md, Mosquito-Project-Final.slnx Kept ours Their repo's own files
Packages/manifest.json and lock Ours plus their com.unity.2d.sprite Theirs would downgrade XR Interaction Toolkit and drop XR Hands, which Module 2 needs
Tags Union of both Both sides added tags
Layer WorldBoarder Moved from 7 to 10, with the one object using it (Environment in Main Scene) Module 2 already uses layers 7–9; no mask in their content uses the layer
Build settings Theirs (Startup Menu_New, IP Menu, Main Scene); Module_2_MainScene listed but disabled Their start flow, keeping Module 2's entry

Re-applied from our side

  1. 48f9ad0 Keep the shared scripts safe in Module 2. Their versions of these Module 1 scripts reintroduced a per-frame NullReferenceException in Module 2, which our side had already fixed.

    • WaterContainer waits for GameManager to exist. The jar, bucket and tyre prefabs carry this script into Module 2, which has no GameManager.
    • SendRecieveData takes the score from M2Manager when there is no GameManager. It also checks the connection-indicator image and the last GAMA message before using them. The message.status debug print threw every frame in Module 1 too, until GAMA's first message arrived.
  2. a9a961b Editor keyboard/mouse controls, ported onto their PlayerMain, so Module 1 can be tested without a headset. This is editor-only and does not affect headset builds.

  3. d972203 Proboscis fills with blood while drinking. ProboscisBloodFill (same script GUID) is attached to their snout in Main Scene. 'Feeding' is read from Drink.cs parenting the player to a person, because their PlayerMain has no interaction state. The tip end is found at start, because their snout capsule is rotated the other way.

  4. a3d1ff6 Blood burst on a full bar. Their one-second "Blood" particle burst now plays when the blood bar fills, instead of on the first bite.

  5. 690f6f1 Toon-shaded village materials (the scene part of Valentine's 92004b9). 38 material overrides on 27 prefab instances now point at the M_SimpleLit materials again. Only the material overrides were merged; the team's other changes to those instances are kept.

  6. b85e1ae Drops a stray using NUnit.Framework from Wild_Mosquitos.

  7. e3a9c7c Flight, reach and rules, ported from e2a8575 (module-1-improvements) and 8759dfd onto their PlayerMain. Their bars, particles, per-stage scores, respawn and restart are kept.

    • Flight: rigidbody interpolation fixes the camera judder. The mosquito slides along walls instead of buzzing against them, and is recovered if it falls through the floor. Forward flies where you look; set PitchInfluence to 0 for the old level flight.
    • Reach: drinking, mating and laying eggs work within 0.5 m of the head and in front of it, scaled to their smaller rig, instead of needing the thin proboscis trigger to touch. The outline highlights whatever A will act on. The mosquito rides a person or flower smoothly while feeding, and a press of A just before arriving still counts.
    • Rules: eggs only go in rain-filled containers. One full blood meal lays all 4 eggs, a quarter of the bar each. Quests stay done once completed and pay out once.
    • Respawn: BornFromWater no longer throws when no container starts filled, and can pick the last one.
  8. 86a6528 Warm sunlight. Valentine's sun colour and intensity, kept real-time (no bake).

  9. 05fd148 Safe respawns. Being able to pick the last container exposed a spawn on a dragonfly's route; it killed you within 4 s without you moving. The respawn now skips any container within 1 m of a predator's hunting range (SpawnSafeDistance). Five of the seven spawns remain.

  10. 95fa5f6 Nectar quest fix. The quest no longer completes on the first frame. You start at half a bar, which wasn't counted as hungry, so with quests that stay done it was a free +50.

  11. eee03f8 In-headset HUD in the Module 2 style. Module1HUD is built from code like Module2HUD:

    • top left: timer with a rain icon, and energy and blood bars
    • top right: score
    • left grip: the life-cycle quest card
    • toasts when a quest completes
    • bottom prompt for the predator, hunger and blood warnings
    • death and time-out cards

    Their PlayerUI still runs as before; its canvases are just not drawn, and the HUD mirrors its state. All Lao text is read from their scene objects, except the blood warning, which only existed inside Warning2 UI.png. Its sentence is in Module1HUD.BloodWarningText: please have a Lao speaker check it. The font is the full Lao font from module-2-improvements, with kerning off, because it added a visible gap in ງງ.

Not re-applied (needs a decision)

  • Our old HUD's intro screen and objective arrow. The new HUD (11) restyles their game rather than porting our old Module1HUD.
  • Baked lighting on the Module 1 scene. It needs a rebake in the editor on their layout.
  • Our dragonfly predator and identifier typo fixes. Their own predator replaces the first, and their code uses the original names.
  • The module-select start menu (module-select-menu), versus their Startup Menu_New flow.
  • The 'timer starts after the intro' rule. It belongs to our HUD's intro card.
  • Framework edits. Our side never changed these files, so they are theirs now. Worth a look:
    • Hard-coded IPs: WebSocketConnector desktop mode connects to 192.168.68.50, and the MenuController default is 172.20.10.2.
    • SimulationManager sends the world position instead of the local position. That is probably right for their rig, but in XR Device Simulator mode it adds the rig position twice.

Worth checking

  • Shared prefabs now carry their Module 1 additions into Module 2 and 3.
    • The jar, bucket, tyre and flowers have a disabled QuickOutline and an InteractableObject.
    • PF_Lao_House_One_FloorV2 has a new roof BoxCollider. Its underside is about 1.8 m above the prefab's origin, so check whether it gets in the way in Module 2 and 3.
  • Team Assets/UI/Sprites/Main Menu.unity, an old UI test scene, references five sprites that no longer exist. This was already the case in their repo.

Verification

  • Script check: no script outside Module 1 refers to anything our version had and theirs doesn't (Module1HUD, GameOverReason, DangerSource and so on).
  • Asset check:
    • No duplicate GUIDs, apart from the old NativeWebSocket/ copy outside Assets/, which main already has.
    • No reference that resolves on main or in their repo is broken here, apart from the five sprites above.
  • Compile: opened the project on this branch in Unity 6000.3.8f1 (batchmode): all assets imported and every script compiled with no errors.
  • Not done: play mode, and a run on the headset.

From now on, Module 1 work should happen in this repo, on a branch off main, so the two copies don't drift apart again.

BiyuBoy and others added 14 commits August 10, 2026 13:49
The up-to-date Module 1 was developed in a separate repository,
https://github.com/Vathsana7/Mosquito-Project-Final (branch New_Boy, 660f0e6,
2026-09-05). Its first commit was a file copy of this repo's main at e8d4b7d
(2026-06-01), so its 32 commits are grafted onto e8d4b7d here, keeping their
authors, dates and messages.

This merge takes their side for everything:

- Assets/1.TeamWorkspace/Module1 is exactly their GameTesting/ folder. Our
  Module 1 work since the fork (HUD, intro/end screens, ProboscisBloodFill,
  DangerSource rename, desktop controls, baked lighting) is dropped here and
  re-applied selectively in the commits that follow. Their main scene keeps
  its new name, Main Scene.unity (same GUID as Module_1_MainScene.unity).
- Every other asset they changed, added, moved or deleted takes their version
  (matched by GUID, not by git's rename guesses). Assets they did not touch
  keep ours, so Module 2 and the rest of main are unchanged.

Exceptions, where taking theirs literally would break something:
- Fantasy Skybox FREE: both sides imported the same package; it stays at
  Assets/Packages/ instead of being duplicated under Imported by Simple/.
- README.md and Mosquito-Project-Final.slnx: their repo's own files, not taken.
- Packages: ours plus their com.unity.2d.sprite.
- Tags: union of both. Their layer WorldBoarder moves from 7 to 10, because
  Module 2 already uses 7-9 (Camera, Ground, Wall); the one object on it, the
  Main Scene "Environment", moves with it. Nothing masks on that layer.
- Build settings: theirs (Startup Menu_New, IP Menu, Main Scene), paths under
  Module1/; Module_2_MainScene stays listed but disabled.
Re-applies two fixes from our side that the merge replaced with the team's
versions:

- WaterContainer waits for GameManager to exist before checking for rain.
  The jar, bucket and tyre prefabs carry it into Module 2, which has no
  GameManager, so it threw every frame there.
- SendRecieveData (the GAMA bridge, also on Module 2's GameManager object)
  takes the score from M2Manager when there is no Module 1 GameManager,
  sends zero stage scores there, and no longer dereferences the connection
  indicator image or the last GAMA message when they are not set. OtherUpdate
  runs every frame in every state, so 'message.status' threw continuously
  until GAMA's first message arrived, in Module 1 as well.
Re-applies a04164d to the team's PlayerMain. Editor-only (#if UNITY_EDITOR)
fallback that runs when no XR controllers are present: WASD fly, Q/E down/up,
arrows or right-mouse look, Space = A (drink / mate / lay eggs, and restart
after a death or time-out), T = thermal vision, Tab = quest list. Parks an XR
Device Simulator if the scene has one, and shows a small on-screen readout.
Builds for the headset are unaffected.
Re-applies ProboscisBloodFill from 8759dfd (same script GUID) on the team's
snout, Main Camera/Camera/Capsule in Main Scene. A blood-red column grows from
the tip as Current_Blood rises, the snout tints red, the column throbs while
blood is being drawn, and it empties when eggs are laid.

Two changes so it works with the team's code and scene:
- 'Feeding' is read from Drink.cs parenting the player to a Human while A is
  held, since the team's PlayerMain has no interaction state.
- The team's snout capsule is rotated the other way (-90 deg on X), so the tip
  end is found at start as the end furthest along the camera's view direction.
… first bite

Drink.cs played the 'Blood' particle burst on the first press of A on a
person, so it fired as feeding started. PlayerMain.Drink now plays it once,
on the frame Current_Blood reaches Max_Blood, marking the end of the meal.
Re-applies the scene part of 92004b9 (Valentine, 'shaders + toon shader
material'): 38 material overrides on 27 prefab instances (houses, fences,
props) now point at the M_SimpleLit materials, as they did in our scene.
Only the material overrides were carried over; the team's own changes to
those instances are kept. Two renderers from the old scene no longer exist
and were skipped.
Unused, and it pulls the test framework into the player build. Same fix as
on module-select-menu.
Ports e2a8575 (module-1-improvements, "Make targeting a bit easier") and the
gameplay rules from 8759dfd onto the team's PlayerMain, keeping their bars,
particles, per-stage scores, respawn and restart flow.

Flight
- Rigidbody interpolation and continuous collision: the headset camera rides
  this body, and without interpolation it only moved on the 50 Hz physics
  clock while the Quest draws at 72-90 Hz (judder).
- Velocity is written in FixedUpdate and swept against the level: the
  mosquito slides along walls and fences instead of buzzing against them, is
  pushed back out of anything it has sunk into, and is put back where it last
  had ground under it if it falls below FallThroughY (-3).
- Forward flies where you look (PitchInfluence 1, 6 degree dead zone); the
  right stick is still the up/down thruster. Set PitchInfluence to 0 in the
  inspector for the old level-only flight.

Reach
- Drinking, mating and laying eggs no longer need the few-millimetre-thick
  proboscis trigger to touch the target. PlayerMain picks whatever is within
  InteractionRange (0.5) of the head and in front of it, preferring things
  that are useful right now; Drink.cs is now only a marker on the snout.
  Ranges are scaled to this rig (body radius 0.075, snout 0.2), not ours.
- The QuickOutline highlight now follows that target instead of proboscis
  contact, so the outlined object is the one A will act on.
- While feeding, the mosquito rides the person or flower kinematically
  instead of as a parented dynamic body (which jittered and pushed through
  things). A press of A just before arriving still counts (0.3 s buffer).

Rules
- Eggs need standing water: only rain-filled containers take them.
- One full blood meal is one clutch: each egg costs a quarter of the bar, so
  four eggs can be laid off one feed (was: each egg emptied the bar).
- Quests latch: once done they stay green and pay out once. The blood and
  hunger warnings follow the live state instead.
- Nectar burst plays when you start drinking (unchanged); the blood burst on
  a full bar (a3d1ff6).

Also: BornFromWater can now pick the last filled container, and no longer
throws when none starts filled.
Takes the sun colour and intensity Valentine chose for the baked village
(warm 0.92/0.79/0.57 at 0.8 instead of white at 1.0) without baking: the
light stays real-time, so nothing else in the scene changes.
BornFromWater now skips filled containers within SpawnSafeDistance (1 m) of a
predator's trigger, measured along a roaming dragonfly's whole patrol line.

Found with the playtest harness: the FishTower spawn sits on RoamingDragonfly
(1)'s route, so it locked on within a second and killed the player at 4 s
without them moving. The team's code never picked the FishTower only because
Random.Range(0, Count - 1) skipped the last container; e3a9c7c fixed that
off-by-one and so exposed the spawn. PF_TireWithWater (5) is also excluded
(0.4 m from a frog's trigger). Five of the seven spawns remain.
The player starts at half a nectar bar, and ishungry only turned on below
half, so 'drink nectar' counted as done (+50) on frame 0. In the team's code
it went red again a frame later; with quests now latching (e3a9c7c) it
stayed done for free. Start hungry instead: the quest completes when the bar
is actually drunk full, and the hunger warning shows from the start as it
already did one frame in.
…o text

Module1HUD is built from code at runtime like Module2HUD (same palette,
rounded dark panels, procedural sprites, head-following with a smoothed
look direction, on the UI layer that the rig's overlay camera already draws
on top of the world):

- top left: timer (pulses in the last 10 s) with a rain drop while it rains,
  energy (nectar) and blood bars; top right: score and the GAMA dot
- left grip: life-cycle card with done/open marks and eggs n/4
- toasts when a quest completes ('<quest>  +50')
- bottom prompt for the predator (white on red, plus a red wash), hunger and
  blood warnings
- death and time-out cards; time-out shows the per-stage scores beside the
  team's labels

It is a skin over the team's game: GameManager, PlayerMain and QuestSystem
still drive their PlayerUI exactly as before. The HUD switches off that UI's
Canvas components (the objects stay, since the scripts toggle them) and
mirrors its state each frame. Every Lao label is read from the scene object
that showed it, so the team can still edit the text there. The blood warning
only existed as a picture (Warning2 UI.png); its sentence is in
Module1HUD.BloodWarningText.

Font: 'Lao_SomVang Full SDF' from module-2-improvements (same file), with
kerning off - it carries a pair that opened a gap in 'ງງ' (ພະລັງງານ); the
team's font has no kerning. The rig is scaled 1:100 and TextMesh Pro draws
nothing at the world scale a HUD at 1.2 m would need, so it floats 10 rig
units out and is sized to cover the same angle as Module 2's.

GameManager adds the component in Awake; QuestSystem gains IsDone(i).
Checked every state in the editor with the playtest harness: gameplay, quest
card, quest toast, danger, hunger and blood warnings, death, time-out.
@RomeXO10
RomeXO10 merged commit a45c9df into main Oct 6, 2026
1 check passed
@RomeXO10
RomeXO10 deleted the module-1-integration branch October 6, 2026 02:10
RomeXO10 added a commit that referenced this pull request Oct 12, 2026
Laying all four eggs used to change nothing: the last quest turned green
and the player flew around until the five-minute timer ran out. Now
QuestSystem calls GameManager.Victory when the egg quest latches. It stops
the timer, freezes the player (PlayerMain.Playing) and shows the time-out
score card. Module1HUD gives that card a green title, "ພາລະກິດສຳເລັດ!"
(mission complete, built on the quest card's own word ພາລະກິດ). As after a
time-out, the next button press goes back to Startup Menu_New instead of
starting a new life.

From PR #56 (module-1-improvements), the only part of it that the
Module 1 integration (#58) did not carry over. Rewritten for the team's
GameManager, which has no end-reason enum or win screen.

Checked in the editor with a batchmode bot: four Space presses in a filled
container -> eggs 4, Won true, Playing false, card shown with the win
title, timer frozen at 297, no movement on W, and the next press loads
Startup Menu_New.
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.

4 participants