Compare commits
2 Commits
66bcc4d2d8
...
efed1e8cc3
Author | SHA1 | Date | |
---|---|---|---|
|
efed1e8cc3 | ||
|
af468fe6a4 |
@ -23,11 +23,12 @@ function game_tick()
|
|||||||
local state = ctx.udata
|
local state = ctx.udata
|
||||||
|
|
||||||
draw_camera {
|
draw_camera {
|
||||||
position = { x=10, y=10, z=10 },
|
position = { x=0, y=0, z=0 },
|
||||||
direction = { x=-1, y=-1, z=-1 },
|
-- 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 },
|
up = { x=0, y=1, z=0 },
|
||||||
fov = 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 {
|
-- draw_rectangle {
|
||||||
@ -51,10 +52,16 @@ function game_tick()
|
|||||||
draw_quad {
|
draw_quad {
|
||||||
texture = "art/creatures/meathead/" .. string.format("dance-%s.png", pingpong(state.beat, 3)),
|
texture = "art/creatures/meathead/" .. string.format("dance-%s.png", pingpong(state.beat, 3)),
|
||||||
texture_region = { w = 32, h = 32 },
|
texture_region = { w = 32, h = 32 },
|
||||||
v0 = { x = 0 + i/2, y = (64 + wobble) / 64, z = 0 },
|
v0 = { x = 0, y = (64 + wobble) / 64, z = 0 + i/2 },
|
||||||
v1 = { x = 0 + i/2, y = 0, z = 0 },
|
v1 = { x = 0, y = 0, z = 0 + i/2 },
|
||||||
v2 = { x = 0 + i/2 + 1, y = 0, z = 0 },
|
v2 = { x = 0, y = 0, z = 0 + i/2 + 1 },
|
||||||
v3 = { x = 0 + i/2 + 1, y = (64 + wobble) / 64, z = 0 },
|
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
|
||||||
end
|
end
|
||||||
|
@ -15,10 +15,12 @@ dev_id = "veclavtalica"
|
|||||||
[game]
|
[game]
|
||||||
resolution = [ 960, 540 ]
|
resolution = [ 960, 540 ]
|
||||||
#debug = true
|
#debug = true
|
||||||
|
background_color = [ 125, 0, 0, 255 ]
|
||||||
|
|
||||||
# Engine tweaks. You probably don't need to change these
|
# Engine tweaks. You probably don't need to change these
|
||||||
[engine]
|
[engine]
|
||||||
ticks_per_second = 60 # minimum of 8
|
ticks_per_second = 60 # minimum of 8
|
||||||
|
cull_faces = false
|
||||||
#keybind_slots = 3 # minimum of 1
|
#keybind_slots = 3 # minimum of 1
|
||||||
#texture_atlas_size = 2048 # minimum of 32
|
#texture_atlas_size = 2048 # minimum of 32
|
||||||
#font_texture_size = 2048 # minimum of 1024
|
#font_texture_size = 2048 # minimum of 1024
|
||||||
|
Loading…
Reference in New Issue
Block a user