Bläddra i källkod

added ice world base

Jannick van Ballegooijen 9 år sedan
förälder
incheckning
ddadafecff

+ 1 - 1
CrystalPoint.cpp

@@ -93,7 +93,7 @@ void CrystalPoint::update()
 
 		if (!worldhandler->isPlayerPositionValid())
 			player->position = oldPosition;
-		player->position.y = worldhandler->getHeight(player->position.x, player->position.z) + 1.7f;
+		player->position.y = worldhandler->getHeight(player->position.x, player->position.z) + 2.5f;
 		worldhandler->update(deltaTime);
 	}	
 	else

+ 3 - 1
World.cpp

@@ -243,12 +243,14 @@ void World::draw()
 {
 	player->setCamera();
 
-	float lightPosition[4] = { 0, 2, 1, 0 };
+	float lightPosition[4] = { 0, 12, 1, 0 };
 	glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
 
 	GLfloat lightAmbient[] = { 0.05, 0.05, 0.05, 0 };
 	GLfloat light_diffuse[] = { 0.9, 0.9, 0.9, 0 };
 	glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse);
+	GLfloat mat_specular[] = { 0.15, 0.15, 0.15, 0 };
+	glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
 	glLightfv(GL_LIGHT0, GL_AMBIENT, lightAmbient);
 
 	skybox->draw();

BIN
models/grass/Blauw.png


+ 9 - 0
models/grass/grass.mtl

@@ -0,0 +1,9 @@
+# WaveFront *.mtl file (generated by CINEMA 4D)
+
+newmtl Mat
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd Blauw.png
+Ks 1.00000000000000 1.00000000000000 1.00000000000000
+Ns 100
+illum 7
+

BIN
models/islands/Blauw.png


BIN
models/islands/Bruin.png


BIN
models/islands/Grijs.png


BIN
models/islands/Groen.png


BIN
models/islands/Wit.png


BIN
models/islands/congruent_pentagon_blue.png


+ 28 - 0
models/islands/isle.mtl

@@ -0,0 +1,28 @@
+# WaveFront *.mtl file (generated by CINEMA 4D)
+
+newmtl Mat
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd Groen.png
+Ks 1.00000000000000 1.00000000000000 1.00000000000000
+Ns 100
+illum 7
+
+newmtl Mat.3
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd Bruin.png
+Ks 1.00000000000000 1.00000000000000 1.00000000000000
+Ns 100
+illum 7
+
+newmtl Mat.2
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd Blauw.png
+illum 7
+
+newmtl Mat.1
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd Wit.png
+Ks 1.00000000000000 1.00000000000000 1.00000000000000
+Ns 100
+illum 7
+

+ 28 - 0
models/islands/isle2.mtl

@@ -0,0 +1,28 @@
+# WaveFront *.mtl file (generated by CINEMA 4D)
+
+newmtl Mat
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd Groen.png
+Ks 1.00000000000000 1.00000000000000 1.00000000000000
+Ns 100
+illum 7
+
+newmtl Mat.3
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd Bruin.png
+Ks 1.00000000000000 1.00000000000000 1.00000000000000
+Ns 100
+illum 7
+
+newmtl Mat.2
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd Blauw.png
+illum 7
+
+newmtl Mat.1
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd Wit.png
+Ks 1.00000000000000 1.00000000000000 1.00000000000000
+Ns 100
+illum 7
+

BIN
models/puddle/Blauw.png


+ 21 - 0
models/puddle/Puddle.mtl

@@ -0,0 +1,21 @@
+# WaveFront *.mtl file (generated by CINEMA 4D)
+
+newmtl Mat.2
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd congruent_pentagon2.png
+illum 7
+
+newmtl Mat
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd Blauw.png
+Ks 1.00000000000000 1.00000000000000 1.00000000000000
+Ns 100
+illum 7
+
+newmtl Mat.1
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd congruent_pentagon_blue.png
+Ks 1.00000000000000 1.00000000000000 1.00000000000000
+Ns 100
+illum 7
+

BIN
models/puddle/congruent_pentagon2.png


BIN
models/puddle/congruent_pentagon_blue.png


BIN
models/trees/Bruin.png


BIN
models/trees/Groen_1.png


+ 12 - 0
models/trees/tree1.mtl

