1595 Commits

Author SHA1 Message Date
Adrien Ufferte 8f4a1be939 Cleaning code for cloud manager 2026-05-26 16:40:56 +02:00
Adrien Ufferte 606b87d1b2 Last 3 gardens 2026-05-26 15:56:41 +02:00
Adrien Ufferte ab1ad7f27e Red Parakeet garden (09) 2026-05-26 14:30:58 +02:00
Adrien Ufferte 847f04c5a7 Monkey garden (08) 2026-05-26 14:11:52 +02:00
Adrien Ufferte b16580094e Frog garden (07) 2026-05-26 13:47:58 +02:00
Adrien Ufferte e5d628897c Garden Caterpillar (06) 2026-05-26 11:32:46 +02:00
Adrien Ufferte fdd597f5d6 Yellow Parakeet garden (05) 2026-05-26 11:08:06 +02:00
Adrien Ufferte 942a3b47ec Gardens animals transform normalization 2026-05-26 10:55:25 +02:00
Adrien Ufferte 953260c31d crabs garden 2026-05-26 10:51:29 +02:00
Adrien Ufferte 7ce680d14c Ant garden (03) 2026-04-30 16:15:13 +02:00
Adrien Ufferte bebc449f56 cleaning 2026-04-30 16:15:13 +02:00
Adrien Ufferte 6f0163a8db Stratify garden clouds in scroll-space, not world-space
Initial spawning placed clouds uniformly across [0, spawn_width], which
broke down at the edges of the scroll range whenever the parallax factor
was anything other than exactly 1.0:

- With parallax < 1.0 (background feel), a cloud is only ever visible at
  scrolls in [(drift_x - screen_w) / parallax, drift_x / parallax]. So a
  far cloud at drift_x near spawn_width (e.g. 28000 with parallax 0.5)
  needs scroll ~56000 to be seen, far beyond max_scroll. About half the
  spawn range was a dead zone the user could never reach.

- With parallax > 1.0 (foreground feel — what the gardens scene now uses),
  the opposite happens: clouds visible at the right edge of the scroll
  range live at drift_x = max_scroll * parallax + screen_w, which is well
  past spawn_width. The right side of the gardens stayed empty because no
  cloud was ever spawned that far out.

Add a max_scroll parameter to configure_world() and stratify in scroll
space: each cloud gets a target_scroll value in its own slot of
[0, max_scroll], and its drift_x is placed at target_scroll * parallax +
horiz_jitter. The cloud's drift_x range now matches the scroll positions
where it can actually be visible, regardless of whether parallax is below
or above 1.0. _reset_cloud is updated correspondingly to wrap clouds to
the right edge of their individual visibility range rather than the
world's right edge.

Also have configure_world refresh screen_width every call so the manager
picks up the correct viewport size even when the parent invokes it later
in the ready sequence.
2026-04-30 16:15:13 +02:00
Adrien Ufferte ad571da545 Spread initial cloud spawn positions via stratified sampling
Replace pure randf_range across the spawn width with stratified placement:
the spawn range is split into N equal slots (N = number of clouds) and each
cloud is placed at a random position inside its own slot. This caps the
maximum gap between clouds at one slot width, eliminating the "all clouds
on one side" failure mode of independent random draws while keeping each
cloud's exact position random within its band so the layout still feels
natural rather than grid-regular.

The sprite list is shuffled before slot assignment so identical duplicated
templates don't end up in adjacent slots in scene-tree order.
2026-04-30 16:15:13 +02:00
Adrien Ufferte 63436f1782 Anchor garden clouds to world coordinates for recycling
Previously clouds in the gardens recycled based on their rendered (viewport)
position. When the user scrolled to the far right, parallax pushed every
cloud's rendered X far into the negative, triggering all of them to wrap
to the right viewport edge. Their drift_x was thus warped to roughly
scroll_offset + screen_width — so when the user scrolled back left, every
cloud sat in the world to the right of the visible area, leaving the left
side of the gardens empty.

Switch CloudsManager to use world-anchored recycling whenever spawn_width
is set: a cloud is only recycled when its drift_x (its world coordinate)
falls past the world's left edge, and it respawns at the world's right edge
rather than the viewport's. The legacy viewport-anchored path is preserved
for the minigames that don't set spawn_width.
2026-04-30 16:15:13 +02:00
Adrien Ufferte de395ab036 Add scrolling clouds to the gardens scene
Extend CloudsManager with optional scroll-driven parallax and auto-population:

- New scroll_offset property feeds an external horizontal scroll value;
  each cloud's rendered X is drift_x - scroll_offset * parallax_factor.
- min_parallax_factor / max_parallax_factor are interpolated by the same
  depth factor that drives speed and scale, so closer clouds parallax more.
- spawn_width + clouds_per_screen + configure_world() let the manager
  duplicate its template children to cover wider scrollable worlds.
- Defaults preserve the previous behavior, so parakeets / penguin / monkeys
  / boss minigames keep their existing per-frame drift unchanged.

