target FPS
This commit is contained in:
parent
1ce9c49086
commit
6f9e0a934f
2 changed files with 11 additions and 1 deletions
|
|
@ -111,6 +111,7 @@
|
|||
(hash-table-ref world id))
|
||||
|
||||
;; Create an entity in the world and return it's ID
|
||||
;; TODO: consider whether we want to use a hash-table for the entity list. I'm not sure yet how punishing O(n) lookup will be here, so it might be sometihng to look at once we start handling entity execution
|
||||
(define (create-named-entity id . components)
|
||||
(assert (symbol? id))
|
||||
(assert (every record? components))
|
||||
|
|
@ -443,8 +444,14 @@
|
|||
(define *window-title* (guarded-parameter "imugi"
|
||||
string?))
|
||||
|
||||
;; Desired FPS count
|
||||
(define *target-fps* (guarded-parameter 60
|
||||
integer?))
|
||||
|
||||
;; Make a window with the above parameters and default processing and predicate
|
||||
(define (create-window #!key (process next-frame) (close-predicate window-should-close?))
|
||||
(init-window (car (*window-size*)) (cdr (*window-size*)) (*window-title*))
|
||||
(set-target-fps (*target-fps*))
|
||||
(let loop ()
|
||||
(process)
|
||||
(unless (close-predicate)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue