Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 385 lines (335 sloc) 11.466 kB
99952ea @ztellman use functions instead of macros where convenient
authored
1 ;; Copyright (c) Zachary Tellman. All rights reserved.
2 ;; The use and distribution terms for this software are covered by the
3 ;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
4 ;; which can be found in the file epl-v10.html at the root of this distribution.
5 ;; By using this software in any fashion, you are agreeing to be bound by
6 ;; the terms of this license.
7 ;; You must not remove this notice, or any other, from this software.
8
a50c7bf @ztellman move everything around
authored
9 (ns example.game.asteroids
4572735 @ztellman migrate math into cantor
authored
10 (:use [penumbra opengl]
11 [clojure.contrib.seq :only (separate)]
2d9305f @ztellman cantor.core -> cantor
authored
12 [cantor])
90574c0 @ztellman try that once more
authored
13 (:require [penumbra.app :as app]
cb1bc59 @ztellman some unfinished changes towards windowlets, and add in changes to fun…
authored
14 [penumbra.text :as text]
4ffd79e @ztellman rework opengl structure
authored
15 [penumbra.time :as time]
5d9adda @ztellman use efficient vector math
authored
16 [penumbra.data :as data]))
66a9df1 @ztellman trying that one more time
authored
17
18 ;;;
19
5d9adda @ztellman use efficient vector math
authored
20 (def *dim* (vec2 10 10))
66a9df1 @ztellman trying that one more time
authored
21
22 (defn wrap
23 "Makes the position wrap around from right to left, bottom to top"
24 [pos]
5d9adda @ztellman use efficient vector math
authored
25 (sub
2d9305f @ztellman cantor.core -> cantor
authored
26 (map*
27 mod
5d9adda @ztellman use efficient vector math
authored
28 (add pos *dim*)
29 (mul *dim* 2))
30 *dim*))
66a9df1 @ztellman trying that one more time
authored
31
2cf402b @ztellman reorder controller/queue reinitialization, and clean up asteroids exa…
authored
32 (defn expired? [x]
33 ((:expired? x)))
66a9df1 @ztellman trying that one more time
authored
34
2cf402b @ztellman reorder controller/queue reinitialization, and clean up asteroids exa…
authored
35 (defn render [x]
36 ((:render x)))
37
38 (defn radius [x]
39 (if (number? (:radius x))
40 (:radius x)
41 ((:radius x))))
42
43 (defn position [x]
cc3baeb @ztellman update to cantor 0.2.0
authored
44 (if (cartesian? (:position x))
2cf402b @ztellman reorder controller/queue reinitialization, and clean up asteroids exa…
authored
45 (:position x)
46 ((:position x))))
b573108 @ztellman finally finished asteroids
authored
47
ef21b7e @ztellman move some stuff around
authored
48 (defn intersects? [a b]
49 (let [min-dist (+ (radius a) (radius b))
5d9adda @ztellman use efficient vector math
authored
50 dist (sub (position a) (position b))]
95b78f2 @ztellman length-squared, not length
authored
51 (>= (* min-dist min-dist) (length-squared dist))))
b573108 @ztellman finally finished asteroids
authored
52
53 (defn rand-color [a b]
54 (map #(+ %1 (rand (- %2 %1))) a b))
63e2c4a @ztellman fix textures, for real this time (sorry)
authored
55
99952ea @ztellman use functions instead of macros where convenient
authored
56
1fdb835 @ztellman more work on asteroids
authored
57 ;;asteroids
99952ea @ztellman use functions instead of macros where convenient
authored
58
ef21b7e @ztellman move some stuff around
authored
59 (defn sphere-vertices
60 [lod]
61 (for [theta (range 0 361 (/ 360 lod))]
62 (for [phi (range -90 91 (/ 180 (/ lod 2)))]
5d9adda @ztellman use efficient vector math
authored
63 (cartesian (polar3 theta phi)))))
114a1c5 @ztellman semi-proper lexical scoping
authored
64
65 (defn rand-vector []
5d9adda @ztellman use efficient vector math
authored
66 (normalize (cartesian (polar3 (rand 360) (rand 360)))))
114a1c5 @ztellman semi-proper lexical scoping
authored
67
ef21b7e @ztellman move some stuff around
authored
68 (defn offset-vertex
69 "Expand if on one side of a plane, contract if on the other"
70 [v vertex]
114a1c5 @ztellman semi-proper lexical scoping
authored
71 (if (neg? (dot v (normalize vertex)))
5d9adda @ztellman use efficient vector math
authored
72 (mul vertex 1.01)
73 (mul vertex 0.99)))
114a1c5 @ztellman semi-proper lexical scoping
authored
74
75 (defn offset-sphere [v vertices]
ef21b7e @ztellman move some stuff around
authored
76 (map (fn [arc] (map #(offset-vertex v %) arc)) vertices))
114a1c5 @ztellman semi-proper lexical scoping
authored
77
ef21b7e @ztellman move some stuff around
authored
78 (defn gen-asteroid-vertices
79 "Procedurally generate perturbed sphere"
80 [lod iterations]
81 (let [s (iterate #(offset-sphere (rand-vector) %) (sphere-vertices lod))]
82 (nth s iterations)))
114a1c5 @ztellman semi-proper lexical scoping
authored
83
4641f76 @ztellman demo app for asteroids)
authored
84 (defn draw-asteroid [vertices]
85 (doseq [arcs (partition 2 1 vertices)]
1fdb835 @ztellman more work on asteroids
authored
86 (draw-quad-strip
87 (doseq [[a b] (map list (first arcs) (second arcs))]
5d9adda @ztellman use efficient vector math
authored
88 (vertex a) (vertex b)))))
4641f76 @ztellman demo app for asteroids)
authored
89
90 (defn gen-asteroid-geometry [lod iterations]
91 (create-display-list (draw-asteroid (gen-asteroid-vertices lod iterations))))
1fdb835 @ztellman more work on asteroids
authored
92
93 (defn init-asteroids []
4641f76 @ztellman demo app for asteroids)
authored
94 (def asteroid-meshes (doall (take 20 (repeatedly #(gen-asteroid-geometry 12 100))))))
1fdb835 @ztellman more work on asteroids
authored
95
227530f @ztellman make particle and asteroid generation a little more friendly on the eyes
authored
96 (defn gen-asteroid [& args]
ee8b775 @ztellman no with wav file
authored
97 (let [params (merge
5d9adda @ztellman use efficient vector math
authored
98 {:position (vec2 0 0)
ee8b775 @ztellman no with wav file
authored
99 :radius 1
100 :theta (rand 360)
101 :speed 1}
102 (apply hash-map args))
227530f @ztellman make particle and asteroid generation a little more friendly on the eyes
authored
103 birth (app/now)
faed54a @ztellman better update support, better function names, and now the 'new' branc…
authored
104 elapsed #(- (app/now) birth)
66a9df1 @ztellman trying that one more time
authored
105 asteroid (nth asteroid-meshes (rand-int 20))
5d9adda @ztellman use efficient vector math
authored
106 velocity (mul (cartesian (:theta params)) (:speed params))
107 position #(wrap (add (:position params) (mul velocity (elapsed))))]
ee8b775 @ztellman no with wav file
authored
108 {:expired? #(< (:radius params) 0.25)
66a9df1 @ztellman trying that one more time
authored
109 :position position
ee8b775 @ztellman no with wav file
authored
110 :radius (:radius params)
66a9df1 @ztellman trying that one more time
authored
111 :render #(push-matrix
5d9adda @ztellman use efficient vector math
authored
112 (translate (position))
ee8b775 @ztellman no with wav file
authored
113 (rotate (* (:speed params) (elapsed) -50) 1 0 0)
114 (rotate (:theta params) 0 1 0)
115 (apply scale (->> params :radius repeat (take 3)))
66a9df1 @ztellman trying that one more time
authored
116 (color 0.6 0.6 0.6)
b99dbd4 @ztellman slight fix to asteroids
authored
117 (call-display-list asteroid))}))
1fdb835 @ztellman more work on asteroids
authored
118
b573108 @ztellman finally finished asteroids
authored
119 ;;particles
120
121 (defn textured-quad []
122 (draw-quads
123 (texture 0 0) (vertex -1 -1)
124 (texture 1 0) (vertex 1 -1)
125 (texture 1 1) (vertex 1 1)
126 (texture 0 1) (vertex -1 1)))
127
128 (defn init-particles []
129 (def particle-tex
80f6ced @ztellman clean up texture generation
authored
130 (let [[w h] [32 32]
5d9adda @ztellman use efficient vector math
authored
131 dim (vec2 w h)
80f6ced @ztellman clean up texture generation
authored
132 tex (create-byte-texture w h)]
4ffd79e @ztellman rework opengl structure
authored
133 (data/overwrite!
b573108 @ztellman finally finished asteroids
authored
134 tex
996d7dc @ztellman further fixes
authored
135 (apply concat
80f6ced @ztellman clean up texture generation
authored
136 (for [x (range w) y (range h)]
5d9adda @ztellman use efficient vector math
authored
137 (let [pos (div (vec2 x y) dim)
138 i (Math/exp (* 16 (- (length-squared (sub pos (vec2 0.5 0.5))))))]
996d7dc @ztellman further fixes
authored
139 [1 1 1 i]))))
b573108 @ztellman finally finished asteroids
authored
140 tex))
141 (def particle-quad
76699d3 @ztellman got asteroids working
authored
142 (create-display-list (textured-quad))))
b573108 @ztellman finally finished asteroids
authored
143
144 (defn draw-particle [position radius tint]
145 (push-matrix
146 (apply color tint)
5d9adda @ztellman use efficient vector math
authored
147 (translate position)
b573108 @ztellman finally finished asteroids
authored
148 (scale radius radius)
149 (call-display-list particle-quad)))
150
227530f @ztellman make particle and asteroid generation a little more friendly on the eyes
authored
151 (defn gen-particle [& args]
ee8b775 @ztellman no with wav file
authored
152 (let [params (merge
5d9adda @ztellman use efficient vector math
authored
153 {:position (vec2 0 0)
ee8b775 @ztellman no with wav file
authored
154 :theta (rand 360)
155 :speed 1
156 :radius (+ 0.25 (rand 0.5))
157 :color [1 1 1]
158 :lifespan 1}
159 (apply hash-map args))
227530f @ztellman make particle and asteroid generation a little more friendly on the eyes
authored
160 birth (app/now)
5d9adda @ztellman use efficient vector math
authored
161 velocity (mul (cartesian (polar2 (:theta params))) (:speed params))
faed54a @ztellman better update support, better function names, and now the 'new' branc…
authored
162 elapsed #(- (app/now) birth)
5d9adda @ztellman use efficient vector math
authored
163 position #(wrap (add (:position params) (mul velocity (elapsed))))]
ee8b775 @ztellman no with wav file
authored
164 {:expired? #(> (- (app/now) birth) (:lifespan params))
b573108 @ztellman finally finished asteroids
authored
165 :position position
ee8b775 @ztellman no with wav file
authored
166 :radius (:radius params)
b573108 @ztellman finally finished asteroids
authored
167 :render #(draw-particle
168 (position)
ee8b775 @ztellman no with wav file
authored
169 (:radius params)
170 (concat (:color params) [(max 0 (- 1 (Math/pow (/ (elapsed) (:lifespan params)) 3)))]))}))
b573108 @ztellman finally finished asteroids
authored
171
1fdb835 @ztellman more work on asteroids
authored
172 ;;spaceship
173
174 (defn draw-fuselage [] ;;should be hung in the Louvre
deeff78 @ztellman clean up the particle effects
authored
175 (color 1 1 1)
1fdb835 @ztellman more work on asteroids
authored
176 (draw-triangles
b573108 @ztellman finally finished asteroids
authored
177 (vertex -0.4 -0.5) (vertex 0 -0.4) (vertex 0 0.5)
178 (vertex 0.4 -0.5) (vertex 0 -0.4) (vertex 0 0.5)))
1fdb835 @ztellman more work on asteroids
authored
179
b573108 @ztellman finally finished asteroids
authored
180 (defn init-spaceship []
76699d3 @ztellman got asteroids working
authored
181 (def fuselage (create-display-list (draw-fuselage))))
b573108 @ztellman finally finished asteroids
authored
182
183 (defn fire-bullet [state]
ef21b7e @ztellman move some stuff around
authored
184 (let [ship (:spaceship state)]
b573108 @ztellman finally finished asteroids
authored
185 (assoc state
186 :bullets
187 (conj
188 (:bullets state)
189 (gen-particle
227530f @ztellman make particle and asteroid generation a little more friendly on the eyes
authored
190 :position (:position ship)
191 :theta (:theta ship)
192 :speed 15
193 :radius 0.25
194 :color [0 0 1]
195 :lifespan 2)))))
b573108 @ztellman finally finished asteroids
authored
196
197 (defn emit-flame [state]
33f577c @ztellman keep sorted-set as sorted-set
authored
198 (when (app/key-pressed? :up)
95ffb39 @ztellman fix possible race condition with update loop
authored
199 (let [ship (:spaceship state)
4b2e16a @ztellman differentiate between real-time and game-time
authored
200 offset (- (rand 30) 15)
201 theta (+ 180 (:theta ship) offset)
95ffb39 @ztellman fix possible race condition with update loop
authored
202 particles (:particles state)
5d9adda @ztellman use efficient vector math
authored
203 position (add (:position ship) (cartesian (polar2 theta 0.3)))
204 velocity (polar (add (:velocity ship) (cartesian theta)))]
b573108 @ztellman finally finished asteroids
authored
205 (assoc state
4b2e16a @ztellman differentiate between real-time and game-time
authored
206 :particles (conj particles
207 (gen-particle
227530f @ztellman make particle and asteroid generation a little more friendly on the eyes
authored
208 :position position
5d9adda @ztellman use efficient vector math
authored
209 :theta (.theta velocity)
210 :speed (.r velocity)
227530f @ztellman make particle and asteroid generation a little more friendly on the eyes
authored
211 :radius 0.25
212 :color (rand-color [1 0.5 0.7] [1 1 1])
213 :lifespan (/ (Math/cos (radians (* 3 offset))) 2.5)))))))
1fdb835 @ztellman more work on asteroids
authored
214
215 (defn update-spaceship [dt ship]
216 (let [p (:position ship)
217 v (:velocity ship)
218 theta (:theta ship)
1b3f592 @ztellman move stuff into app/
authored
219 theta (condp (fn [x _] (app/key-pressed? x)) nil
b573108 @ztellman finally finished asteroids
authored
220 :left (rem (+ theta (* 360 dt)) 360)
221 :right (rem (- theta (* 360 dt)) 360)
1fdb835 @ztellman more work on asteroids
authored
222 theta)
1b3f592 @ztellman move stuff into app/
authored
223 a (if (app/key-pressed? :up)
5d9adda @ztellman use efficient vector math
authored
224 (mul (cartesian theta) 3)
225 (vec2 0 0))
226 v (add v (mul a dt))
227 p (wrap (add p (mul v dt)))]
1fdb835 @ztellman more work on asteroids
authored
228 (assoc ship
229 :theta theta
230 :position p
231 :velocity v)))
232
233 (defn draw-spaceship [ship]
234 (push-matrix
5d9adda @ztellman use efficient vector math
authored
235 (translate (:position ship))
ef21b7e @ztellman move some stuff around
authored
236 (rotate (- (:theta ship) 90) 0 0 1)
95ffb39 @ztellman fix possible race condition with update loop
authored
237 (call-display-list fuselage)))
1fdb835 @ztellman more work on asteroids
authored
238
239 (defn gen-spaceship []
5d9adda @ztellman use efficient vector math
authored
240 {:position (vec2 0 0)
d1c2179 @ztellman undo tweaks I did for profiling
authored
241 :radius 0.5
5d9adda @ztellman use efficient vector math
authored
242 :velocity (vec2 0 0)
1fdb835 @ztellman more work on asteroids
authored
243 :theta 0
faed54a @ztellman better update support, better function names, and now the 'new' branc…
authored
244 :birth (app/now)})
1fdb835 @ztellman more work on asteroids
authored
245
ef21b7e @ztellman move some stuff around
authored
246 ;;game state
63e2c4a @ztellman fix textures, for real this time (sorry)
authored
247
963b0c9 @ztellman set titles for all examples
authored
248 (defn reset
249 "Reset to initial game state."
250 [state]
b573108 @ztellman finally finished asteroids
authored
251 (assoc state
252 :spaceship (gen-spaceship)
253 :asteroids (take 4 (repeatedly
ef21b7e @ztellman move some stuff around
authored
254 #(let [theta (rand 360)
5d9adda @ztellman use efficient vector math
authored
255 pos (cartesian (polar2 theta 2))]
227530f @ztellman make particle and asteroid generation a little more friendly on the eyes
authored
256 (gen-asteroid :position pos :theta theta :speed (rand)))))))
b573108 @ztellman finally finished asteroids
authored
257
963b0c9 @ztellman set titles for all examples
authored
258 (defn split-asteroid
259 "Turn asteroid into four sub-asteroids."
260 [asteroid]
ef21b7e @ztellman move some stuff around
authored
261 (when (< 0.25 (radius asteroid))
63e2c4a @ztellman fix textures, for real this time (sorry)
authored
262 (take 4
263 (repeatedly
227530f @ztellman make particle and asteroid generation a little more friendly on the eyes
authored
264 #(gen-asteroid
265 :position (position asteroid)
266 :radius (/ (radius asteroid) 2)
267 :speed (/ 1.5 (radius asteroid)))))))
63e2c4a @ztellman fix textures, for real this time (sorry)
authored
268
963b0c9 @ztellman set titles for all examples
authored
269 (defn gen-explosion
270 "Create particles within a given color range."
271 [num object [lo-color hi-color] speed]
63e2c4a @ztellman fix textures, for real this time (sorry)
authored
272 (take num
273 (repeatedly
227530f @ztellman make particle and asteroid generation a little more friendly on the eyes
authored
274 #(gen-particle
275 :position (position object)
276 :speed (rand speed)
277 :color (rand-color lo-color hi-color)
278 :lifespan 2))))
63e2c4a @ztellman fix textures, for real this time (sorry)
authored
279
963b0c9 @ztellman set titles for all examples
authored
280 (defn explode-asteroids
281 "Turn asteroid into sub-asteroids and explosion particles."
282 [asteroids state]
63e2c4a @ztellman fix textures, for real this time (sorry)
authored
283 (assoc state
d1c2179 @ztellman undo tweaks I did for profiling
authored
284 :asteroids (concat
285 (:asteroids state)
286 (mapcat split-asteroid asteroids))
287 :particles (concat
288 (:particles state)
b137979 @ztellman update examples a bit
authored
289 (mapcat #(gen-explosion (* (radius %) 100) % [[1 0.5 0] [1 1 0.2]] 2) asteroids))))
b573108 @ztellman finally finished asteroids
authored
290
963b0c9 @ztellman set titles for all examples
authored
291 (defn check-complete
292 "Are all the asteroids gone?"
293 [state]
b573108 @ztellman finally finished asteroids
authored
294 (if (zero? (count (:asteroids state)))
295 (reset state)
296 state))
297
963b0c9 @ztellman set titles for all examples
authored
298 (defn check-ship
299 "Has the ship collided with any asteroids?"
300 [state]
b573108 @ztellman finally finished asteroids
authored
301 (let [ship (:spaceship state)
302 asteroids (:asteroids state)
303 [hit missed] (separate #(intersects? ship %) asteroids)]
304 (if (some #(intersects? ship %) asteroids)
305 (assoc state
306 :asteroids (concat missed (mapcat split-asteroid hit))
307 :spaceship (gen-spaceship)
b137979 @ztellman update examples a bit
authored
308 :particles (concat (:particles state) (gen-explosion 300 ship [[0 0 0.6] [0.5 0.5 1]] 7)))
b573108 @ztellman finally finished asteroids
authored
309 state)))
310
963b0c9 @ztellman set titles for all examples
authored
311 (defn check-asteroids
312 "Have the asteroids collided with any bullets?"
313 [state]
b573108 @ztellman finally finished asteroids
authored
314 (let [bullets (:bullets state)
315 asteroids (:asteroids state)
316 collisions (for [a asteroids, b bullets :when (intersects? a b)] [a b])
317 [hit missed] (separate (set (map first collisions)) asteroids)
318 bullets (remove (set (map second collisions)) bullets)
319 particles (:particles state)]
d1c2179 @ztellman undo tweaks I did for profiling
authored
320 (explode-asteroids
b573108 @ztellman finally finished asteroids
authored
321 hit
322 (assoc state
323 :particles (remove expired? particles)
324 :bullets (remove expired? bullets)
325 :asteroids missed))))
63e2c4a @ztellman fix textures, for real this time (sorry)
authored
326
b99dbd4 @ztellman slight fix to asteroids
authored
327 (defn update-collisions [state]
328 (binding [*dim* (:dim state)]
b573108 @ztellman finally finished asteroids
authored
329 (-> state check-asteroids check-ship check-complete)))
b99dbd4 @ztellman slight fix to asteroids
authored
330
1fdb835 @ztellman more work on asteroids
authored
331 ;;game loop
332
114a1c5 @ztellman semi-proper lexical scoping
authored
333 (defn init [state]
faed54a @ztellman better update support, better function names, and now the 'new' branc…
authored
334 (app/title! "Asteroids")
0427331 @ztellman update for cantor 0.2.0
authored
335 (app/vsync! true)
faed54a @ztellman better update support, better function names, and now the 'new' branc…
authored
336 (app/key-repeat! false)
1fdb835 @ztellman more work on asteroids
authored
337 (init-asteroids)
b573108 @ztellman finally finished asteroids
authored
338 (init-particles)
339 (init-spaceship)
1fdb835 @ztellman more work on asteroids
authored
340 (enable :blend)
341 (blend-func :src-alpha :one-minus-src-alpha)
5d9adda @ztellman use efficient vector math
authored
342 (app/periodic-update! 25 update-collisions)
7cdb294 @ztellman update should be update!
authored
343 (app/periodic-update! 50 emit-flame)
b573108 @ztellman finally finished asteroids
authored
344 (reset state))
99952ea @ztellman use functions instead of macros where convenient
authored
345
346 (defn reshape [[x y w h] state]
5d9adda @ztellman use efficient vector math
authored
347 (let [dim (vec2 (* (/ w h) 10) 10)]
b573108 @ztellman finally finished asteroids
authored
348 (frustum-view 45 (/ w h) 0.1 100)
1fdb835 @ztellman more work on asteroids
authored
349 (load-identity)
5d9adda @ztellman use efficient vector math
authored
350 (translate 0 0 (- (* 2.165 (.y dim))))
1fdb835 @ztellman more work on asteroids
authored
351 (assoc state
352 :dim dim)))
99952ea @ztellman use functions instead of macros where convenient
authored
353
114a1c5 @ztellman semi-proper lexical scoping
authored
354 (defn key-press [key state]
a9757b8 @ztellman add load-texture-from-file
authored
355 (cond
356 (= key " ") (fire-bullet state)
faed54a @ztellman better update support, better function names, and now the 'new' branc…
authored
357 (= key :escape) (app/pause!)
dd61b3b @ztellman clock shouldn't require double derefs
authored
358 (= key "1") (app/speed! 0.5)
359 (= key "2") (app/speed! 1)
360 (= key "3") (app/speed! 2)
a9757b8 @ztellman add load-texture-from-file
authored
361 :else state))
114a1c5 @ztellman semi-proper lexical scoping
authored
362
1fdb835 @ztellman more work on asteroids
authored
363 (defn update [[dt time] state]
364 (binding [*dim* (:dim state)]
b99dbd4 @ztellman slight fix to asteroids
authored
365 (assoc state
366 :spaceship (update-spaceship dt (:spaceship state)))))
63e2c4a @ztellman fix textures, for real this time (sorry)
authored
367
368 (defn display [[dt time] state]
996d7dc @ztellman further fixes
authored
369 (text/write-to-screen (str (int (/ 1 dt)) " fps") 0 0)
1fdb835 @ztellman more work on asteroids
authored
370 (binding [*dim* (:dim state)]
b573108 @ztellman finally finished asteroids
authored
371 (with-enabled :texture-2d
372 (with-texture particle-tex
373 (doseq [p (concat (:particles state) (:bullets state))]
374 (render p))))
90574c0 @ztellman try that once more
authored
375 (with-disabled :texture-2d
376 (with-render-mode :wireframe
4ffd79e @ztellman rework opengl structure
authored
377 (doseq [a (:asteroids state)]
378 (render a)))
90574c0 @ztellman try that once more
authored
379 (draw-spaceship (:spaceship state)))
faed54a @ztellman better update support, better function names, and now the 'new' branc…
authored
380 (app/repaint!)))
76699d3 @ztellman got asteroids working
authored
381
382 (defn start []
383 (app/start
faed54a @ztellman better update support, better function names, and now the 'new' branc…
authored
384 {:reshape reshape, :init init, :key-press key-press, :update update, :display display}
a77082b @ztellman fix race condition in asteroids example
authored
385 {:dim *dim*}))
Something went wrong with that request. Please try again.