vydd / sketch

A Common Lisp framework for the creation of electronic art, visual design, game prototyping, game making, computer graphics, exploration of human-computer interaction, and more.
MIT License
1.39k stars 66 forks source link

Greater control of execution loop #140

Open Kevinpgalligan opened 5 months ago

Kevinpgalligan commented 5 months ago

Summarising a brainstorming session between me and @Gleefre.

Example of how this might work:

(defsketch my-sketch ...)
(defun main ()
  (let ((sketch (make-instance 'my-sketch :idle-render nil)))
      (loop (handle-events sketch)
                (render sketch)
                (update-state sketch))))
Kevinpgalligan commented 5 months ago

Useful article on timing stuff in SDL2: https://thenumb.at/cpp-course/sdl2/08/08.html