Browse Source

big progress

vlod 6 months ago
parent
commit
633a874f7e

+ 27 - 6
Pika/gameplay/containers/silksong/silkSong.h

@@ -224,7 +224,7 @@ struct SilkSong: public Container
 
 	glm::vec2 draggedStart = {};
 
-	bool followPlayer = false;
+	bool followPlayer = true;
 	bool dragGeometry = false;
 	bool renderGeometry = true;
 	int selectType = 0;
@@ -262,7 +262,8 @@ struct SilkSong: public Container
 		renderer.currentCamera.zoom = 80.f;
 		renderer.currentCamera.position.x = -440;
 		renderer.currentCamera.position.y = -500;
-		renderer.currentCamera3D.position.z = 2;
+		renderer.currentCamera3D.position.z = 0.5;
+		renderer.currentCamera3D.position.y = 0.2;
 
 
 		blurShader = gl2d::createPostProcessShaderFromFile(PIKA_RESOURCES_PATH "hollowknight/blur.frag");
@@ -335,6 +336,19 @@ struct SilkSong: public Container
 		Block floor;
 		floor.create(world, {-1000, 10, 2000, 1}, 0, b2BodyType::b2_staticBody);
 
+		floor.create(world, {-5.1, -5, 4.2, 40}, 0, b2BodyType::b2_staticBody);
+		floor.create(world, {-1.0, 5.5, 3.85, 10}, 0, b2BodyType::b2_staticBody);
+
+
+		floor.create(world, {15.4, 8.3, 2.1, 0.53}, 0, b2BodyType::b2_staticBody);
+
+		floor.create(world, {17.5, 6.8, 6.2, 0.6}, 0, b2BodyType::b2_staticBody);
+
+		floor.create(world, {25.0, 6.8, 10.2, 0.6}, 0, b2BodyType::b2_staticBody);
+
+		floor.create(world, {32.3, 2.7, 6.2, 20.6}, 0, b2BodyType::b2_staticBody);
+
+
 
 		return true;
 	}
@@ -424,9 +438,16 @@ struct SilkSong: public Container
 			{
 				if (vel.x < 5) force = inputMetrics.speed;
 			}
+
+			float MAX = 4;
+			if (vel.x > MAX) { vel.x = MAX; }
+			if (vel.x < -MAX) { vel.x = -MAX; }
 		
 			character.physicalBody.dynamicBody->ApplyForce(b2Vec2(force, 0), 
 				character.physicalBody.dynamicBody->GetWorldCenter(), true);
+
+
+		
 		}
 
 		bool hitsGround = 0;
@@ -549,9 +570,9 @@ struct SilkSong: public Container
 					static float animationTimer = 0;
 					
 					animationTimer += input.deltaTime;
-					if (animationTimer > 0.33)
+					if (animationTimer > 0.11)
 					{
-						animationTimer -= 33;
+						animationTimer -= 0.11;
 						animationPosition++;
 					}
 					if (animationPosition >= 8) { animationPosition = 1; }
@@ -920,8 +941,8 @@ struct SilkSong: public Container
 		//renderer.popCamera();
 		//renderer.popCamera3D();
 
-		//requestedInfo.writeEntireFileBinary(PIKA_RESOURCES_PATH "hollowknight/inputMetrics.bin",
-		//	&inputMetrics, sizeof(inputMetrics));
+		requestedInfo.writeEntireFileBinary(PIKA_RESOURCES_PATH "hollowknight/inputMetrics.bin",
+			&inputMetrics, sizeof(inputMetrics));
 
 	#pragma endregion
 

BIN
Pika/resources/hollowknight/inputMetrics.bin


BIN
Pika/resources/hollowknight/map2 - Copy.bin


BIN
Pika/resources/hollowknight/map21 - Copy.bin


BIN
Pika/resources/hollowknight/map21.bin


BIN
Pika/resources/hollowknight/map22.bin


+ 15 - 8
Pika/resources/logs.txt

@@ -1,8 +1,15 @@
-#2025-06-06 17:44:36[error]: Error reading map file
-#2025-06-06 17:44:36: Created container: SilkSong
-#2025-06-06 18:06:21: Destroyed continer: SilkSong #1
-#2025-06-06 18:08:17[warning]: Couldn't reloaded dll
-#2025-06-06 18:08:20: Reloaded dll
-#2025-06-06 18:08:45[error]: Error reading map file
-#2025-06-06 18:08:45: Created container: SilkSong
-#2025-06-06 18:09:32: Destroyed continer: SilkSong #2
+#2025-06-07 00:25:03[warning]: Couldn't reloaded dll
+#2025-06-07 00:25:04: Reloaded dll
+#2025-06-07 00:25:24[error]: Error reading map file
+#2025-06-07 00:25:24: Created container: SilkSong
+#2025-06-07 00:25:41: Destroyed continer: SilkSong #1
+#2025-06-07 00:25:47[warning]: Couldn't reloaded dll
+#2025-06-07 00:25:49: Reloaded dll
+#2025-06-07 00:26:00[error]: Error reading map file
+#2025-06-07 00:26:00: Created container: SilkSong
+#2025-06-07 00:26:15: Destroyed continer: SilkSong #2
+#2025-06-07 00:26:27[warning]: Couldn't reloaded dll
+#2025-06-07 00:26:29: Reloaded dll
+#2025-06-07 00:28:13[error]: Error reading map file
+#2025-06-07 00:28:13: Created container: SilkSong
+#2025-06-07 00:28:54: Destroyed continer: SilkSong #3