Player animation, improve glitchiness, more libb lines

This commit is contained in:
Jeremy Penner 2020-12-30 12:48:58 -05:00
parent 3fc5ef8e15
commit 187766e1fd
7 changed files with 27 additions and 20 deletions

View file

@ -18,10 +18,10 @@
(local org { (local org {
:tiles (prg:org 0x4000) :tiles (prg:org 0x4000)
:font (prg:org 0x4e00) :font (prg:org 0x4f00)
:map (prg:org 0x5000) :map (prg:org 0x5100)
:entity (prg:org 0x5100) :entity (prg:org 0x5200)
:levelcode (prg:org 0x5200) :levelcode (prg:org 0x5300)
:code vm.code :code vm.code
}) })

View file

@ -12,8 +12,9 @@
(tile.appendtiles org.tiles) (tile.appendtiles org.tiles)
(tile.appendgfx org.font (tile.loadgfx tile.fn-font)) (tile.appendgfx org.font (tile.loadgfx tile.fn-font))
(vm:var :tick-count)
(vm:word :handle-key :tick :read-key :player-key :hide-footer) (vm:word :handle-key :tick :read-key :player-key :hide-footer)
(vm:word :tick :map-specific-tick) (vm:word :tick :map-specific-tick :tick-count :get 1 :+ :tick-count :set :player-redraw)
(vm:word :load-level (vm:word :load-level
:lit :map-jaye-yx :get :jaye-yx :set :lit :map-jaye-yx :get :jaye-yx :set

View file

@ -27,8 +27,8 @@
:garbagerexx-yx :get :get-responder :get := (vm:when :garbagerexx-yx :get :get-responder :get := (vm:when
vm.true :is-garbagerexx :set vm.true :is-garbagerexx :set
:garbagerexx-introduced :get :not (vm:when :garbagerexx-introduced :get :not (vm:when
(say :rexx "BO@*SS5S...,? ") (say :rexx "BO@oSSsS...,? htgz")
(say :rexx "I DON'T F3EL SO GOO00)OD...>?&**;") (say :rexx "I DON'T F3EL SO GOp0%foo)OD...>?qw" "idontfeelsogood")
vm.true :garbagerexx-introduced :set vm.true :garbagerexx-introduced :set
)) ))
] [ ] [
@ -46,7 +46,7 @@
(vm:word :move-garbagerexx ; yx -- f (vm:word :move-garbagerexx ; yx -- f
(vm:if-and [[:is-rexx?] [:is-garbagerexx :get]] (vm:if-and [[:is-rexx?] [:is-garbagerexx :get]]
[:dup 0xff :& 0x0d := (vm:if [ [:dup 0xff :& 0x0d := (vm:if [
(say :rexx "PARITY #ERPOR!*(!@$[") :drop vm.true :ret (say :rexx "PARITYe#ERPORr(sbaitso" " tellmeabout" " your problems") :drop vm.true :ret
] [ ] [
(vm:if-and [[:dup :not-picking-up?] [:dup :can-drop-rubble?]] (vm:if-and [[:dup :not-picking-up?] [:dup :can-drop-rubble?]]
[:rexx-yx :get :randomgarbage :update-itile]) [:rexx-yx :get :randomgarbage :update-itile])
@ -65,9 +65,9 @@
:garbagerexx-yx :get :dup (itile :t-rexxstop) :update-itile :rexx-yx :set :garbagerexx-yx :get :dup (itile :t-rexxstop) :update-itile :rexx-yx :set
controlstate.rexx :controlstate :bset controlstate.rexx :controlstate :bset
0x00ff :move :move :move 0x00ff :move :move :move
(say :rexx "DAAAISYY" " DAAAAAIIISYYYY") :hide-footer (say :rexx "DAAAISYY" " DAAAAAIIISYYYY" "d a i s y") :hide-footer
:move :drop 0xff00 :move :move :drop 0xff00 :move
(say :rexx "GIVE ME" " .,#YOUR ANSWE!@#ER" " %$DOO00OO@'\"") :hide-footer (say :rexx "GIVE ME" " .,#YOUR ANSWEibmER" " %$DOO00OOooo@'bell\"") :hide-footer
:move :drop :move :drop
(say :rexx "UH OH") :hide-footer (say :rexx "UH OH") :hide-footer
0xff00 :explode 0x0100 :explode 0x00ff :explode 0x0001 :explode 0 :explode 0xff00 :explode 0x0100 :explode 0x00ff :explode 0x0001 :explode 0 :explode

View file

@ -1,4 +1,4 @@
(local {: deflevel : say : itile : controlstate} (require :game.defs)) (local {: deflevel : say : say-runon : itile : controlstate} (require :game.defs))
(local {: ev} (require :game.entity)) (local {: ev} (require :game.entity))
(local tile (require :game.tiles)) (local tile (require :game.tiles))
(local {: walkable : neutable : debris : sittable} tile.flag-to-bit) (local {: walkable : neutable : debris : sittable} tile.flag-to-bit)
@ -18,7 +18,15 @@
(vm:if-and [[:is-neut?] [:over ev.touch :=] [:responder-itile (itile :t-keyoff) :=]] (vm:if-and [[:is-neut?] [:over ev.touch :=] [:responder-itile (itile :t-keyoff) :=]]
[(say :pady "OH HI THERE, SUSPICIOUS" "PROGRAM! WHAT CAN I DO" "YOU FOR?") [(say :pady "OH HI THERE, SUSPICIOUS" "PROGRAM! WHAT CAN I DO" "YOU FOR?")
(say :neut "PEOPLE ARE IN DANGER" "PLEASE OPEN THE DOOR") (say :neut "PEOPLE ARE IN DANGER" "PLEASE OPEN THE DOOR")
(say :pady "WELL THAT'S TERRIBLE!" "BUT I JUST CAN'T OPEN" "WITHOUT THE PROPER CODE.")]) (say :pady "WELL THAT'S TERRIBLE!" "BUT I JUST CAN'T OPEN" "WITHOUT THE PROPER CODE.")
:libb-present :get (vm:when (say :libb "OH JEEZ, LET ME AT HER, NEUT."))])
(vm:if-and [[:dup ev.hack :=] [:responder-itile (itile :t-keyoff) :=]]
[(say :pady "ANOTHER STRANGE PROGRAM!" "MY, I'M POPULAR TODAY!")
(say :libb "OH PUKE. PLEASE SHUT UP.")
(say-runon :pady "HOW RUD")
(say :libb "]/WINNUKE 182.556.21.74")
(say :pady "PADYSEC CAUSED A GENERAL" "PROTECTION FAULT IN MODULE" "MORICON.DLL AT 000A:BE3F.")
(say :libb "]/OPEN")])
:keypad) :keypad)
(vm:word :keypad1 0x5197 :first-keypad) (vm:word :keypad1 0x5197 :first-keypad)

View file

@ -132,8 +132,9 @@
[0x00ff (itile :gord-w)] [0x00ff (itile :gord-w)]
[:else (itile :gord-e)])])) [:else (itile :gord-e)])]))
(vm:word :neut-tile (itile :neut1)) ; todo: animate (vm:word :two-frame :tick-count :get 0x1f :& 0x10 :<)
(vm:word :libb-tile (itile :libb1)) (vm:word :neut-tile :two-frame (vm:if [(itile :neut1)] [(itile :neut2)]))
(vm:word :libb-tile :two-frame (vm:if [(itile :libb1)] [(itile :libb2)]))
(vm:word :flag-at? ; yx flag -- f (vm:word :flag-at? ; yx flag -- f
:swap :itile-at :lookup-flags :&) :swap :itile-at :lookup-flags :&)

View file

@ -97,8 +97,9 @@
(mem:write_u8 (+ addr i -1) (string.byte (bytes:sub i i)))))" (mem:write_u8 (+ addr i -1) (string.byte (bytes:sub i i)))))"
(bencode.encode {: addr : bytes}))) (bencode.encode {: addr : bytes})))
(fn Machine.launch [self prg] (fn Machine.launch [self prg]
(self:eval "(: (manager:machine) :soft_reset)")
(self:eval (string.format "(emu.keypost \"CALL-151\\n %xG\\n\")" (prg:lookup-addr prg.start-symbol)))) (self:eval (string.format "(emu.keypost \"CALL-151\\n %xG\\n\")" (prg:lookup-addr prg.start-symbol))))
(fn Machine.reboot [self] (self:eval "(: (manager:machine) :soft_reset)")) (fn Machine.reboot [self] (self:eval "(: (manager:machine) :hard_reset)"))
(fn Machine.coro-eval [self code] (fn Machine.coro-eval [self code]
(var result nil) (var result nil)
(local append-to-result #(set result (.. (or result "") $2))) (local append-to-result #(set result (.. (or result "") $2)))

View file

@ -1,14 +1,10 @@
Game: Game:
* Neut tileset
* level loading * level loading
* Rexx can run over Jaye and vice versa
* drawing queue (tile index = priority?)
* Title screen * Title screen
* Ending screen * Ending screen
* drawing queue (tile index = priority?)
tooling ideas: tooling ideas:
* rearrange tile order, preserving maps
* (needed for Neut tileset? or special neut-ified versions of _everything_?)
* REPLy buffer (Polywell?) * REPLy buffer (Polywell?)
* save player positions & map state during hot reload * save player positions & map state during hot reload
* debug movement (noclip? teleport? activate by clicking? MAME supports mouse input / debug overlays...) * debug movement (noclip? teleport? activate by clicking? MAME supports mouse input / debug overlays...)