Commit Graph

163 Commits

Author SHA1 Message Date
Adrien Ufferte fcd84fdb35 Protect against out of bounds for minigame index 2026-06-06 18:11:45 +02:00
Adrien Ufferte 2db21b597b Minigames wheel version 2 2026-06-06 11:13:22 +02:00
Adrien Ufferte 6a45cd4fc2 Security if language pack has less than 3 exercices in lesson 2026-05-28 15:42:15 +02:00
Adrien Ufferte 9e512ec4a5 Boss buttons does not stop scrolling 2026-05-28 11:42:27 +02:00
Adrien Ufferte d55c05b53d Debug clouds "world bounds" 2026-05-28 09:31:11 +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 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 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 c6f7ef833d Cleaning 2026-04-17 10:10:58 +02:00
Adrien Ufferte 5fc11072e5 Small fixes 2026-04-16 16:12:26 +02:00
Adrien Ufferte af6ae59120 Clean nomenclature 2026-04-16 15:57:40 +02:00
Adrien Ufferte 24d77e19e0 Replace single garden scene with 12 fixed garden scenes with per-garden colors
Each garden (garden_01.tscn through garden_12.tscn) now has its own color
palette for lesson buttons (unlocked/completed fill and text colors).
Lesson count is validated to be between 12 and 60. The old dynamic
duplication of a single garden.tscn is replaced by instantiating the
correct scene per garden index.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 15:35:45 +02:00
Adrien Ufferte 8d0a07f55c cleaning variables 2026-04-16 14:01:31 +02:00
Adrien Ufferte cf49765d67 Fix path lines to read button positions from scene nodes
Path now reads actual button positions and sizes from the visible
LessonButton nodes instead of SLOT_CENTERS constants. This means
editing button positions in the Godot editor automatically updates
the path line.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 13:54:16 +02:00
Adrien Ufferte 9b90ba6d00 Small fixes 2026-04-16 13:54:16 +02:00
Adrien Ufferte aa161cf21e Reduce lesson button size by 20% (300→240px)
Buttons, pivot offsets and font size scaled down proportionally.
Same center positions preserved.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 13:54:16 +02:00
Adrien Ufferte 49d5fcd38b Replace old flower system with new plant assets and progressive reveal
- Add 8 garden plant assets (garden_plant_01 to 08) from victory assets
- Remove entire old flower system (FlowerSizes enum, flower generation,
  flower VFX transitions, flower_controls, flowers_visible, flowers_sizes)
- Remove Flower class from GardenLayout
- Plants are created programmatically in Garden._create_plants() at fixed
  positions matching the Explanation.png mockup layout
- All plants hidden by default, revealed progressively based on completed
  minigames ratio: 0 completed = 0 visible, all completed = all 8 visible
- Add lowercase file naming rule to CLAUDE.md
- Fix current_garden lookup to use _get_garden_index_for_lesson instead
  of removed flower_info system

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 13:54:16 +02:00
Adrien Ufferte 17f5048eb7 Fix: replace removed get_lesson_button_scene with constant size
Button size is fixed at 300x300 in the scene, no need to instantiate
and measure at runtime.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 13:54:16 +02:00
Adrien Ufferte b13fe0638d Hard-place 5 lesson buttons in garden scene with show/hide logic
Replace dynamic button instantiation with 5 fixed LessonButton instances
(Slot1-Slot5) positioned at hardcoded coordinates in the garden scene.
Garden._configure_slots() shows/hides slots based on lesson count using
the SLOT_SELECTION mapping (5→all, 4→skip middle, 3→1,3,5, etc.).

- Add error log if lesson count exceeds MAX_LESSONS (5)
- Remove dynamic _ensure_button_controls_count from garden.gd
- Replace position generation functions with SLOT_CENTERS constant
- Buttons are clickable via existing _set_up_lessons signal wiring

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 13:54:16 +02:00
Adrien Ufferte d45318606b Implement fixed 5-slot diagonal layout for garden lesson buttons
Buttons are placed at 5 fixed positions on a diagonal from bottom-left
to upper-right. When fewer lessons exist, evenly spaced slots are selected.
Reduced spread radius to keep all buttons inside the circle.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 13:54:16 +02:00
Adrien Ufferte 56f003d433 Simplify: remove dead code, unused exports, and duplicate colors
- Remove dead functions: _get_garden_background_image, _is_position_on_garden_texture,
  _get_garden_dimensions, and associated constants/caches
- Remove unused base_color/completed_color exports from LessonButton
  (colors now driven by constants in _update_visual_state)
