From 7549216be1884d419f78f4ff456bd34d398460d6 Mon Sep 17 00:00:00 2001 From: TaikoZhong <108016253+GanYiZhong@users.noreply.github.com> Date: Mon, 2 Nov 2026 14:14:24 +0800 Subject: [PATCH 1/2] Tutorial background: Fuji, cloud and dot placement, fans lower - One Fuji, one cloud and one set of dots per pattern tile, scrolling with the pattern; the Fuji sits behind the fans instead of at the top of the tile - The dots (background frame 2) are drawn, bobbing with the clouds - The fan rows sit 34 px lower Co-Authored-By: Claude Opus 5.5 --- .../collab/tutorial/donbg/0_1/texture.json | 4 +-- Scripts/background/bg_collabs/tutorial.lua | 29 +++++++++---------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/Graphics/background/collab/tutorial/donbg/0_1/texture.json b/Graphics/background/collab/tutorial/donbg/0_1/texture.json index a27d37c2..7ccb3bff 100644 --- a/Graphics/background/collab/tutorial/donbg/0_1/texture.json +++ b/Graphics/background/collab/tutorial/donbg/0_1/texture.json @@ -1,9 +1,9 @@ { "background": {}, "overlay": { - "x": 100 + "x": 207 }, "footer": { - "y": 105 + "y": 139 } } diff --git a/Scripts/background/bg_collabs/tutorial.lua b/Scripts/background/bg_collabs/tutorial.lua index 1725588d..985709c6 100644 --- a/Scripts/background/bg_collabs/tutorial.lua +++ b/Scripts/background/bg_collabs/tutorial.lua @@ -27,30 +27,29 @@ function TutorialDonBG:update(current_time_ms) self.overlay_move:update(current_time_ms) end +-- One Fuji (background frame 1), one cloud (overlay) and one set of dots (background frame 2) per +-- pattern tile, all scrolling with the pattern: the Fuji's foot behind the fans, the dots around +-- the clouds (they bob with them). The cloud's place in the tile is overlay's x in texture.json. +local FUJI_X, FUJI_Y = 39, 65 +local DOTS_X, DOTS_Y = 32, 13 + function TutorialDonBG:draw_textures(fade, y, frame) y = y + 40 + local tile = self.bg_texture.width + local bob = self.overlay_move.attribute for i = 0, 4 do tex.draw_texture(self._id_bg, { frame = 0, fade = fade, - x = (i * self.bg_texture.width) + self.move.attribute, - y = y - }) - tex.draw_texture(self._id_bg, { - frame = 1, - fade = fade, - x = (i * self.bg_texture.width) + self.move.attribute, + x = (i * tile) + self.move.attribute, y = y }) end - for i = 0, 5 do - tex.draw_texture(self._id_overlay, { - frame = frame, - fade = fade, - x = (i * self.overlay_texture.width) + - self.move.attribute * (self.overlay_texture.width / self.bg_texture.width), - y = y + self.overlay_move.attribute - }) + for i = 0, 3 do + local x = (i * tile) + self.move.attribute + tex.draw_texture(self._id_bg, { frame = 1, fade = fade, x = x + FUJI_X, y = y + FUJI_Y }) + tex.draw_texture(self._id_overlay, { frame = frame, fade = fade, x = x, y = y + bob }) + tex.draw_texture(self._id_bg, { frame = 2, fade = fade, x = x + DOTS_X, y = y + DOTS_Y + bob }) end for i = 0, 4 do tex.draw_texture(self._id_footer, { -- 2.54.0 From 882628d561b55cfed002e952ce152e49690897b4 Mon Sep 17 00:00:00 2001 From: TaikoZhong <108016253+GanYiZhong@users.noreply.github.com> Date: Mon, 2 Nov 2026 14:33:22 +0800 Subject: [PATCH 2/2] Tutorial background: fans line up and reach the lane, floor lower - The fan strips repeat every 80 px but were tiled every 600 and 520 px, so the arcs broke and overlapped where copies met; both are tiled (and scroll a whole tile per loop) every 560 px now - A third fan row fills the gap above the lane where the cloud's base showed - Fans at footer y 110, Fuji and clouds lower, matching the reference screen - The floor sits 34 px lower so the drums clear the lane; its bottom rows are cut at the bottom band Co-Authored-By: Claude Opus 5.5 --- .../collab/tutorial/donbg/0_1/texture.json | 2 +- Scripts/background/bg_collabs/tutorial.lua | 38 ++++++++++--------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/Graphics/background/collab/tutorial/donbg/0_1/texture.json b/Graphics/background/collab/tutorial/donbg/0_1/texture.json index 7ccb3bff..20fff9a4 100644 --- a/Graphics/background/collab/tutorial/donbg/0_1/texture.json +++ b/Graphics/background/collab/tutorial/donbg/0_1/texture.json @@ -4,6 +4,6 @@ "x": 207 }, "footer": { - "y": 139 + "y": 110 } } diff --git a/Scripts/background/bg_collabs/tutorial.lua b/Scripts/background/bg_collabs/tutorial.lua index 985709c6..46ed2e4a 100644 --- a/Scripts/background/bg_collabs/tutorial.lua +++ b/Scripts/background/bg_collabs/tutorial.lua @@ -30,8 +30,13 @@ end -- One Fuji (background frame 1), one cloud (overlay) and one set of dots (background frame 2) per -- pattern tile, all scrolling with the pattern: the Fuji's foot behind the fans, the dots around -- the clouds (they bob with them). The cloud's place in the tile is overlay's x in texture.json. -local FUJI_X, FUJI_Y = 39, 65 -local DOTS_X, DOTS_Y = 32, 13 +local FUJI_X, FUJI_Y = 39, 91 +local CLOUD_Y = 32 +local DOTS_X, DOTS_Y = 32, CLOUD_Y + 13 +-- The fans repeat every 80 px: their strips are tiled (and scroll a whole tile per loop) every +-- 560 px, a multiple of that, so the copies line up. +local FAN_TILE = 560 +local FLOOR_DY = 34 function TutorialDonBG:draw_textures(fade, y, frame) y = y + 40 @@ -48,24 +53,15 @@ function TutorialDonBG:draw_textures(fade, y, frame) for i = 0, 3 do local x = (i * tile) + self.move.attribute tex.draw_texture(self._id_bg, { frame = 1, fade = fade, x = x + FUJI_X, y = y + FUJI_Y }) - tex.draw_texture(self._id_overlay, { frame = frame, fade = fade, x = x, y = y + bob }) + tex.draw_texture(self._id_overlay, { frame = frame, fade = fade, x = x, y = y + CLOUD_Y + bob }) tex.draw_texture(self._id_bg, { frame = 2, fade = fade, x = x + DOTS_X, y = y + DOTS_Y + bob }) end + local fan_x = self.move.attribute * (FAN_TILE / tile) for i = 0, 4 do - tex.draw_texture(self._id_footer, { - frame = 0, - fade = fade, - x = (i * self.footer_texture.width) + - self.move.attribute * (self.footer_texture.width / self.bg_texture.width), - y = y + self.overlay_move.attribute - }) - tex.draw_texture(self._id_footer, { - frame = 1, - fade = fade, - x = (i * (self.footer_texture.width - 80)) + - self.move.attribute * (self.footer_texture.width / self.bg_texture.width), - y = (y + 30) + self.overlay_move.attribute - }) + tex.draw_texture(self._id_footer, { frame = 0, fade = fade, x = (i * FAN_TILE) + fan_x, y = y + bob }) + tex.draw_texture(self._id_footer, { frame = 1, fade = fade, x = (i * FAN_TILE) + fan_x, y = (y + 30) + bob }) + -- a third row so the fans reach down to the lane + tex.draw_texture(self._id_footer, { frame = 1, fade = fade, x = (i * FAN_TILE) + fan_x, y = (y + 60) + bob }) end end @@ -78,6 +74,7 @@ function TutorialBackground.new(player_num, bpm) tex.load_folder(COLLAB_PATH, "bg_normal/bg_0") self.donbg = TutorialDonBG.new(1, player_num, COLLAB_PATH) self._id_bg_0 = tex.get_texture(COLLAB_PATH .. "/" .. "bg_0" .. "/" .. "background") or 0 + self.floor_texture = tex.get_texture_info("bg_0", "background") return self end @@ -100,7 +97,12 @@ function TutorialBackground:handle_gauge(player_num, progress, is_clear, is_rain function TutorialBackground:draw_back() self.donbg:draw() - tex.draw_texture(self._id_bg_0) + -- the floor sits FLOOR_DY lower than texture.json says, so the drums clear the lane; the rows that + -- would then run into the bottom band are cut off + tex.draw_texture(self._id_bg_0, { + y = FLOOR_DY, y2 = -FLOOR_DY, + src = { x = 0, y = 0, width = self.floor_texture.width, height = self.floor_texture.height - FLOOR_DY }, + }) end function TutorialBackground:draw_fore() end -- 2.54.0