diff --git a/celeste/bin/carts/hackcel.p8 b/celeste/bin/carts/hackcel.p8 index 9db06ca..47be5bb 100755 --- a/celeste/bin/carts/hackcel.p8 +++ b/celeste/bin/carts/hackcel.p8 @@ -31,6 +31,19 @@ k_dash=5 -- HACK: used to slow down frame rate frame_counter = 0 +draw_frame_counter = 0 + +-- False until the game has initialized +hack_ready = false + +-- Skip each nth frame. +-- Celeste usually runs at 30 fps, we run it at 60. +-- so, a value of 2 gives normal speed +-- and a value of 3 gives 3/2 speed. +frame_rate_hack = 10 + +-- HACK: keep track of player state +player_state = {} -- entry point -- ----------------- @@ -325,14 +338,15 @@ player = -- HACK: print player status - printh( - "px:" .. tostr(this.x) .. - ";py:" .. tostr(this.y).. - ";vx:" .. tostr(this.spd.x) .. - ";vy:" .. tostr(this.spd.y) .. - ";rx:" .. tostr(room.x) .. - ";ry:" .. tostr(room.y) - ) + hack_ready = true + player_state = { + px = tostr(this.x), + py = tostr(this.y), + vx = tostr(this.spd.x), + vy = tostr(this.spd.y), + rx = tostr(room.x), + ry = tostr(room.y) + } end, --0 then return end -- reset all palette values