All Projects → UnrealCourse → 02_bullcowgame

UnrealCourse / 02_bullcowgame

Licence: mit
A simple word game designed to teach the basics of C++ and project / solution management. (ref:BC_URC) http://gdev.tv/urcgithub

Programming Languages

cplusplus
227 projects

Projects that are alternatives of or similar to 02 bullcowgame

04 battletank
An open-world head-to-head tank fight with simple AI, terrain, and advanced control system in Unreal 4. (ref: BT_URC) http://gdev.tv/urcgithub
Stars: ✭ 172 (-1.15%)
Mutual labels:  game-development, unreal-engine, game-dev, unrealengine
03 buildingescape
A simple First Person game to learn level building, lighting, Unreal Editor, C++ game logic, basic Blueprint and more. (ref: BE_URC) http://gdev.tv/urcgithub
Stars: ✭ 127 (-27.01%)
Mutual labels:  game-development, unreal-engine, game-dev, unrealengine
Climbing Movement Component
Climbing Movement Component for Unreal Engine.
Stars: ✭ 181 (+4.02%)
Mutual labels:  game-development, unreal-engine, game-dev
05 TestingGrounds
A Hunger-Games inspired FPS with large outdoor terrains. Advanced AI, basic networking, pickups, skeletal meshes, checkpoints and more. (ref: TG_URC) http://gdev.tv/urcgithub
Stars: ✭ 121 (-30.46%)
Mutual labels:  unrealengine, unreal-engine, game-dev
Unity Solutions
Use Firebase tools to incorporate common features into your games!
Stars: ✭ 95 (-45.4%)
Mutual labels:  game-development, game-dev
Rimlight
Customizable rimlight shader for Unity that includes pulsation and noise scrolling. Give your scenes that extra oomph!
Stars: ✭ 170 (-2.3%)
Mutual labels:  game-development, game-dev
Lumberyard
Amazon Lumberyard is a free AAA game engine deeply integrated with AWS and Twitch – with full source.
Stars: ✭ 1,785 (+925.86%)
Mutual labels:  game-development, game-dev
Gamedev Resources
🎮 🎲 A wonderful list of Game Development resources.
Stars: ✭ 2,054 (+1080.46%)
Mutual labels:  game-development, game-dev
O2
2D Game Engine with visual WYSIWYG editor
Stars: ✭ 121 (-30.46%)
Mutual labels:  game-development, game-dev
Uecs
Ubpa Entity-Component-System (U ECS) in Unity3D-style
Stars: ✭ 174 (+0%)
Mutual labels:  game-development, game-dev
Hfsm2
High-Performance Hierarchical Finite State Machine Framework
Stars: ✭ 134 (-22.99%)
Mutual labels:  game-development, game-dev
Is Engine
SFML C++ game engine that allows to create games on Web (HTML 5 - CSS 3), Android and PC
Stars: ✭ 94 (-45.98%)
Mutual labels:  game-development, game-dev
Nimue4
Nim language integration for Unreal Engine 4
Stars: ✭ 90 (-48.28%)
Mutual labels:  game-development, unreal-engine
Arcadevehiclephysics
A framework for creating an arcade inspired physics system for vehicles in Unity
Stars: ✭ 103 (-40.8%)
Mutual labels:  game-development, game-dev
Langaw
A sample project for following along a tutorial found on jap.alekhin.io.
Stars: ✭ 90 (-48.28%)
Mutual labels:  game-development, game-dev
Buoyancysystem
A system for buoyancy and boat physics in Unreal Engine 4.
Stars: ✭ 87 (-50%)
Mutual labels:  unreal-engine, unrealengine
Reldens
Reldens - You can make it - Open Source MMORPG Platform
Stars: ✭ 130 (-25.29%)
Mutual labels:  game-development, game-dev
Ue4 Gitignore
A git setup example with git-lfs for Unreal Engine 4 projects.
Stars: ✭ 150 (-13.79%)
Mutual labels:  unreal-engine, unrealengine
Sgi
Stargate Invasion is a mod for Sins of a Solar Empire.
Stars: ✭ 67 (-61.49%)
Mutual labels:  game-development, game-dev
1 Character Movement
The first section of the course. You will learn everything required to build a simple movement system in your RPG, creating the core experience. http://gdev.tv/rpggithub
Stars: ✭ 81 (-53.45%)
Mutual labels:  game-development, game-dev

Unreal Engine Developer Course - Section 2 - Bull Cow Game

This is the Unreal Engine Developer course – it started as a runaway success on Kickstarter and has gone on to become one of the bestselling Unreal courses on the internet! Continually updated in response to student suggestions, you will benefit from the fact we have already taught over 360,336 students game development, many shipping commercial games as a result.

