Commit Graph

57 Commits

Author SHA1 Message Date
Vaillant Jeremy 81e6ceb003 Silence Godot 4 editor warnings (debugger)
Address every warning that surfaced in the running game's debugger:

- Drop deprecated 'graph_offset = Vector2(...)' lines from the three
  in-tree VisualShader resources (red.tres, green.tres,
  Summary.tscn). The property is editor-only graph pan, ignored at
  runtime but warns at load.
- Add android/.gdignore so Godot stops scanning the build template
  copies of red.tres/green.tres (which still had graph_offset). Tighten
  .gitignore to keep tracking the .gdignore marker only.
- Drop the broken 'nodes/fragment/connections = ...' line from the
  inline VisualShader in Summary.tscn — connections referenced
  out-of-bounds ports (e.g. port 1 on a 1-output node). The
  pre-compiled 'code = ...' string is kept so rendering is unaffected.
- Drop the orphaned 'ext_resource WarCraft.lmbake' from WarCraft.tscn:
  the LightmapGI node no longer references it but Godot still loaded
  the (Godot-3-format) blob from the ext_resource declaration alone,
  triggering '(p_data.size() % 4) != 0'.
- Animation tracks: SlideReset (Template.tscn), BorderAnim
  (Loading.tscn), and ObjectFindAll (ListObjects.tscn) each had a
  bezier track with empty PackedFloat32Array keys, which
  AnimationMixer rejects in Godot 4. Drop the empty x track in each
  (the y track held the actual motion).
- Re-save 57 .mesh files via scripts/migrate_misc.gd so the surface
  format is the current Godot 4 variant. sm_stackgold.mesh in
  particular triggered the deprecation warning every load.

GDScript: rename function parameters and locals that shadowed
Node.name / Node.value in:
- db/MScene.gd (set_lock, set_mesh, set_tick_reference, set_value)
- scripts/Setting.gd untouched (no shadow, false positive earlier)
- scenes/UI/choose_scenes/ChooseScene.gd (_load_scene, _build_path,
  _build_method)
- scenes/levels/Levels.gd (_create_animation_slide,
  _create_animation_warning, _add_animation_to_player,
  _create_button_info, _node_object_list)

lod plugin: Godot 4 added 'lod_bias' as a native property on
VisualInstance3D, which collided with the plugin's 'lod_bias' member
across all five lod_*.gd files. Rename to 'lod_distance_bias' so the
scripts parse again. Also drop Light3D.shadow_color writes in
lod_omni_light.gd and lod_spot_light.gd — that property was removed
in Godot 4, so the related shadow_value computation became dead code.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 21:28:22 +02:00
Vaillant Jeremy 601bc649dd Center menu button labels: clear stale Main.tscn overrides
Summary.tscn was correctly set up (Label anchored to full button rect,
horizontal/vertical_alignment = 1). But Main.tscn — which instances
Summary.tscn as UI_summary — had per-Label overrides that reset the
anchors back to 0 and shrunk the Label rect to 1x23 px (legacy from
Godot 3 where margin-based positioning was the default), making the
text render in the top-left 1 px corner.

Drop the layout_mode=0 / anchor_right=0 / anchor_bottom=0 / offset_*
overrides on each ButtonPuzzle/Setting/Credits/Quit Label so they
inherit Summary.tscn's full-rect anchors and the centered alignment
becomes visible.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 21:08:54 +02:00
Vaillant Jeremy 5148599e33 Fix Summary.tscn vertical separator: stretch_mode 2 -> 1
In Godot 3 the TextureRect stretch_mode enum included a deprecated
"Scale on Expand" at value 0, so Tile=2. Godot 4 dropped that value
and shifted everything down: Tile is now 1. The convert-3to4 tool
does not remap enum values, so the separator at the right edge of
the menu kept Godot 3's Tile=2, which Godot 4 reads as Keep — the
texture rendered once at natural size at the top instead of tiling
down the full menu height.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 20:57:38 +02:00
Vaillant Jeremy 6f3f8b8f64 Wire up UI in Godot 4: fonts, translations, layout, fog, shadow
Discovered while playtesting the migrated build. Each fix has a
specific Godot-3-to-4 cause that the --convert-3to4 tool did not catch.

