diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..5c173a9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +🕹️cube-tube/sprites/menu_l.png filter=lfs diff=lfs merge=lfs -text diff --git a/🕹️cube-tube/app/scenes/cube_tube.rb b/🕹️cube-tube/app/scenes/cube_tube.rb index da0848b..20b3871 100644 --- a/🕹️cube-tube/app/scenes/cube_tube.rb +++ b/🕹️cube-tube/app/scenes/cube_tube.rb @@ -123,6 +123,14 @@ class CubeTubeGame < GameplayScene end @bg_x %= @bg_w if @bg_x >= @bg_w + dirt = Sprite.for(:dirt) + 10.times do |i| + dirt.render(@args, { x: @bg_x + (i * (dirt.w)), y: 0 - dirt.h + 1 }) + dirt.render(@args, { x: @bg_x - (i * (dirt.w)), y: 0 - dirt.h + 1 }) + dirt.render(@args, { x: @bg_x + (i * (dirt.w)), y: @args.grid.h }) + dirt.render(@args, { x: @bg_x - (i * (dirt.w)), y: @args.grid.h }) + end + Sprite.for(:tunnel_loop).render(@args, { x: @bg_x + @bg_w, y: 0, w: @bg_w, h: 720 }) Sprite.for(:tunnel_loop).render(@args, { x: @bg_x, y: 0, w: @bg_w, h: 720 }) Sprite.for(:tunnel_loop).render(@args, { x: @bg_x - @bg_w, y: 0, w: @bg_w, h: 720 }) diff --git a/🕹️cube-tube/app/scenes/intro.rb b/🕹️cube-tube/app/scenes/intro.rb index 54089f8..1f0c89a 100644 --- a/🕹️cube-tube/app/scenes/intro.rb +++ b/🕹️cube-tube/app/scenes/intro.rb @@ -9,6 +9,7 @@ class Intro < GameplayScene @train_spline = [ [1.0, 0.25, 0, 0] ] + @full_station_w = Sprite.for(:station_loop).w + Sprite.for(:station_end).w @station_start_w = Sprite.for(:station_start).w @tunnel_w = Sprite.for(:tunnel_loop).w @full_station_start_w = @station_start_w + @tunnel_w @@ -64,6 +65,14 @@ class Intro < GameplayScene end end + dirt = Sprite.for(:dirt) + dx = 0 - @full_station_start_w - @tunnel_w + while dx < @full_station_w + dirt.render(args, { x: @station_pos + dx, y: 0 - dirt.h + 1 }) + dirt.render(args, { x: @station_pos + dx, y: args.grid.h }) + dx += dirt.w + end + Sprite.for(:station_loop).render(args, { x: @station_pos }) Sprite.for(:station_start).render(args, { x: @station_pos - @station_start_w }) Sprite.for(:tunnel_loop).render(args, { x: @station_pos - @full_station_start_w }) diff --git a/🕹️cube-tube/app/scenes/menu.rb b/🕹️cube-tube/app/scenes/menu.rb index 1622b0c..7c4a76e 100644 --- a/🕹️cube-tube/app/scenes/menu.rb +++ b/🕹️cube-tube/app/scenes/menu.rb @@ -88,7 +88,7 @@ class MenuScene < SceneInstance super @first_render = args.state.tick_count if @first_render.nil? - Sprite.for(:menu).render(args) + Sprite.for(:menu_l).render(args) args.outputs.labels << label( @title.to_s.upcase, diff --git a/🕹️cube-tube/app/sprites_list.rb b/🕹️cube-tube/app/sprites_list.rb index 1bdd44d..716c592 100644 --- a/🕹️cube-tube/app/sprites_list.rb +++ b/🕹️cube-tube/app/sprites_list.rb @@ -25,8 +25,10 @@ module Sprite screen_s3: SpriteInstance.new({ w: 250, h: 210, path: 'sprites/screen-s3.png' }), screen_s4: SpriteInstance.new({ w: 250, h: 210, path: 'sprites/screen-s4.png' }), menu: SpriteInstance.new({ w: 1280, h: 720, path: 'sprites/menu.png' }), + menu_l: SpriteInstance.new({ w: 2760, h: 1550, path: 'sprites/menu_l.png', x: -740, y: -415 }), tunnel_loop: SpriteInstance.new({ w: 1358, h: 720, path: 'sprites/tunnel-loop.png' }), tracks: SpriteInstance.new({ w: 1358, h: 55, path: 'sprites/tracks.png' }), + dirt: SpriteInstance.new({ w: 194, h: 150, path: 'sprites/dirt.png' }), station_loop: SpriteInstance.new({ w: 1811, h: 720, path: 'sprites/station-loop.png' }), station_start: SpriteInstance.new({ w: 618, h: 720, path: 'sprites/station-start.png' }), station_end: SpriteInstance.new({ w: 518, h: 720, path: 'sprites/station-end.png' }) diff --git a/🕹️cube-tube/sprites/dirt.png b/🕹️cube-tube/sprites/dirt.png new file mode 100644 index 0000000..571d634 Binary files /dev/null and b/🕹️cube-tube/sprites/dirt.png differ diff --git a/🕹️cube-tube/sprites/menu_l.png b/🕹️cube-tube/sprites/menu_l.png new file mode 100644 index 0000000..9a174de --- /dev/null +++ b/🕹️cube-tube/sprites/menu_l.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b48b7bfbcf2ce8acb8b29af3855dec652756567c6d86ecc6cdda2293f4ece30c +size 3746452