12 Commits

Author SHA1 Message Date
709be93332 Tidy up more loose ends 2022-12-20 21:42:20 -08:00
535fcf7601 Clean up some residual messes 2022-12-20 21:37:09 -08:00
c98194550e Everything _seems_ to work 2022-12-20 20:45:33 -08:00
c71cd312b1 First version I couldn't immediately break 2022-12-20 16:27:08 -08:00
ca819b0e53 Save current changes 2022-12-20 15:18:01 -08:00
281ed4b40f Elide points as needed 2022-12-20 15:04:00 -08:00
60f1c2e112 Well, this is closer to right!! 2022-12-20 13:48:23 -08:00
b0d356aeee One final note 2022-12-19 23:29:22 -08:00
6821d6cb53 Add further algo notes 2022-12-19 23:28:26 -08:00
675ef20115 Add comment expressing uncertainty 2022-12-19 23:22:37 -08:00
a7b016c4b2 We should only care about anchors on the old path 2022-12-19 23:20:48 -08:00
f3df6c674a Rope rewrite, part one 2022-12-19 23:15:55 -08:00

View File

@ -601,9 +601,6 @@ function level:can_move(
if is_player and self:win_at(mx0+dmx,my0+dmy) then
return true
end
if is_player and self:get_open_pit(mx0+dmx,my0+dmy) then
return wrongbleep:adequately_warned()
end
if self:mcoll(mx0+dmx,my0+dmy) then
return false
@ -771,7 +768,7 @@ function player:update()
}}
elseif kbd:btnp(5) then
if self.rope!=nil then
if (not self.rope:tug()) wrongbleep:bleep(9)
if (not self.rope:tug()) wrongbleep:bleep(7)
end
end
end
@ -815,9 +812,8 @@ function player:_fall()
end
function player:draw()
local px=self.x*8+self.px+wrongbleep:vibrate()
local py=self.y*8+self.py+wrongbleep:vibrate()
local px=self.x*8+self.px
local py=self.y*8+self.py
local head=1-self.orienty
@ -915,7 +911,7 @@ function rope:update()
if (self.state.frame>=3) self.state={name="latched"}
elseif self.state.name=="latched" then
if (self.latch==nil) wrongbleep:bleep(5) self:destroy() return
if (self.latch==nil) wrongbleep:bleep(3) self:destroy() return
if
self.latch!=nil and
@ -1602,24 +1598,15 @@ wrongbleep={}
add(real_modules,wrongbleep)
function wrongbleep:init()
self.duration=0
self.continuous=0
end
function wrongbleep:update()
if (self.duration>5) self.duration=5
if self.duration>0 then sfx(63,3) self.continuous+=1
else self.continuous=0 end
self.duration=max(self.duration-1,-4)
if (self.duration>0) sfx(63,3)
self.duration=max(self.duration-1,-2)
end
function wrongbleep:bleep(duration)
self.duration+=duration or 2
end
function wrongbleep:vibrate(duration)
if (self.continuous<10) return 0
return (rnd()*2-1)*min(self.continuous/10,2)
end
function wrongbleep:adequately_warned(duration)
return self.continuous>45
end
__gfx__