Fonts:
- Replace 4 .tres font wrappers (MKX_Base, kirsty_base/medium/title)
  with FontVariation pointing at the .otf/.ttf source. Godot 3
  DynamicFont with size= and font_data= is invalid in Godot 4 (those
  properties don't exist on FontFile).
- Apply size 46 via theme_override_font_sizes/font_size on the 5
  Labels that used kirsty_title.tres (LabelLoading + 4 in Summary).
- Drop the broken VisualShader text_outline.material from the 4
  Labels in Summary — Index p_from_port errors in Godot 4 meant
  COLOR was never written, so text rendered invisible.
- Migrate VisualShader nodes inside text_outline.material (compressed
  asset; updated by the inspect/migrate scripts).

Translations:
- Move project.godot section from [locale] (Godot 3) to
  [internationalization] with locale/translations=... (Godot 4). The
  old section was silently ignored so tr() returned the raw msgid.
- Adjust Setting.translate_int_to_locale to return "en"/"fr" to
  match what the .po files declare (was "en_GB"/"fr_FR", which Godot
  3 fell back from automatically but Godot 4 does not).

Label alignment (Godot 3 names not auto-renamed):
- align -> horizontal_alignment, valign -> vertical_alignment across
  9 .tscn files.

Background / Loading / ChooseScene layout:
- Rewrite Background.tscn from a VisualShader-textured Panel to a
  plain TextureRect (the visual shader connection ports went out of
  bounds in Godot 4, leaving the panel grey on scene reload).
- Set layout_mode=1 + anchors_preset=15 on BackgroundPicture
  instances in Main.tscn and Loading.tscn — Godot 4 inheritance no
  longer applies the .tscn-root's anchors to an instanced child
  unless layout_mode is set to Anchors mode explicitly.
- Replace scroll_horizontal_enabled (Godot 3) with
  horizontal_scroll_mode/vertical_scroll_mode (Godot 4) on
  ChooseScene's ScrollContainer.
- Add theme_override_styles/panel = StyleBoxEmpty on the
  ScrollContainer (Godot 4 ScrollContainer ships a default dark
  panel style that Godot 3 did not).
- Hide BackgroundTile in Template.tscn — it points at
  UI-level-btn-shadow.png (228x228, 83% opaque black) which used to
  render at natural size in Godot 3 but is stretched to fill the
  456px rect in Godot 4, leaving a big black square below each
  thumbnail. The proper drop-shadow needs a shader or 9-patch.
- TextureRect.expand=true (Godot 3) -> expand_mode=1 (Godot 4) on
  ThumbnailLevel and TopPart's content rects.

Lighting:
- background_mode 3 (which used to mean Sky in Godot 3) -> 2 (Sky in
  Godot 4; 3 is now Canvas, producing a black background).
- background_sky -> sky, background_energy -> background_energy_multiplier,
  fog_color -> fog_light_color, fog_height_min -> fog_height; drop
  fog_height_enabled / fog_height_max / fog_height_curve /
  dof_blur_far_distance (no longer exist).
- Add fog_mode = 1 so Godot 4 uses fog_depth_* instead of the new
  default fog_density-based exponential fog (which rendered as a
  thick white cloud).
- ambient_light_energy 1.55 -> 0.4 — the new pipeline interprets
  the value much more strongly so 1.55 produced a saturated pink scene.
- Remove the light_data = ExtResource(41) reference to
  WarCraft.lmbake — Godot 3 baked lightmap binary format is
  incompatible with Godot 4. Re-bake in editor when ready.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 20:55:47 +02:00
Vaillant Jeremy 4d5db7bb61 Make Main, Settings, ChooseScene, and gameplay run in Godot 4.6
Catch-all commit for everything the --convert-3to4 tool missed during a
manual playtest of the game. All errors raised by clicking through Main
-> Puzzles -> level were fixed.

GDScript:
- PackedScene.instance() -> instantiate() (ChooseScene.gd)
- String(x) constructor doesn't exist -> str(x) (MBase, MScene,
  MLevel, Animation, Levels)
