The goal of this project is to get up to speed doing Unreal Engine 4 (UE4) development, including familiarizing with the editor, adding code (both Blueprints and C++), importing art assets, and setting up source control.
First, you will setup your UE4 development environment. Then, you will familiarize yourself with the UE4 editor through a brief tutorial. After that, work through a tutorial that has you make the beginnings of a first person shooter (FPS) game using UE4. Lastly, you will show your understandings of UE4 basics by extending the FPS tutorial with custom code, a "10% extension".
Doing the above will help better understand the UE4 game engine by developing a game from a game programmer's perspective, providing the foundational knowledge needed for building your own game from scratch in UE4.
You will work alone for this project. This will ensure you have the development skills needed for subsequent projects, even if your tasks when you make your game in a team are partitioned. While you can discuss the project with other students and even help each other debug code, but you must write all code yourself.
WARNING! A state-of-the-art game development tool like Unreal Engine is always being improved, which means there will often be differences, large and small, between the latest available official documentation (not to mention information you find in user forums) and the current release you are using (e.g., UE4.15). Navigating such issues is an unavoidable part of professional game development. Use the online class forum at InstructAssist to get help and share relevant information with your classmates, TA's and faculty.
To setup your UE4 development environment, do the following steps. If using one of the machines in the IMGD the Zoo labs, steps #2 and #3 below are already done.
However, don't start out by thinking that it is always better to use Blueprints. This can lead to slower development time and harder to understand implementations. In fact, using only C++ code would be fine, except for the fact that this assignment is an occasion to get some experience with Blueprints also.
Some further hints:
Go through the Unreal Level Designer Quick Start Guide, which covers how to:
Go through the Unreal Programming Quick Start Guide:
"This guide shows you how to create a new Unreal Engine project, add a new C++ class to it, compile the project, and add an instance of a new class to your level."
Go through the First Person Shooter C++ Tutorial, which covers how to:
Note there has been a change in the signature of the OnHit method used in Section 3.4. The signature in UE4.15 is:
void OnHit (UPrimitiveComponent* HitComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit)UE4 Hint: In Section 2.1, after Step 5 of Setting the Default Pawn Class, if you do not see the debug print line "We are using FPSCharacter.", try restarting the UE4 editor and then you should see the debug print line.
Visual Studio Hint: Enabling precompiled headers in Visual Studio will noticeably speed up compilation. However, please also read about some cautions to be aware of when using precompiled headers.
This means adding additional code (C++ or Blueprints) to extend the game functionality in some meaningful way by 10%. The specific extensions are up to you. Some hints for extending the FPS game are given below, but are only these suggestions---the actual extension is up to you. You will indicate what you have done with brief documentation when you turn in the assignment.
Note that "10%" is rather subjective. Do not concentrate on whether you have added 10%, just use this homework to learn as much as you can from the tutorials and documentation. It is very hard (although not impossible) to do less than 10% if you just spend some time experimenting.
If you are having trouble getting started with your "10%" modification, here is some advice:
Some specific suggestions for extensions to the FPS tutorial:
Implementation note: Create a function inside of the player that allows adding energy. If the player "hits" the energy pack, add to the player's energy. Just have the energy displayed as an on screen debug message.
Implementation note: Create a function in your C++ Character class to do a line trace on a key press (e.g., 'E'). If the line trace hits an object you want to move (such as a cube), attach the held object to your character. You can do this by storing a pointer to the object and updating its position every time your character ticks.
Implementation note: Create two functions in your Character class, one for a button pressed and one for a button released. In the button pressed event, calculate a maximum height for the player's thrust. Then, in your character's tick function, have the player linearly interpolate to that height. If the player has gotten close to that height, turn the "jetpack" off. Also, when the player releases the jetpack key, turn it off.
Implementation note: Create a new projectile class (a fairly simple class, with a static mesh for a visual representation in world and a boolean for whether it has been fired or not). Create a new pawn class for an enemy (again, fairly simple). For the enemy, the model can just be a cube. To control the firing rate (e.g., one bullet every 5 seconds) create a new variable to keep track of the total elapsed time from the last fired projectile. If the elapsed time exceeds 5 seconds, reset it, spawn a new projectile, and tell the projectile that it has been fired. In the projectile tick function, update forward velocity accordingly every tick. Create a delegate function for hit events in the projectile class. Create a function inside of the player that allows deducting health. If the projectile hits the player, deduct from the player's health. Just have the health displayed as an on screen debug message.
Implementation note: as for the "create an enemy" suggestion above, but the enemy should react to bullets in some way when it detects a collision (e.g., ragdoll, shatter, lose health). Make the enemy move based on how the AI Controller tells it to move. Brownie points if you use a navmesh.
Implementation note: Create a new actor class for a sticky object. Within this class, create a new delegate for a hit event. Inside, check the type of actor this sticky object has collided with, and if it is your character, attach the sticky object to your character.
Implementation note: just have the points displayed as an on screen debug message.
Some of the above you may need to combine to get to 10%, depending upon the complexity of your implementation. This is admittedly vague, but the goal is for you do do enough to be competent in UE4.
Grading Guidelines | ||||||
---|---|---|---|---|---|---|
Tutorial | 35% | Doing the tutorials without any additional customization is worth about 1/2 the grade. While you will have learned a substantial amount about the UE4 game engine, you will not yet have demonstrated an in-depth understanding of the engine capabilities. | ||||
Customization | 60% | Extending or modifying a tutorial game with custom work is worth more than 1/2 the grade. Doing so will begin to flex your technical muscles and show competence using the Unreal Engine. This is essential in moving forward. | ||||
Documentation | 5% | Not to be overlooked is including the documentation provided, as well as having that documentation be clear, readable and pertinent to the assignment. This includes the README described above as well as having well-structured and commented code is typically part of the Documentation requirement, too. Getting in the habit of good documentation is important for large software projects, especially when done in teams (e.g., your game for this course). |
Below is a general grading rubric:
100-90. The submission clearly exceeds requirements. The tutorial game works without problems. The custom extensions exhibit an unusually high degree of effort, thoughtfulness, technical ability and insight. Documentation is thorough and clear.
89-80. The submission meets requirements. The tutorial game works without significant problems. The custom extensions exhibit substantial effort, thoughtfulness, technical ability and/or insight. Documentation is adequate.
79-70. The submission barely meets requirements. The tutorial game may operate erratically. The custom extensions exhibit marginal effort, thoughtfulness, creativity and/or insight. Documentation is missing details needed to understand the contributions and/or to build the program.
69-60. The project fails to meet requirements in some places. The tutorial game may crash occasionally. The custom extensions are of minor scope, or exhibit perfunctory effort, thoughtfulness, technical ability and/or insight. Documentation is inadequate, missing key details needed to understand the contributions and/or to build the programs.
59-0. The project does not meet requirements. The tutorial game crashes consistently or does not compile. The custom extensions exhibit little or no evidence of effort, thoughtfulness, technical ability and/or insight. Documentation is woefully inadequate or missing.
Return to the IMGD 4000 Home Page
Send all questions to the staff mailing list (imgd4000-staff at cs.wpi.edu).