From 9131e16f7bef2972c48531d9eebc1fe120b2615f Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Fri, 15 Jan 2010 14:36:45 -0800 Subject: [PATCH] bump game demos up to 60fps. we have the technology --- extra/gpu/demos/bunny/bunny.factor | 2 +- extra/gpu/demos/raytrace/raytrace.factor | 2 +- extra/terrain/terrain.factor | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/extra/gpu/demos/bunny/bunny.factor b/extra/gpu/demos/bunny/bunny.factor index d5ecb16458..57fcf4e3ea 100644 --- a/extra/gpu/demos/bunny/bunny.factor +++ b/extra/gpu/demos/bunny/bunny.factor @@ -294,7 +294,7 @@ AFTER: bunny-world resize-world [ sobel>> framebuffer>> ] [ dim>> ] bi resize-framebuffer ; M: bunny-world pref-dim* drop { 1024 768 } ; -M: bunny-world tick-length drop 1000000 30 /i ; +M: bunny-world tick-length drop 1000000 60 /i ; M: bunny-world wasd-movement-speed drop 1/160. ; M: bunny-world wasd-near-plane drop 1/32. ; M: bunny-world wasd-far-plane drop 256.0 ; diff --git a/extra/gpu/demos/raytrace/raytrace.factor b/extra/gpu/demos/raytrace/raytrace.factor index 94a8d17925..bac55beacd 100644 --- a/extra/gpu/demos/raytrace/raytrace.factor +++ b/extra/gpu/demos/raytrace/raytrace.factor @@ -93,7 +93,7 @@ M: raytrace-world draw-world* } render ; M: raytrace-world pref-dim* drop { 1024 768 } ; -M: raytrace-world tick-length drop 1000000 30 /i ; +M: raytrace-world tick-length drop 1000000 60 /i ; M: raytrace-world wasd-movement-speed drop 1/4. ; : raytrace-window ( -- ) diff --git a/extra/terrain/terrain.factor b/extra/terrain/terrain.factor index a6fdc5eab6..89c7ccb8ba 100644 --- a/extra/terrain/terrain.factor +++ b/extra/terrain/terrain.factor @@ -21,14 +21,14 @@ CONSTANT: VELOCITY-MODIFIER-NORMAL float-4{ 1.0 1.0 1.0 0.0 } CONSTANT: VELOCITY-MODIFIER-FAST float-4{ 2.0 1.0 2.0 0.0 } CONSTANT: BOUNCE float-4{ 1.0 -0.2 1.0 1.0 } CONSTANT: PLAYER-HEIGHT 1/256. -CONSTANT: GRAVITY float-4{ 0.0 -1/4096. 0.0 0.0 } -CONSTANT: JUMP 1/1024. -CONSTANT: MOUSE-SCALE 1/10. -CONSTANT: MOVEMENT-SPEED 1/16384. -CONSTANT: FRICTION float-4{ 0.95 0.99 0.95 1.0 } +CONSTANT: GRAVITY float-4{ 0.0 -1/8192. 0.0 0.0 } +CONSTANT: JUMP 1/2048. +CONSTANT: MOUSE-SCALE 1/20. +CONSTANT: MOVEMENT-SPEED 1/32768. +CONSTANT: FRICTION float-4{ 0.97 0.995 0.97 1.0 } CONSTANT: COMPONENT-SCALE float-4{ 0.5 0.01 0.0005 0.0 } -CONSTANT: SKY-PERIOD 1200 -CONSTANT: SKY-SPEED 0.0005 +CONSTANT: SKY-PERIOD 2400 +CONSTANT: SKY-SPEED 0.00025 CONSTANT: terrain-vertex-size { 512 512 } @@ -56,7 +56,7 @@ TUPLE: terrain-world < game-world VELOCITY-MODIFIER-NORMAL >>velocity-modifier ; M: terrain-world tick-length - drop 1000000 30 /i ; + drop 1000000 60 /i ; : frustum ( dim -- -x x -y y near far ) dup first2 min v/n