                 (update-node-velocities
                     (:nodes state)
                     (calculate-all-node-forces state)
+                    (calculate-all-node-impulses (:nodes state) tick-step)
                     tick-step)
                 tick-step)))
 
-(defn tick [game-state-ref input-state] (do
-    (swap! game-state-ref #(tick-imp % tick-step input-state))))
+(defn tick [game-state-ref input-state] (let [real-step (* 0.001 (real-tick-step))] (do
+    (swap! game-state-ref #(tick-imp % real-step input-state)))))
 
 (defn world-to-screen [[x y]]
     [x (- 275 y)])

        game-state-ref (atom initial-game-state)
        input-state-ref (atom {:keys (set)})
        canvas (dom/createDom "div" {} "")
        tick-timer (goog.Timer. (Math/round (* 1000 tick-step)))
        render-timer (goog.Timer. (Math/round (* 1000 render-step)))
        ]
        (do
            (. tick-timer (start))

        [goog.graphics.Stroke :as Stroke]
        [goog.graphics.SolidFill :as SolidFill]
        [goog.graphics.Path :as Path]
        [goog.date.UtcDateTime :as UtcDateTime]
        ))

(def my-code-url "https://github.com/pauldoo/scratch/blob/master/ClojureScript/hello.cljs")
(def width-in-px 800)
(def height-in-px 300)
(def ideal-tick-step (/ 1 100))
(def worst-tick-step (/ 1 50))
(def ideal-render-step (/ 1 25))
(def gravity-strength 500)
(def ground-rebound-strength 500)
(def ground-drag-factor 30)
(def air-drag-factor 1)

(defn print-to-log [v]
    (.log js/console v))

(defn print-passer [v] (do
    (print-to-log (pr-str v))
    v))


(def vec- (partial map -))
(def vec+ (partial map +))