You're welcome to download, fork or do whatever else legal with all the files! The real value is in our huge, high-quality online tutorials that accompany this repo. You can check out the course here: Unreal Engine Developer

In This Section

1 Intro, Notes & Section 2 Assets

  • Welcome to the first actual coding video.
  • Why we’re doing this in the IDE only.
  • What you’ll be building, see resources.
  • You’ll learn types, loops, routines, classes.
  • We’ll follow Unreal’s coding style, and re-use.
  • Notes and resources are attached.

2 S02 Game Design Document (GDD)

  • How much planning should we do?
  • Define the emotional problem the game solves*
  • Chose concept, rules & requirements.
  • Start to think about the architecture.
  • Copy as much as possible into the code!
  • Document now what may change later.

Useful Links

3 How Solutions & Projects Relate

  • How projects and solutions relate.
  • Setting up a new command line project.
  • An overview of the structure of our solution.
  • (Adding main.cpp to our project).

4 C++ Function Syntax

  • The difference between an engine and a library.
  • How this relates to this console application.
  • What is building / compiling code?
  • How the console knows where to find our code.
  • The syntax of a function in C++.
  • Write the minimal C++ program to remove error.
  • Testing our application runs without error.

5 Using, #include and Namespaces

  • # represents a “preprocessor directive”.
  • #include copies-and-pastes other code.
  • The idea of using library code.
  • Use <> for standard libraries.
  • Use “ “ for files you have created yourself.
  • Notice the namespace icon in autocomplete.
  • Import iostream library and use std namespace.

6 Magic Numbers and Constants

  • What a “magic number” is.
  • Why it’s a good idea to avoid them.
  • constexpr means “evaluated at compile time”.
  • Introduce coding standards*.
  • Use a constant for the word length.

Useful Links

7 Variables and cin for Input

  • The difference between \n and endl
  • Introducing pseudocode programming
  • Why we need to #import <string>
  • Getting input using cin
  • Discovering woes with our input buffer.

8 Using getline()

  • Re-cap the problem we have.
  • Why getline() is useful here.
  • Where to find C++ documentation.
  • A word on non-obvious solutions.

9 Simplifying With Functions

  • Programming is all about managing complexity.
  • We want to think about a few things at a time.
  • The idea of abstraction and encapsulation.
  • How functions help us simplify.
  • Write and call your first functions.
  • A warning about “side-effects” of functions.
  • Always use return at the end of your functions.

10 Iterating With For & While Loops

  • Why we need loops.
  • When to use for vs while.
  • The syntax of a for loop.
  • Think carefully about the first & last loop.
  • Write a for loop to repeat the game.

11 Clarity is Worth Fighting For

  • More about levels of abstraction.
  • A word on being clever.
  • Using Visual Studio’s Extract “Extract Function”
  • What a header file (.h) is.
  • What’s refactoring, and why we do it.
  • Removing side-effects.
  • Where to find the course code on GitHub.

12 Booleans and comparisons

  • What a boolean is, and how to use it.
  • Only use when completely clear what you mean.
  • Use == for comparison.
  • Use && for logical AND.
  • Use || for logical OR.
  • Use [n] to access a string, starting at n=0.
  • Use ‘ ‘ for characters, and “ “ for strings.

13 Using do and while in C++

  • What a do while loop is.
  • How it executes code one or more times.
  • Making our game play multiple times.

14 Introducing Classes

  • Lookup the Turing machine.
  • A quick overview of the MVC pattern.
  • User defined types (classes).
  • About working at an interface level (black box).
  • An overview of class FBullCowGame

15 Using Header Files as Contracts

  • Introducing .h header files in C++.
  • Why the added complexity is worth it.
  • Defining the interface to our class.
  • Writing our first draft of FBullCowGame.h

16 Including Our Own Header File

  • NEVER use using namespace in a .h
  • In fact, why use it at all?
  • Create your .cpp files and #include
  • Don’t create chains of includes.

17 Instantiating Your Class

  • Relax, they’re just user defined types!
  • string FirstName; creates a string object
  • FBullCowGame BCGame; works the same way
  • These instances are initialised by “constructors”
  • Instantiating means “creating an instance of”
  • So we’re simply creating a game instance.

18 Writing & Using Getter Methods

  • What is a getter method
  • Why we never access variables directly
  • How to call a method using the dot operator
  • Pros and cons of initialising in at compile time
  • Using “Rebuild Project” to make VS behave!

19 Introducing the Const Keyword

  • const’s meaning depends on context
  • Generally means “I promise not to change this”
  • What this is depends on exactly where it appears
  • At the end of a member function, for example int GetCurrentTry() const; it prevents the function from modifying any member variables
  • This is a good safety feature.

