From efed1e8cc380f2c90406c2fc9cc83e018417888b Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Mon, 27 Jan 2025 04:48:00 +0300 Subject: [PATCH] yippie --- data/scripts/game.lua | 11 +++++++++-- data/twn.toml | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/data/scripts/game.lua b/data/scripts/game.lua index 4c10b9a..9bff208 100644 --- a/data/scripts/game.lua +++ b/data/scripts/game.lua @@ -24,10 +24,11 @@ function game_tick() draw_camera { position = { x=0, y=0, z=0 }, - direction = { x=math.sin(ctx.frame_number / 100), y=-1, z=math.cos(ctx.frame_number / 100) }, + -- direction = { x=-math.sin(math.pi / 4), y=-1, z=math.cos(math.pi / 4) }, + direction = { x=-math.sin(ctx.frame_number / 100), y=-1, z=math.cos(ctx.frame_number / 100) }, up = { x=0, y=1, z=0 }, fov = 0, - zoom = 0.25 + math.sin(ctx.frame_number / 100) / 10, + zoom = 0.15 + math.sin(ctx.frame_number / 100) / 20, } -- draw_rectangle { @@ -56,5 +57,11 @@ function game_tick() v2 = { x = 0, y = 0, z = 0 + i/2 + 1 }, v3 = { x = 0, y = (64 + wobble) / 64, z = 0 + i/2 + 1 }, } + + draw_billboard { + texture = "art/creatures/meathead/" .. string.format("dance-%s.png", pingpong(state.beat, 3)), + position = { x = i, y = wobble / 64, z = 0 }, + size = { x = 1, y = (64 + wobble) / 64 }, + } end end diff --git a/data/twn.toml b/data/twn.toml index ddac57e..d6e769f 100644 --- a/data/twn.toml +++ b/data/twn.toml @@ -15,6 +15,7 @@ dev_id = "veclavtalica" [game] resolution = [ 960, 540 ] #debug = true +background_color = [ 125, 0, 0, 255 ] # Engine tweaks. You probably don't need to change these [engine]