- 'x as int/String/bool' doesn't parse strings -> explicit
  int()/str()/bool(int()) (MScene, MLevel, MSetting)
- BaseButton.pressed (property) -> button_pressed; set_pressed() ->
  direct assignment (Settings.gd)
- AnimationPlayer.add_animation() removed -> go through
  AnimationLibrary (Levels.gd)
- PhysicsDirectSpaceState3D.intersect_ray(from, to, ...) ->
  PhysicsRayQueryParameters3D.create() (Levels.gd)
- @export with type-hint-in-comment ('# (String, ...)') -> explicit
  @export_enum (candle.gd)
- Get effective material with get_active_material() instead of
  get_surface_override_material(), with null guard (Levels.gd)
- get_node() -> get_node_or_null() so missing items from ahog.json
  (e.g. sm_super_dager in Home) don't crash (Levels.gd)

Scenes/resources:
- Remove 14 Tween nodes from WarCraft.tscn — Tween is no longer a
  Node in Godot 4. Rewrite Animation.start_dissolve to use
  create_tween().tween_method().
- Rename property material/N -> surface_material_override/N in every
  .tscn (10 files) — Godot 3 -> 4 rename that --convert-3to4 missed.
  Without this, MeshInstance3D.get_active_material(0) returned the
  glTF-imported StandardMaterial3D instead of the project's custom
  dissolve ShaderMaterial.

Shaders:
- One-shot scripts/migrate_shaders.gd walks every .material under
  assets/ and fixes Godot 3 -> 4 shader code in-place. Fixed 17
  materials: depth_draw_alpha_prepass -> depth_prepass_alpha,
  hint_color -> source_color, NORMALMAP -> NORMAL_MAP.

Result: Main, Settings, ChooseScene, and the WarCraft level all run
without script or shader errors. Remaining noise is non-blocking
(visual_shader graph in text_outline.material, baked lightmap binary
format from Godot 3, and empty animation tracks).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 19:40:03 +02:00
Vaillant Jeremy 770434482d Fix Setting.gd Vector2/Window API, re-import all assets for Godot 4
- apply_resolution: Vector2 strings -> Vector2i(int, int); use
  Window.content_scale_size instead of removed
  Viewport.set_size_2d_override variants.
- Re-import 162 assets to Godot 4 format (.godot/imported/ now,
  .stex -> .ctex, FontFile, CompressedTexture2D, etc.).
- Add .uid sidecars Godot 4 generates next to every script.
- Ignore .godot/ cache and android/ template directories.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 19:26:10 +02:00
Vaillant Jeremy 01ea3af253 Run godot --convert-3to4 (automated conversion)
Apply Godot 4.6 automated conversion: renames Spatial.translate->position,
margin_*->offset_*, tool->@tool, .empty()->.is_empty(), DynamicFont->FontFile,
onready->@onready, export()->@export, and many more.