@@ -0,0 +1,12 @@
+# WaveFront *.mtl file (generated by CINEMA 4D)
+
+newmtl Mat
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd Groen_1.png
+illum 7
+
+newmtl Mat.1
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd Bruin.png
+illum 7
+

+ 12 - 0
models/trees/tree2.mtl

@@ -0,0 +1,12 @@
+# WaveFront *.mtl file (generated by CINEMA 4D)
+
+newmtl Mat
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd Groen_1.png
+illum 7
+
+newmtl Mat.1
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd Bruin.png
+illum 7
+

+ 12 - 0
models/trees/tree3.mtl

@@ -0,0 +1,12 @@
+# WaveFront *.mtl file (generated by CINEMA 4D)
+
+newmtl Mat
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd Groen_1.png
+illum 7
+
+newmtl Mat.1
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd Bruin.png
+illum 7
+

+ 12 - 0
models/trees/tree4.mtl

@@ -0,0 +1,12 @@
+# WaveFront *.mtl file (generated by CINEMA 4D)
+
+newmtl Mat
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd Groen_1.png
+illum 7
+
+newmtl Mat.1
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd Bruin.png
+illum 7
+

+ 12 - 0
models/trees/tree5.mtl

@@ -0,0 +1,12 @@
+# WaveFront *.mtl file (generated by CINEMA 4D)
+
+newmtl Mat
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd Groen_1.png
+illum 7
+
+newmtl Mat.1
+Kd 0.80000001192093 0.80000001192093 0.80000001192093
+map_Kd Bruin.png
+illum 7
+

+ 52 - 11
worlds/ice.json

@@ -1,30 +1,71 @@
 {
   "world": {
-    "heightmap": "worlds/hmcs.png",
-    "texture":  "worlds/hmcstexture.png",
-    "skybox": "skyboxes/peaceful/",
+    "heightmap": "worlds/watermap.png",
+    "texture": "worlds/watertexture.png",
+	"skybox": "skyboxes/water/",
+	"music":  "WAVE/test2.wav",
     "object-templates": [
       {
-        "color": 100,
-        "file": "models/boom/Boom.obj",
+        "color": 205,
+        "file": "models/puddle/Puddle.obj",
         "collision": true
+      },
+      {
+        "color": 220,
+        "file": "models/islands/isle.obj",
+        "collision": false
+      },
+      {
+        "color": 223,
+        "file": "models/islands/isle2.obj",
+        "collision": false
+      },
+      {
+        "color": 210,
+        "file": "models/trees/tree1.obj",
+        "collision": true
+      },
+      {
+        "color": 211,
+        "file": "models/trees/tree2.obj",
+        "collision": true
+      },
+      {
+        "color": 212,
+        "file": "models/trees/tree3.obj",
+        "collision": true
+      },
+      {
+        "color": 213,
+        "file": "models/trees/tree4.obj",
+        "collision": true
+      },
+      {
+        "color": 214,
+        "file": "models/trees/tree5.obj",
+        "collision": true
+      },
+      {
+        "color": 215,
+        "file": "models/grass/grass.obj",
+        "collision": false
       }
-    ],
-	"music": "WAVE/bond.wav"
+    ]
   },
   "player": {
-    "startposition": [ 1, 5, 20 ]
+    "startposition": [ 375, 5, 375 ]
   },
   "objects": [ ],
   "portal": {     
     "file": "models/Teleporter/Teleporter.obj",
-    "pos": [ 10, 5, 10 ]    
+    "pos": [ 385, 5, 366 ]    
   },
   "enemies": [
   {
       "file": "models/squid/Blooper.obj",
-      "pos": [ 20, 5, 10 ],
-      "scale": 0.01
+      "pos": [ 350, 5, 350 ],
+      "scale": 0.01,
+      "music": "WAVE/enemy.wav"
   }],
   "crystal": {
     "full texture": "models/crystal/Crystal.obj",

BIN
worlds/watermap.png


BIN
worlds/watertexture.png


+ 2 - 2
worlds/worlds.json

@@ -1,8 +1,8 @@
 {
   "worlds": [
-    "worlds/small.json",
-	  "worlds/rock.json",
     "worlds/ice.json",
+    "worlds/small.json",
+    "worlds/rock.json",
     "worlds/fire.json"
   ]
 }