TIL: Learn to Code in C++ by Developing Your First Game (Section 2, Part 7)

Wheeee! I’m at the end of Section 2! Trudging through the basics is obviously necessary, but I’m itching to get into the actual Unreal Engine side of things as well. I’m happy to be done with the c++ exclusive component… and am ever closer to being able to start prototyping something of my own design.

Section: 2 – Bulls & Cows Word Game – Your First C++

Lecture 45: Playtesting Your Game

I guess now that the code is far enough along in this example, it’s time to simply wrap it up.

When making a game, testing is important.

    -Having someone else play the game is vital
    -Take notes or record the screen
    -Immediately go away and fix the obvious bugs
    -Consider 2nd or 3rd opinions
    -Repeat until the bug/issue rate plateaus

Lecture 46: Difficulty & Play Tuning

I’ve been slowly reading through Flow: The Psychology of Optimal Experience since… right before my kid was born. So I’m trying to embrace the idea of Flow in every day life, but I also try to consider how it can be applied to game design.

Toni Sala’s Gamasutra post seems to be a nice summary of how it can apply to game design.

In the case of the game we’re working on in the tutorial series, we want to keep people in flow by allowing them an appropriate number of guesses in relation to the word length. We can do this be reworking the GetMaxTries() function.

We can rewrite GetMaxTries to do the following:

int32 FBullCowGame::GetMaxTries() const {
    TMap WordLengthToMaxTries{ { 2,3 },{ 3,4 },{ 4,7 },{ 5,10 },{ 6,16 },{ 7,10 } };
    return WordLengthToMaxTries[MyHiddenWord.length()];

Which allows us to automatically change the number of allowed guesses depending on the word length.

The same way that we use a table of options for WordLengthToMaxTries, we could use a table to select a word from a list when beginning the game.

Lecture 47: Polishing & Packaging

First impressions count.

    -Don’t ship a half-finished product
    -Polish your code
    — comment with why things are being done
    — introduce classes with block comments
    — use #pragma once at the top of each file
    — deal with any TODO items
    — capture future ideas/improvements
    -Ship to your customers