Kaynağa Gözat

Update TODO

Miloslav Ciz 3 yıl önce
ebeveyn
işleme
31eb37a651
4 değiştirilmiş dosya ile 12 ekleme ve 8 silme
  1. 6 5
      TODO.txt
  2. 1 1
      programs/make.sh
  3. 4 1
      programs/stack.c
  4. 1 1
      programs/water.c

+ 6 - 5
TODO.txt

@@ -9,25 +9,26 @@ TODO:
 - test different tick lengths (demo)
 - test different tick lengths (demo)
 - test env functions with a single distinct point near camera
 - test env functions with a single distinct point near camera
 - env function: heightmap
 - env function: heightmap
-- demo: soft net (water surface?)
 - bounding box/sphere test functions/macros for optimization of environment
 - bounding box/sphere test functions/macros for optimization of environment
   building, plus a demo that tests if it actually accelerates it
   building, plus a demo that tests if it actually accelerates it
 - test ray casting (e.g. the hit of an outside ray should always be outside)
 - test ray casting (e.g. the hit of an outside ray should always be outside)
-- check if using fastBSphere vs normal BSphere doesn't affect the simulation
-  result (it shouldn't)
-- fine tune the number of reshapes needed for nice behavior
-- bug? bodies stuck inside each other resist falling down by gravity (stack.c)
 
 
 DONE:
 DONE:
 - demo: car
 - demo: car
+- bug? bodies stuck inside each other resist falling down by gravity (stack.c)
+  ^ Seems to be okay now?
 - ray casting against bodies
 - ray casting against bodies
 - world state hash? for testing determinism etc.
 - world state hash? for testing determinism etc.
+- check if using fastBSphere vs normal BSphere doesn't affect the simulation
+  result (it shouldn't) <-- on stacks.c gave the same world hash
+- fine tune the number of reshapes needed for nice behavior
 - body being pushed (e.g. by gravity) onto a sharp edge will likely not resist
 - body being pushed (e.g. by gravity) onto a sharp edge will likely not resist
   (due to only linear forces in connections) and will very easily be split very
   (due to only linear forces in connections) and will very easily be split very
   wide -- TRY AND FIX! Fix could be e.g. in a special function that checks
   wide -- TRY AND FIX! Fix could be e.g. in a special function that checks
   whether any connection is over some tension limit and if so inverts velocities
   whether any connection is over some tension limit and if so inverts velocities
   of its joints? OR MAYBE RATHER start applying proportional (as opposed to
   of its joints? OR MAYBE RATHER start applying proportional (as opposed to
   current linear) acceleration due to tension after some tension limit.
   current linear) acceleration due to tension after some tension limit.
+- demo: soft net (water surface?)
 - try this: when reshaping body, also try to subtract velocities of joints that
 - try this: when reshaping body, also try to subtract velocities of joints that
   go against each other along a connection, i.e. velocities that should cancel
   go against each other along a connection, i.e. velocities that should cancel
   out... maybe this reduces shaking?
   out... maybe this reduces shaking?

+ 1 - 1
programs/make.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
 #!/bin/bash
 
 
-PROGRAM=water # change this to name of a program you want to compile :)
+PROGRAM=stack # change this to name of a program you want to compile :)
 
 
 clear; clear; g++ -x c -g -fmax-errors=5 -pedantic -O3 -Wall -Wextra -Wstrict-prototypes -Wold-style-definition -Wno-unused-parameter -Wno-missing-field-initializers -o $PROGRAM $PROGRAM.c -lm -lSDL2 && ./$PROGRAM
 clear; clear; g++ -x c -g -fmax-errors=5 -pedantic -O3 -Wall -Wextra -Wstrict-prototypes -Wold-style-definition -Wno-unused-parameter -Wno-missing-field-initializers -o $PROGRAM $PROGRAM.c -lm -lSDL2 && ./$PROGRAM

+ 4 - 1
programs/stack.c

@@ -37,7 +37,7 @@ int main(void)
       default: break;
       default: break;
     }
     }
 
 
-    TPE_bodyMove(&tpe_world.bodies[tpe_world.bodyCount - 1],TPE_vec3((1 - (i % 4)) * 1200,8000,(2 - (i / 4)) * 1200));
+    TPE_bodyMoveBy(&tpe_world.bodies[tpe_world.bodyCount - 1],TPE_vec3((1 - (i % 4)) * 1200,8000,(2 - (i / 4)) * 1200));
   } 
   } 
 
 
   while (helper_running)
   while (helper_running)
@@ -69,6 +69,9 @@ int main(void)
 
 
     timeMeasure += helper_getMicroSecs() - t1;
     timeMeasure += helper_getMicroSecs() - t1;
 
 
+if (helper_frame == 200)
+  printf("hash: %lu\n",TPE_worldHash(&tpe_world));
+
     for (int i = 0; i < tpe_world.bodyCount; ++i)
     for (int i = 0; i < tpe_world.bodyCount; ++i)
     {
     {
       TPE_bodyApplyGravity(&tpe_world.bodies[i],(5 * 30) / FPS);
       TPE_bodyApplyGravity(&tpe_world.bodies[i],(5 * 30) / FPS);

+ 1 - 1
programs/water.c

@@ -4,7 +4,7 @@
 
 
 #define GRID_RESOLUTION 8
 #define GRID_RESOLUTION 8
 #define GRID_STEP 1000
 #define GRID_STEP 1000
-#define JOINT_SIZE 300
+#define JOINT_SIZE 100
 #define BALL_SIZE 700
 #define BALL_SIZE 700
 
 
 #define ROOM_SIZE (GRID_RESOLUTION * GRID_STEP + JOINT_SIZE)
 #define ROOM_SIZE (GRID_RESOLUTION * GRID_STEP + JOINT_SIZE)