diff --git a/CrystalPoint.cpp b/CrystalPoint.cpp index 522fdf0..fee7b06 100644 --- a/CrystalPoint.cpp +++ b/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 diff --git a/World.cpp b/World.cpp index 550f400..a0de826 100644 --- a/World.cpp +++ b/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(); diff --git a/models/grass/Blauw.png b/models/grass/Blauw.png new file mode 100644 index 0000000..71c2716 Binary files /dev/null and b/models/grass/Blauw.png differ diff --git a/models/grass/grass.mtl b/models/grass/grass.mtl new file mode 100644 index 0000000..bb458ff --- /dev/null +++ b/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 + diff --git a/models/islands/Blauw.png b/models/islands/Blauw.png new file mode 100644 index 0000000..71c2716 Binary files /dev/null and b/models/islands/Blauw.png differ diff --git a/models/islands/Bruin.png b/models/islands/Bruin.png new file mode 100644 index 0000000..90695ca Binary files /dev/null and b/models/islands/Bruin.png differ diff --git a/models/islands/Grijs.png b/models/islands/Grijs.png new file mode 100644 index 0000000..2ebdd1f Binary files /dev/null and b/models/islands/Grijs.png differ diff --git a/models/islands/Groen.png b/models/islands/Groen.png new file mode 100644 index 0000000..82895f3 Binary files /dev/null and b/models/islands/Groen.png differ diff --git a/models/islands/Wit.png b/models/islands/Wit.png new file mode 100644 index 0000000..eef74b8 Binary files /dev/null and b/models/islands/Wit.png differ diff --git a/models/islands/congruent_pentagon_blue.png b/models/islands/congruent_pentagon_blue.png new file mode 100644 index 0000000..33ed4cc Binary files /dev/null and b/models/islands/congruent_pentagon_blue.png differ diff --git a/models/islands/isle.mtl b/models/islands/isle.mtl new file mode 100644 index 0000000..c5cf8ee --- /dev/null +++ b/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 + diff --git a/models/islands/isle2.mtl b/models/islands/isle2.mtl new file mode 100644 index 0000000..c5cf8ee --- /dev/null +++ b/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 + diff --git a/models/puddle/Blauw.png b/models/puddle/Blauw.png new file mode 100644 index 0000000..71c2716 Binary files /dev/null and b/models/puddle/Blauw.png differ diff --git a/models/puddle/Puddle.mtl b/models/puddle/Puddle.mtl new file mode 100644 index 0000000..4c1b3f1 --- /dev/null +++ b/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 + diff --git a/models/puddle/congruent_pentagon2.png b/models/puddle/congruent_pentagon2.png new file mode 100644 index 0000000..16729fd Binary files /dev/null and b/models/puddle/congruent_pentagon2.png differ diff --git a/models/puddle/congruent_pentagon_blue.png b/models/puddle/congruent_pentagon_blue.png new file mode 100644 index 0000000..33ed4cc Binary files /dev/null and b/models/puddle/congruent_pentagon_blue.png differ diff --git a/models/trees/Bruin.png b/models/trees/Bruin.png new file mode 100644 index 0000000..90695ca Binary files /dev/null and b/models/trees/Bruin.png differ diff --git a/models/trees/Groen_1.png b/models/trees/Groen_1.png new file mode 100644 index 0000000..67b5d50 Binary files /dev/null and b/models/trees/Groen_1.png differ diff --git a/models/trees/tree1.mtl b/models/trees/tree1.mtl new file mode 100644 index 0000000..b34d24f --- /dev/null +++ b/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 + diff --git a/models/trees/tree2.mtl b/models/trees/tree2.mtl new file mode 100644 index 0000000..b34d24f --- /dev/null +++ b/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 + diff --git a/models/trees/tree3.mtl b/models/trees/tree3.mtl new file mode 100644 index 0000000..b34d24f --- /dev/null +++ b/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 + diff --git a/models/trees/tree4.mtl b/models/trees/tree4.mtl new file mode 100644 index 0000000..b34d24f --- /dev/null +++ b/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 + diff --git a/models/trees/tree5.mtl b/models/trees/tree5.mtl new file mode 100644 index 0000000..b34d24f --- /dev/null +++ b/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 + diff --git a/worlds/ice.json b/worlds/ice.json index 7327571..962549a 100644 --- a/worlds/ice.json +++ b/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", diff --git a/worlds/watermap.png b/worlds/watermap.png new file mode 100644 index 0000000..dce80bc Binary files /dev/null and b/worlds/watermap.png differ diff --git a/worlds/watertexture.png b/worlds/watertexture.png new file mode 100644 index 0000000..3895412 Binary files /dev/null and b/worlds/watertexture.png differ diff --git a/worlds/worlds.json b/worlds/worlds.json index d1e8428..ebdd66e 100644 --- a/worlds/worlds.json +++ b/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" ] } \ No newline at end of file