In gardens.tscn, add a CloudsLayer (CanvasLayer, layer = 1) on top of the
existing UI with three template cloud sprites (transparent via modulate
alpha, mouse passthrough by virtue of being Sprite2D). gardens.gd configures
the cloud world width to garden_count * GARDEN_SIZE after lessons are set
up, then forwards scroll_container.scroll_horizontal to clouds.scroll_offset
each frame so clouds drift naturally and parallax with garden scrolling.
2026-04-30 16:15:13 +02:00
Adrien Ufferte a58e59f656 New garden 02 (and cleaning) 2026-04-30 16:15:13 +02:00
Adrien Ufferte 5553394a2c Merge pull request #317 from Excello-Recherche-Education/prof-tools-bug
Prof tool 1.4.1 export settings
2026-04-30 16:09:19 +02:00
Adrien Ufferte e6a8655bb8 Prof tool 1.4.1 export settings 2026-04-30 16:07:49 +02:00
Adrien Ufferte e35b3766e1 Merge pull request #316 from Excello-Recherche-Education/prof-tools-bug
Debug save sentences modified
2026-04-30 15:52:42 +02:00
Adrien Ufferte 750fe21da2 Debug save sentences modified 2026-04-30 15:50:11 +02:00
Adrien Ufferte 728819cac1 Fix ScrollContainer single-child warning in gardens scene
Move BossButtons, LockedLine and UnlockedLine out of the ScrollContainer
so it only contains the HBoxContainer that drives its scroll size.
BossButtons now tracks scrolling via a manual position offset in _process,
mirroring what the lines and parallax background already do.
2026-04-28 14:00:45 +02:00
Adrien Ufferte 6b86d35dfe Penguin text alignment 2026-04-28 12:06:34 +02:00
Adrien Ufferte 512038313c debug-coconut-text 2026-04-27 15:53:22 +02:00
Adrien Ufferte c4f59ef274 Merge pull request #315 from Excello-Recherche-Education/penguin-signs
Take opener and terminator sign in sentences for the penguin minigame
2026-04-27 13:57:59 +02:00
Adrien Ufferte 810f504a16 Take opener and terminator sign in sentences for the penguin minigame 2026-04-27 13:45:45 +02:00
Adrien Ufferte a6455cbbe5 Merge pull request #314 from Excello-Recherche-Education/turtle-text-center
Centers text on turtles, and make font a little smaller to fit double…
2026-04-27 11:10:02 +02:00
Adrien Ufferte f95ff50c15 Centers text on turtles, and make font a little smaller to fit double letters 2026-04-27 11:06:48 +02:00
Adrien Ufferte 6f00c4cc4b Merge pull request #313 from Excello-Recherche-Education/turtles-disappear-speed
Turtles disappear quickly when colliding with each other
2026-04-27 10:49:33 +02:00
Adrien Ufferte 91f4d57ef7 Turtles disappear quickly when colliding with each other 2026-04-27 10:46:11 +02:00
Adrien Ufferte f1b16cde17 Merge pull request #312 from Excello-Recherche-Education/parakeets-letters
Parakeets maximum letters = 1
2026-04-24 16:07:27 +02:00
Adrien Ufferte 06019e97d2 Parakeets maximum letters = 1 2026-04-24 15:57:26 +02:00
Adrien Ufferte b80eac1313 Merge pull request #311 from Excello-Recherche-Education/debug-highlight
Debug highlight fx system
2026-04-24 15:44:22 +02:00
Adrien Ufferte cf46d84b56 Debug highlight fx system 2026-04-24 12:06:13 +02:00
Adrien Ufferte a37dbd9dd7 Merge pull request #310 from Excello-Recherche-Education/debug-difficulty
Debug difficulty system
2026-04-24 11:09:07 +02:00
Adrien Ufferte 1d387d1ea6 Debug difficulty system 2026-04-24 10:41:40 +02:00
Adrien Ufferte a1faf7e154 Merge pull request #309 from Excello-Recherche-Education/add-moving-clouds
Add moving clouds
2026-04-24 09:24:18 +02:00
Adrien Ufferte d4c883da47 Add moving clouds to penguin minigame 2026-04-23 17:09:06 +02:00
Adrien Ufferte 9c6ffa1b28 Add clouds to monkeys minigame 2026-04-23 17:03:11 +02:00
Adrien Ufferte 0a51a42410 Merge pull request #308 from Excello-Recherche-Education/optimize-monkeys-minigame
Optimize monkeys minigame
2026-04-23 16:54:39 +02:00
Adrien Ufferte 3c4d85f032 Nomenclature 2026-04-23 16:43:33 +02:00
Adrien Ufferte 915b6c45ee Further optimize monkeys initialization 2026-04-23 16:33:24 +02:00
Adrien Ufferte d2b406da06 Optimize monkey architecture for coconut and fx 2026-04-23 16:09:35 +02:00
Adrien Ufferte bac87eb46a Add frame delay in _setup_minigame() to optimize minigame loading and avoid ram overload 2026-04-23 15:49:36 +02:00
Adrien Ufferte 3d8399a341 Merge pull request #307 from Excello-Recherche-Education/Improve-boss-score-gauge
Better color and special effect when victory threshold reached
2026-04-23 15:17:35 +02:00
Adrien Ufferte 72c01cc338 Better color and special effect when victory threshold reached 2026-04-23 15:15:01 +02:00
Adrien Ufferte 00face5e26 Merge pull request #306 from Excello-Recherche-Education/ants-sentence-position
Ants sentence position
2026-04-23 13:56:24 +02:00
Adrien Ufferte d9a1a35e13 Debug long sentences and background positioning 2026-04-23 12:02:33 +02:00
Adrien Ufferte 8e58ad537f Center sentence 2026-04-23 12:02:14 +02:00
Adrien Ufferte 195f2305d5 Position lower and more to the right 2026-04-23 11:30:56 +02:00
Adrien Ufferte a71f451ecc Merge pull request #305 from Excello-Recherche-Education/ants-travel-together
Ants spawn all at once and travel together
2026-04-23 11:22:10 +02:00