- Use LessonButton.UNLOCKED_FILL_COLOR instead of duplicate Color("176d78")
- Inline garden dimensions as constant expression
- Remove unused color parameter from _handle_lesson_button
- Fix missing blank line in garden.gd constant block

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 13:54:16 +02:00
Adrien Ufferte dc83e7b4e2 Fix garden visuals: tint, sizing, button layout and colors
- Tint garden background #176d78 via modulate in set_background()
- Fix background as 1700x1700 centered square instead of stretched
- Make TextureButton self_modulate transparent so Center/Border are visible
- Diagonal lesson layout from bottom-left to upper-right matching mockup
- Center buttons on generated positions instead of top-left alignment
- Increase garden size back to 2400 with 850px circle radius

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 13:54:16 +02:00
Adrien Ufferte d9522bc922 Redesign gardens with circular layout and new ocean theme
Replace rectangular garden backgrounds with circular Garden_01.png asset,
arrange lesson buttons in a circular pattern instead of sine-wave layout,
and introduce three visual states for buttons (locked/unlocked/completed)
using the new lesson_circle.png texture. Add jellyfish mascot to gardens.

- Add new assets: Garden_01.png, lesson_circle.png, jellyfish.png
- Update garden background to use keep_aspect_centered circular display
- Implement circular lesson positioning with configurable radius
- Simplify position validation to circle-distance check
- Add layout cache versioning to invalidate old layouts
- Update boss_button.tscn to match new button design

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 13:54:16 +02:00
Adrien Ufferte 13b6c184f6 Remove useless newline 2026-03-02 12:01:31 +01:00
Adrien Ufferte f79aa14ab4 New back button system 2026-03-02 10:14:57 +01:00
Adrien Ufferte 53edf8a855 Merge branch '3.0.0' into return-loading 2026-02-26 10:26:31 +01:00
Adrien Ufferte 5def2a8a57 Fix garden layouts generation for very irregular shapes 2026-02-24 09:45:45 +01:00
Adrien Ufferte 53d927b470 Make a "hold" system for return buttons to prevent non-wanted exit of game 2026-02-23 10:50:39 +01:00
Adrien Ufferte 2d767ce3c3 Export settings 2026-02-20 13:55:28 +01:00
Adrien Ufferte ed60f793ae Lazy load of minigames 2026-02-20 13:32:27 +01:00
Adrien Ufferte edaa61f1e6 Merge pull request #244 from Excello-Recherche-Education/gardens-scroll-to-last
Scroll to last unlocked garden when arriving from login screen
2026-02-20 12:47:12 +01:00
Adrien Ufferte 9519450a55 Security 2026-02-20 12:17:35 +01:00
Adrien Ufferte ad6622592a Scroll to last unlocked garden when arriving from login screen 2026-02-20 09:36:48 +01:00
Adrien Ufferte d07996d50b Fix the logout() when back from gardens 2026-02-19 16:20:49 +01:00
Adrien Ufferte 427ffecdf3 Keep playing tutorial speeches and launch sync timer 2026-02-19 16:12:31 +01:00
Adrien Ufferte a205d9e48d Remove brain screen and some other useless assets 2026-02-19 15:52:31 +01:00
Adrien Ufferte 6df3a122cd Debug click lessons buttons 2026-02-16 16:39:48 +01:00
Adrien Ufferte 2413f2a80e Kalulu animations 2026-02-13 14:17:46 +01:00
Adrien Ufferte 05b7ad34de Merge pull request #213 from Excello-Recherche-Education/boss-new-graphisms
Boss new graphisms
2026-02-03 14:11:14 +01:00
Adrien Ufferte cfeec1e2f2 Workaround for warnings for autoloads of class instead of scripts 2026-02-03 11:52:00 +01:00
Adrien Ufferte e65f0f2be3 Boss new graphisms 2026-02-03 10:55:18 +01:00
Adrien Ufferte 2f0b62d8c2 Center view when returning from game 2026-01-26 15:27:36 +01:00
Adrien Ufferte fc3589da80 Adult check for boss defeat 2026-01-19 10:21:34 +01:00
Adrien Ufferte 95d150cebf Debug progress ratio calculation 2026-01-15 11:35:17 +01:00
Adrien Ufferte f0fdf3887d Final boss a lot harder 2026-01-15 10:45:38 +01:00
Adrien Ufferte 788a637363 Overall cleaning 2026-01-15 10:03:25 +01:00
Adrien Ufferte 98342cf87d Debug progression animation 2026-01-15 09:52:19 +01:00
Adrien Ufferte ba2cf68ee6 Nomenclature fixes 2026-01-14 16:46:49 +01:00