 (defn create-ball-body!
   [screen x y radius]
   (->> (circle radius)
-       (fixture :density 1 :friction 0 :restitution 1 :shape)
-       (create-body! screen :dynamic :set-transform x y 0 :create-fixture)))
+       (fixture-def :density 1 :friction 0 :restitution 1 :shape)
+       (create-body! screen (body-def :dynamic)
+                     :set-transform x y 0 :create-fixture)))
 
 (defn create-rect-body!
   [screen x y width height]

        0 0]
       float-array
       (chain :create-chain)
       (fixture :density 1 :shape)
       (create-body! screen :static :set-transform x y 0 :create-fixture)))

(defn move-paddle!
  [entities]

          game-w (/ (game :width) pixels-per-tile)
          game-h (/ (game :height) pixels-per-tile)
          floor-h (/ 1 pixels-per-tile)
          block (texture "block.png")
          block-w (/ (texture! block :get-region-width) pixels-per-tile)
          block-h (/ (texture! block :get-region-height) pixels-per-tile)
          block-cols (int (/ game-w block-w))
          block-rows (int (/ game-h 2 block-h))
          ball (create-ball-entity! screen)
          paddle (create-rect-entity! screen block 0 0 block-w block-h)
          wall {:body (create-rect-body! screen 0 0 game-w game-h)}
          floor {:body (create-rect-body! screen 0 0 game-w floor-h)}]
      ; set the screen width in tiles
      (width! screen game-w)
      ; attach the ball to the paddle so it can't reach the blocks
      ; (this is only meant to test that joints work)
      (comment create-joint! screen
               (joint-def :rope
                          :body-a (:body ball)
                          :body-b (:body paddle)
                          :max-length 5
                          :collide-connected true))
      ; return the entities
      [(assoc ball :ball? true)
       (assoc paddle :paddle? true)
       (assoc wall :wall? true)
       (assoc floor :floor? true)
       (for [col (range block-cols)
             row (range block-rows)
             :let [x (* col block-w)
                   y (+ (* row block-h) (- game-h (* block-h block-rows)))]]
         (assoc (create-rect-entity! screen block x y block-w block-h)
                :block? true))]))
  :on-render
  (fn [screen entities]
    (clear!)