20 Constructors For Initialisation

  • Default constructor called when object created
  • Initialize in constructor when decided at runtime
  • Initialize in declaration if known at compile time
  • Constructor syntax simply: ClassName();
  • Set the member variables in constructor
  • Test this has worked.

21 Pseudocode Programming

  • More on Pseudocode Programming Practice (PPP)
  • Reviewing our code and architecture
  • Using // TODO as a comment prefix
  • Introducing Visual Studio’s Task List
  • Planning our next wave of coding.

22 Using using for Type Aliases

  • We’re substituting types to be “Unreal ready”
  • The declaration is using <alias> = <type>;
  • For example using int32 = int;
  • Why Unreal uses int32 rather than int
  • FText is for output, FString is “mutable”
  • Where to use each type of string
  • Map FText and FString to std::string

23 Using struct for Simple Types

  • struct is almost identical to class
  • It’s member variables (data) is public by default
  • Ideal for simple value types like BullCowCount
  • Outline BullCowCount SubmitGuess(FString)

24 Using if Statements in C++

  • Why we need conditionals (selection)
  • Use if when it reads better (e.g. few conditions)
  • Use switch for multiple, simple conditions
  • (for loads of statements consider a table lookup)
  • The syntax of an if statement
  • Using if to write count bulls and cows.

25 Debugging 101

  • A very brief intro to Visual Studio’s debugger
  • Set a break-point by clicking in margin
  • Watch values by highlighting in debug mode
  • Use “Continue” to cycle back to breakpoint.

26 A Place for Everything

  • Centralising the hidden word length
  • Making this a property of the game class
  • Writing a getter to access this value
  • Updating our intro to vary with word length.

27 Introducing enumerations

  • An enumerated type consists of named values
  • Use instead of coded meaning
  • Makes the code more readable and meaningful
  • Only defined values can be used - more robust
  • A benefit of C++ 11’s strongly typed enums
  • Creating an enum class for error checking.

28 Writing Error Checking Code

  • Use else if for the first time
  • Outline or CheckGuessValidity() method
  • Write working code for checking guess length
  • Use the debugger to test the return values.

29 Using switch Statements

  • Use our error values to communicate with user
  • All our user interaction is via GameManager.cpp
  • We’ll use FText in this file, as it’s UI text
  • We can “switch” what we say based on the error
  • The syntax of a switch statement
  • Remember your break keywords!

30 Warm Fuzzy Feelings

  • Don’t get comfortable with compiler warnings
  • Refactor GetValidGuess() to remove warning
  • Rename SubmitGuess() to SubmitValidGuess()
  • Improve readability of SubmitValidGuess()
  • Get a warm fuzzy feeling!

31 Handling Game Win Condition

  • Change our PlayGame() loop to a while
  • Implement our IsGameWon() function

32 Win or Lose "Screen"

Write a method to print a game summary to the screen once the game is over.

33 Introducing Big O Notation

  • Algorithm: the recipe for solving a problem
  • or: 45th US Vice President’s dance style
  • Introducing the complexity of algorithms
  • A quick introduction to “Big O” notation
  • Comparing three ways of checking for isograms.

34 TMap and map Data Structures

  • The importance of knowing your data types
  • Introducing the std::map data type
  • #define TMap std::map to keep it ‘Unreal’
  • How we’ll be using the map
  • TMap<char, bool> LetterSeen; to declare
  • Using LetterSeen[Letter] to access
  • Wiring-up and pseudocoding IsIsogram()

35 Range-based for Loop

  • Introducing containers and iterators
  • Using a range-based for loop in Unreal*
  • Gently introducing the auto keyword
  • Finishing our IsIsogram()

Useful Links

36 Design a Helper Function

  • Gain confidence with a multi-stage challenge
  • A word on implicit dependencies

37 Playtesting Your Game

  • Having someone else play test your game is vital
  • Silently take notes, or record screen if possible
  • Immediately go away and fix obvious bugs
  • For improvements consider 2nd or 3rd opinion
  • Repeat until the bug / issue rate plateaus.

38 Difficulty & Play Tuning

  • About the flow channel*
  • map word length to max tries
  • Play test to determine correct difficulty.

Useful Links

39 Polishing & Packaging

  • First impressions count (think reviews)
  • Don’t ship a half-baked product, even if digital
  • Check through your code (polish)
  • Ship to your customers (package).

Section 2 Wrap-Up

  • HUGE congratulations on your progress
  • Over 5 hours of pure C++ learning
  • Over 30 challenges you’ve completed
  • The journey has only just begun
  • Share your source code for others to play
  • Here are some suggested improvements
  • Next we take the game logic into Unreal :-)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].