groworld/plant-eyes/plant-eyes.scm

50 lines
1.2 KiB
Scheme
Raw Normal View History

2009-09-28 08:57:29 +00:00
;; p l a n t e y e s [ copyright (c) 2009 foam vzw : gpl v3 ]
2009-07-30 15:03:21 +00:00
;#lang scheme/base
;(require fluxus-016/drflux)
2009-09-28 08:57:29 +00:00
(require scheme/class
"scripts/game-modes.ss"
"scripts/logic.ss"
"scripts/view.ss"
"scripts/controller.ss"
"scripts/client.ss"
"scripts/jabberer.ss"
"scripts/list-utils.ss")
2009-06-25 12:09:52 +00:00
(define world-list (let* ((f (open-input-file "world.txt"))
(o (list (read f)(read f)(read f)(read f))))
(close-input-port f)
o))
(printf "~a~n" (length world-list))
(clear)
2009-07-30 15:03:21 +00:00
(clear-shader-cache)
(clear-texture-cache)
2009-06-23 07:31:12 +00:00
(define mode 'gui)
(define gui (make-object gui-game-mode% (list-ref world-list 0)))
(define game (make-object main-game-mode% world-list))
(send gui setup)
2009-06-29 16:51:32 +00:00
;(define t 0)
;(define d 0.02)
;(define (flxtime) t)
;(define (update-time) (set! t (+ t d)))
;(define (delta) d)
(define (animate)
(cond
((eq? mode 'gui)
(when (send gui update (flxtime) (delta))
(send game setup (send gui get-player-info) (send gui get-players))
(set! mode 'game)))
((eq? mode 'game)
(send game update (flxtime) (delta))))
2009-08-12 11:14:47 +00:00
#;(update-time)
(sleep 0.01))
2009-06-25 16:04:55 +00:00
(every-frame (animate))
;(start-framedump "pe7" "jpg")