Deltatime movement
This commit is contained in:
parent
fcb067f5bd
commit
ebf769eeb7
@ -87,7 +87,7 @@
|
||||
(setf kpos click-pos)
|
||||
;; (setf (velocity knight1) (vec 0 0))
|
||||
(setf click-pos nil))
|
||||
(let ((vel (v* 3.0 (vunit* dist))))
|
||||
(let ((vel (v* (* (rl:get-frame-time) 150.0) (vunit* dist))))
|
||||
(setf (velocity knight1) vel)
|
||||
(setf kpos (v+ kpos vel)))))))))
|
||||
|
||||
@ -134,7 +134,7 @@
|
||||
(let* ((screen-width 900)
|
||||
(screen-height 500))
|
||||
(rl:with-window (screen-width screen-height "RTS")
|
||||
(rl:set-target-fps 60)
|
||||
(rl:set-target-fps 120)
|
||||
(game-init)
|
||||
(loop :until (rl:window-should-close)
|
||||
:do (game-input)
|
||||
|
Loading…
x
Reference in New Issue
Block a user