127 files changed by the tool. Manual fixes still required for:
 - godot_db_manager plugin (incompatible APIs: WindowDialog, Tabs, etc.)
 - lod plugin (Spatial -> Node3D renames)
 - ResourceLoader.load_interactive removed -> load_threaded_request
 - OS.set_window_fullscreen removed -> DisplayServer
 - Viewport.set_size_override removed

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 19:18:27 +02:00
darknight 1883355678 feature/connect-level-and-reset-btn (#77)
Co-authored-by: VAILLANT Jeremy <vaillant.jeremy@dev-crea.com>
Reviewed-on: Athena/game-source#77
Co-authored-by: darknight <vaillant.jeremy@dev-crea.com>
Co-committed-by: darknight <vaillant.jeremy@dev-crea.com>
2021-06-06 16:54:38 +02:00
darknight 213847e95c feature/templating-level (#74)
Co-authored-by: VAILLANT Jeremy <vaillant.jeremy@dev-crea.com>
Reviewed-on: Athena/game-source#74
Co-authored-by: darknight <vaillant.jeremy@dev-crea.com>
Co-committed-by: darknight <vaillant.jeremy@dev-crea.com>
2021-06-05 14:11:47 +02:00
stilobique dee1ee5b1b feature/select-puzzle-update (#72)
Si tu peut regarder pour finir la pull request pour l'écran de selection des puzzles !

Co-authored-by: stilobique-i7 <aurelienvlt@free.fr>
Co-authored-by: VAILLANT Jeremy <vaillant.jeremy@dev-crea.com>
Reviewed-on: Athena/game-source#72
Co-authored-by: stilobique <aurelienvlt@free.fr>
Co-committed-by: stilobique <aurelienvlt@free.fr>
2021-06-04 17:54:23 +02:00
darknight 6f1ac4d03f Fix loading scenes (#70)
Co-authored-by: VAILLANT Jeremy <vaillant.jeremy@dev-crea.com>
Reviewed-on: Athena/game-source#70
Co-authored-by: darknight <vaillant.jeremy@dev-crea.com>
Co-committed-by: darknight <vaillant.jeremy@dev-crea.com>
2021-06-03 23:17:53 +02:00
darknight d1bf0f76d8 Fix case and move single script in folder scripts (#69)
Co-authored-by: VAILLANT Jeremy <vaillant.jeremy@dev-crea.com>
Reviewed-on: Athena/game-source#69
Co-authored-by: darknight <vaillant.jeremy@dev-crea.com>
Co-committed-by: darknight <vaillant.jeremy@dev-crea.com>
2021-06-03 22:53:49 +02:00
darknight 0debe0d2d3 feature/update-main-ui (#66)
Co-authored-by: stilobique-i7 <aurelienvlt@free.fr>
Co-authored-by: VAILLANT Jeremy <vaillant.jeremy@dev-crea.com>
Reviewed-on: Athena/game-source#66
Co-authored-by: darknight <vaillant.jeremy@dev-crea.com>
Co-committed-by: darknight <vaillant.jeremy@dev-crea.com>
2021-06-03 22:18:50 +02:00
darknight 1c45fac8cb Disconnect signal if exist (#62)
Co-authored-by: VAILLANT Jeremy <vaillant.jeremy@dev-crea.com>
Reviewed-on: Athena/game-source#62
Co-authored-by: darknight <vaillant.jeremy@dev-crea.com>
Co-committed-by: darknight <vaillant.jeremy@dev-crea.com>
2021-05-31 08:52:05 +02:00
darknight ed20465f39 feature/list-object-counter (#60)
Co-authored-by: VAILLANT Jeremy <vaillant.jeremy@dev-crea.com>
Reviewed-on: Athena/game-source#60
Co-authored-by: darknight <vaillant.jeremy@dev-crea.com>
Co-committed-by: darknight <vaillant.jeremy@dev-crea.com>
2021-05-29 21:09:10 +02:00
VAILLANT Jeremy a2c2b5c894 Fix name method ambiant -> ambient 2021-05-25 14:14:17 +02:00
VAILLANT Jeremy fa9838fa87 Addd sound when user click 2021-05-25 14:14:13 +02:00
VAILLANT Jeremy 03fe0c753d Fix word ambient -> ambient 2021-05-25 14:14:03 +02:00
VAILLANT Jeremy c46cb1f41e Add setting true/false audio background in war level 2021-05-25 14:14:03 +02:00
stilobique 242f58e119 Merge branch 'dev' into feature/link-hud-to-code 2021-05-18 10:51:24 +02:00
VAILLANT Jeremy 557444f89d Refactor scene instance for HUD 2021-05-17 10:38:45 +02:00
VAILLANT Jeremy 367ee388da Fix list object 2021-05-15 20:40:16 +02:00
stilobique-surface 73d811a35b Update select scene item, clean old button reset and add *button reset* and *button large*. 2021-05-15 17:29:18 +02:00
VAILLANT Jeremy 890931faa8 Link back button to quit code main menu 2021-05-15 17:17:12 +02:00
darknight 3d37ec00a6 Merge branch 'dev' into feature/save-state-scene 2021-05-15 16:42:32 +02:00
VAILLANT Jeremy 6980458eec Get count element 2021-05-15 16:37:52 +02:00
stilobique-surface c85c878ba7 Interface list :
- generate a subscene to control the list HO
- add back button on Warcraft Scene
2021-05-15 16:27:05 +02:00
VAILLANT Jeremy 7fa7228232 Create method for labels and button to template 2021-05-15 14:14:17 +02:00
VAILLANT Jeremy 6b9e476b00 Use dbb for levels 2021-05-15 14:05:09 +02:00
Vaillant Jeremy ae31945fd8 Fix template select scene 2021-05-15 12:13:37 +02:00
Vaillant Jeremy 7561cfadf7 Change pointer mouse in button 2021-05-15 12:13:24 +02:00
Vaillant Jeremy ad3886d484 Add margin container 2021-05-15 12:13:23 +02:00
Vaillant Jeremy 772219fe8d Clean scene 2021-05-15 12:13:23 +02:00
Vaillant Jeremy b09bec6861 Add blur effect in icon game 2021-05-15 12:13:23 +02:00
Vaillant Jeremy a2d8cdb3da Fix interaction menu 2021-05-15 12:13:23 +02:00
stilobique-surface 74a5c3ac69 Reordering scene, and setup basic scene instance on main view 2021-05-15 12:13:23 +02:00
VAILLANT Jeremy 9eddf8b812 Add useless variables & add id scene 2021-05-14 22:23:57 +02:00
VAILLANT Jeremy 23e8bef1b8 Use BDD for list scenes 2021-05-13 23:20:56 +02:00
VAILLANT Jeremy 3238c76822 Configure gyroscope and settings 2021-05-13 23:20:27 +02:00
VAILLANT Jeremy 9ef437a558 Remove useless spaces 2021-05-13 23:20:27 +02:00
VAILLANT Jeremy 41d4307c0d Remove useless node 2021-05-13 23:20:27 +02:00
VAILLANT Jeremy 5791514d43 Replace scene about by settings 2021-05-13 23:20:27 +02:00
VAILLANT Jeremy 1d0f94f39a Move files warcraft scene to folder 2021-05-12 13:10:56 +02:00
VAILLANT Jeremy aaeecb139c Close #8 - Fix loading value progress 2021-05-10 15:32:22 +02:00
VAILLANT Jeremy 1b0a81e3dc Add folder for exporting project 2021-05-10 14:41:54 +02:00
darknight 353233b0ce Merge pull request 'feature/populate-warcraft' (#27) from feature/populate-warcraft into dev
Reviewed-on: Athena/game-source#27
2021-05-10 14:37:10 +02:00
stilobique-surface cab250b73d Update list level select, add a simple label info 2021-05-10 14:24:54 +02:00
stilobique-surface 62e0eff51c Setup list map select 2021-05-10 14:18:45 +02:00
VAILLANT Jeremy c70fbdbfd7 Translate about scene 2021-05-09 23:41:47 +02:00
VAILLANT Jeremy 0de0aa262b Add translate for loading scene 2021-05-09 23:32:43 +02:00