Mark
/
celeste-ai
Archived
1
0
Fork 0

Added toggle to hackcel.p8

master
Mark 2023-02-26 12:20:41 -08:00
parent 755495a992
commit 24dd65ace8
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
1 changed files with 18 additions and 1 deletions

View File

@ -30,6 +30,16 @@ k_jump=4
k_dash=5 k_dash=5
-- Set to false while training or running the model.
-- Set to true to play the game manually with debug print.
-- (good for finding coordinates of checkpoints)
--
-- If true, disables most hack features:
-- - screenshots at every frame
-- - frame skipping
-- - waiting for input
hack_human_mode = false
-- If true, disable screensake -- If true, disable screensake
hack_no_shake = true hack_no_shake = true
@ -1209,6 +1219,10 @@ end
-- _update60 does 60 fps -- _update60 does 60 fps
-- default for celeste is 30. -- default for celeste is 30.
function _update() function _update()
if hack_human_mode then
old_update()
return
end
-- Run at full speed until ready -- Run at full speed until ready
if not hack_ready then if not hack_ready then
@ -1304,7 +1318,10 @@ end
-- Called at the same rate as _update, -- Called at the same rate as _update,
-- but not necessarily at the same time. -- but not necessarily at the same time.
function _draw() function _draw()
--old_draw() if hack_human_mode then
old_draw()
return
end
end end
function old_update() function old_update()