{{FULL_COURSE}} Final Project - Mini Minecraft Milestone 3
Overview
-----
This week you'll work on a feature, or features, entirely of your own choosing.
Pick a feature or multiple features from the suggestions below, or propose a
feature to Adam. If you earn more than 50 points, the additional points will be
extra credit. This week, you should also focus on finalizing the features you
worked on in weeks 1 and 2.
We highly recommend attempting to implement a unique feature; if you are able
to make your implementation of Mini Minecraft stand out from the others it will
make for much better demo reel material.
Videos of Previous Semesters' Work
--------------
We have compiled a collection of the most unique and impressive Mini Minecraft
submissions over the years. Take a look at them for inspiration!
[Video Collection](https://docs.google.com/spreadsheets/d/1z-qQ484CUrz531GfjJihktqAXSPU1MoNelbf0E1SIlo/edit?usp=sharing)
Help Log (5 points)
-------
Maintain a log of all help you receive and resources you use. Make sure the date
and time, the names of everyone you work with or get help from, and every URL
you use, except as noted in the collaboration policy. Also briefly log your
question, bug or the topic you were looking up/discussing. Ideally, you should
also the answer to your question or solution to your bug. This will help you
learn and provide a useful reference for future assignments and exams. This also
helps us know if there is a topic that people are finding difficult.
If you did not use external resources or otherwise receive help, please submit
a help log that states you did not receive external help.
You may submit your help log as an ASCII (plain) text file or as a PDF. Refer
to the Policies section of the course web site for more specifications.
Week 3 Milestone Ideas (50 points per person, Maximum extra credit 50 points)
-------
Due Monday, December 9 at 12:00 NOON
-------
Please note that the features listed below are just suggestions; you do not
have to implement them exactly as they are written, and you may implement
features entirely of your own design if you so choose. If you opt to do so,
make sure you run your idea past Adam so he can determine its point value.
* __Rivers (50 pts):__ Using 2D L-systems, procedurally generate branching rivers
that carve themselves out of the surface terrain. For more organic-looking river trails,
consider having drawing rules along the lines of "move forward along a small arc and carve
that arc out of the terrain" rather than plain "move forward along a straight line". Below
is a video with an example of an L-system river.
* __Additional Biomes (50 pts):__ Add additional block types such as `SNOW` or `SAND`, and
distribute patches of these new block types over large areas of your world. For
additional points, modify the structure of your terrain in these areas to
reflect things like flat deserts or frigid mountains. The biomes should smoothly
transition between one another near their borders. You might use two different
noise functions to generate a map of moisture and temperature (or overall elevation) and use
those to determine what biome your terrain currently lies in.
For inspiration, you can
always peruse the list of [biomes](https://minecraft.gamepedia.com/Biome)
featured in the official Minecraft game. Also take a look at this person's
[custom biomes Minecraft mod](https://www.spigotmc.org/resources/danns-world-generator-oasis-desert-demo-1-14-x-1-15-x-uses-an-organic-tree-generator.74083/)
for visual inspiration.
* __Procedurally placed assets (10-25 points):__ Code some "primitive" assets like
trees or buildings and procedurally place them throughout your world. The more
interesting your asset design and placement, the more points you'll receive.
You could even match the asset type to biome, such as placing pyramids in
desert biomes and giant icicles in snowy biomes.
* __Procedural buildings with shape grammars (25 - 50 points):__ Using
L-systems, procedurally generate large buildings. The more interesting your
building design and the more complex your grammar, the more points you'll earn.
* __Procedural grass color (20 pts):__ Using the Minecraft texture set with
grey grass tiles, dynamically color the grass blocks in your world according to
some biome-like distribution. You'll notice that the GRASS_TOP and GRASS_SIDE
(two to the left of GRASS_TOP) textures are grey in this texture atlas; you can
combine them with a base color in your fragment shader to create differently
colored grass. Your grass colors should blend smoothly between biome-like
areas.
Below is a video showcasing the procedural features listed above:
* __Fluid "simulation" (40 pts):__ Allow `WATER` and `LAVA` blocks to expand
and flow to fill empty space, along with having slanted block hulls to represent
the flow's direction. The textures of these blocks should be animated such that
they move to follow the flow's direction. Additionally, when the `Player` is
standing in a flowing fluid, they should be moved along the flow's direction.
* __Water waves (10 - 25 points):__ In a vertex shader, distort the surface of
`WATER` block such that they appear move up and down as though distorted by
waves. For additional points, distort your water's surface normals to accurately
reflect their surface displacement. You might consider giving your water a
glossy highlight with Blinn-Phong to better view the normal displacement.
* __Post-process Camera Overlay (20 points):__ When the `Player` enters `WATER` or `LAVA` blocks,
rather than displaying a simple blue or red screen overlay, apply some sort of
interesting fluid-like screen distortion and coloration instead. You should use
noise functions to distort your player's view, and the distortion should animate
as a function of time.
* __Weather (50 pts):__ Procedurally create weather such as rain, snow, and
sun. Allow these weather patches to move throughout the world. The player
should be able to see the weather both as billboard elements like rain and as a
sky background (for example, the background could fade to a grey gradient when
rain comes). Additionally, an overlay on the player's screen with raindrop
or snowflake splats that appear and fade out over time should be rendered, to
simulate water or snow getting in the player's eyes.
* __Shadow mapping (70 pts):__ Create dynamic real-time shadows using the
technique known as shadow mapping. First, render your entire world using an
orthographic camera oriented along the direction from which light comes.
Notably, this render pass should be saved to a texture buffer on your GPU, and
should only save the depth of each fragment in screen space. Using this 2D
array of depths, determine whether or not each fragment seen by the main
viewing camera is in shadow or in light. A very helpful tutorial on shadow
mapping can be found at
[OpenGL-Tutorial.org](http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-16-shadow-mapping/)
* __NPCs and AI (50+ pts):__ Create basic NPCs, such as sheep, that wander
around the world. They should be able to navigate terrain, such as jumping
whenever they encounter a wall. For more bonus points, implement a pathfinding
algorithm that lets the AI agent find its way to some target (such as the
player or a specific block) even if there is some impassable terrain directly
between it and its goal.
* __ Greyscale image file as height map (15 pts):__ Allow the user to load a greyscale
image to function as a height map that directly modifies a portion of the
world. For example, the player might open a `QFileDialog` to select the image,
then the image will be used to modify an area with a size equal to the
dimensions of the image, where the area is centered on the player.
* __ Color image file as height map (20 pts):__ Allow the user to load a color
image to function as a height map that directly modifies a portion of the
world. For example, the player might open a `QFileDialog` to select the image,
then the image will be used to modify an area with a size equal to the
dimensions of the image, where the area is centered on the player. It is
recommended to use the greyscale value of each pixel to determine the
height value of each cell. Additionally, the block type used for each (X, Z)
coordinate should correspond to the color of the pixel in the image used to
generate the height of that column. The block type's color should generally
match the pixel color.
* __Voxelization of OBJ meshes (50 pts):__ Enable your game engine to load in OBJ
files and replicate their surface structure with Minecraft blocks. If you're uncertain
how to begin, consider looking up the term "mesh voxelization"; there are all
sorts of resources on the subject.
* __Inventory and onscreen GUI (50+ pts):__ Allow the player to select which
type of block they will place by creating an onscreen GUI that can be called
up by pressing a particular key, such as `I`. You could also allow the player
to collect blocks by breaking them, and only place blocks when they have a
block in their inventory.
* __Crafting system (50 pts):__ Create a GUI system in which players may combine
different inventory items to craft other inventory items, following Minecraft's
crafting system.
* __Day and night cycle (60 pts):__ Create a procedural sky background using
the raycast method we discussed in class. Modify the position of the sun in
the sky over time, changing the sky's color as the sun moves from a morning
sunrise to afternoon overhead to sunset to night-time. The light direction
and color in the shader you use to render your terrain should also change to
match the sky's sun and color. The color of the sky should change smoothly
over time; this will mean you'll have to hard-code several time intervals
with unique sky and sun colors and interpolate between them as time advances.
Additionally, as the sun nears the horizon (sunrise or sunset), the sky should
change color near the sun, but should be dusky-colored farther away from the
sun (see the provided code for an example).
__If you use the procedural sky code provided on Piazza, you must scrupulously
document your code with comments that explain what every line does so that you
show you understand your code and did not just copy and paste from the example.__
* __Distance fog (7 pts):__ In your shader, interpolate the final color of a
block with some constant color based on the Z coordinate of the fragment to
achieve a "fog" effect based on the distance terrain is from the camera.
* __Redstone (50 pts):__ Implement Minecraft's Redstone circuit system, which
can be used to simulate logic gates and even create computers in Minecraft. At
the minimum, your implementation should support Redstone wire, Redstone torches,
and power levers.
[Click here to view a video explaining the basics of Redstone.](https://www.youtube.com/watch?v=373TcAes0RQ)
* __Third-Person Mode (20 points):__ Allow the player to switch to a
third-person camera view by pressing a key on the keyboard. In this view, the
`Player` must be visible to the user as a 3D _animated_ model. The model's
animations must include leg movement when walking and arm movement when adding
or removing a block. The `Camera` must still face where the `Player` is facing,
but should be located somewhere behind the `Player`.
* __Sound (10 points):__ Using the `QSound` class, implement features such as
footsteps, rushing water, birdcalls, wind, etc. You could even have your noises
synergize with biomes implemented by you or a partner.
Submission
--------
#### Make sure your group commits a readme.txt that explains which group member implemented which feature for this milestone! ####
Additionally, in your readme, briefly describe __how__ you implemented your
chosen features. Discuss any difficulties you encountered when coding the
project, and explain the approach you took to implementing each feature (e.g.
"I chose to cast rays from the corners of my player's bounding box for collision
detection because I thought it might be an easier approach than overlap
checking.")
For the final milestone, please make sure you explicitly enumerate
__everything__ you have implemented over the course of the project. If you made
additional optimizations or added features you'd like us to look at, make sure
you mention them. We want to give you credit for all your hard work!
__Your group will present a pre-recorded video of your milestone implementations
in class on Monday; you must submit the video to the course dashboard along with
your commit link!__
Please submit your final video link on this spreadsheet as well, for ease of access: [Spreadsheet](https://docs.google.com/spreadsheets/u/1/d/1jUgwsgDhfBHS-YtxoAp6rHCr160VTiBvECQ25gj8fSE/edit?usp=drive_web&ouid=103135487871188719221)
We will grade the code you have pushed to your GitHub repository, so make sure
that you have correctly committed all of your files! Once you have pushed your
finished project to GitHub, submit a link to your commit through the course
dashboard. If you click on the Commits tab of your repository on Github, you
will be brought to a list of commits you've made. Simply click on the one you
wish for us to grade, then copy and paste the URL of the page into your text
file.
#### Each group member should submit a commit link to the course Dashboard! ####