Compare commits

..

6 Commits

Author SHA1 Message Date
5a0c8ef19d set version to 0.8
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2026-03-12 07:52:42 +01:00
1c25a077a5 lint fixes
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2026-03-12 07:49:36 +01:00
fd983dd6e1 doc fixes
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-03-12 07:42:11 +01:00
220ca27128 Merge pull request 'glitch' (#32) from feature/glitch into master
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Reviewed-on: http://git.teletype.hu/games/impostor/pulls/32
2026-03-11 23:59:18 +00:00
3bb1fb7941 glitch
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/pull_request_closed/woodpecker Pipeline failed
2026-03-12 00:58:38 +01:00
24ce240f97 Merge pull request 'feature/end-window' (#31) from feature/end-window into master
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Reviewed-on: http://git.teletype.hu/games/impostor/pulls/31
2026-03-11 23:45:51 +00:00
8 changed files with 72 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ globals = {
"Focus",
"Day",
"Timer",
"Glitch",
"Trigger",
"Util",
"Decision",
@@ -31,6 +32,7 @@ globals = {
"MinigameRhythmWindow",
"MinigameDDRWindow",
"MysteriousManWindow",
"EndWindow",
"mset",
"mget",
"btnp",

View File

@@ -11,6 +11,7 @@ logic/logic.day.lua
logic/logic.timer.lua
logic/logic.trigger.lua
logic/logic.minigame.lua
logic/logic.glitch.lua
system/system.ui.lua
audio/audio.manager.lua
audio/audio.songs.lua

View File

@@ -2,6 +2,7 @@ Decision.register({
id = "go_to_office",
label = "Go to Office",
handle = function()
Glitch.show()
Util.go_to_screen_by_id("office")
end,
})

View File

@@ -42,6 +42,11 @@ function Context.initial_data()
current_situation = nil,
},
day_count = 1,
glitch = {
enabled = false,
state = "active",
timer = 0,
},
_end = {
state = "choice",
selection = 1,

View File

@@ -0,0 +1,58 @@
--- @section Glitch
Glitch = {}
--- Shows the glitch effect.
--- @within Glitch
function Glitch.show()
if Context and Context.glitch then
Context.glitch.enabled = true
end
end
--- Hides the glitch effect.
--- @within Glitch
function Glitch.hide()
if Context and Context.glitch then
Context.glitch.enabled = false
end
end
--- Draws the glitch effect if active.
--- @within Glitch
function Glitch.draw()
if not Context or not Context.glitch or not Context.glitch.enabled then return end
-- Update state timer
Context.glitch.timer = Context.glitch.timer - 1
if Context.glitch.timer <= 0 then
if Context.glitch.state == "active" then
Context.glitch.state = "waiting"
Context.glitch.timer = math.random(20, 60) -- Time to stay fixed
else
Context.glitch.state = "active"
Context.glitch.timer = math.random(40, 100) -- Time to stay glitchy
end
end
-- Draw stripes only when active
if Context.glitch.state == "active" then
for _ = 1, 15 do
local rx = math.random(0, Config.screen.width - 1)
local ry = math.random(0, Config.screen.height - 1)
-- Sample color at the random point
local color = pix(rx, ry)
-- Determine random length for the stripe (2-40)
local length = math.random(2, 40)
-- Draw the vertical stripe
for sy = 0, length - 1 do
local dy = ry + sy
if dy < Config.screen.height then
pix(rx, dy, color)
end
end
end
end
end

View File

@@ -1,8 +1,8 @@
-- title: Definitely not an Impostor
-- name: impostor
-- author: Teletype Games
-- desc: Life of a programmer in the Vector
-- desc: Life of a programmer
-- site: https://git.teletype.hu/games/impostor
-- license: MIT License
-- version: 0.1
-- version: 0.8
-- script: lua

View File

@@ -27,5 +27,6 @@ function TIC()
if Context.game_in_progress then
Meter.draw()
Timer.draw()
Glitch.draw()
end
end

View File

@@ -1,3 +1,5 @@
--- @section EndWindow
--- Draws the end screen window.
--- @within EndWindow
function EndWindow.draw()