TIL: Learn to Code in C++ by Developing Your First Game (Section 3, Lectures 50-52)

Ok, I had to take a day off from learnin’ but now I’m ready to get started once again. Section 3 promises to cover both C++ and Unreal Engine, and is looking to be at almost twice the length of what I’ve already learned. Let’s get crackin’!

Section: 3 – Building Escape – Your First Unreal / C++ Game

Lecture 50: Game Design Document

Blech. I’ve got to start off by updating UE4. My internet connection’s always spotty at night, so hopefully it manages by the time I’m deep enough into this session to require opening it. In the meantime, the lesson starts by coming up with the GDD.+

Concept:

    – escape a room
    – you awaken in a locked room
    – use environmental clues such as light and sound to figure out what to do
    – trigger pressure plates and solve puzzles to get to the exit

Rules:

    – no lose state
    – allow the player to do anything they can think of with the tools they have available
    – you win by exiting the room

Requirements:

    – Unreal’s Starter Content pack
    – C++ code and Blueprint to encode behaviour
    – Sound effects to enhance the atmosphere
    – Sketches of the layout of the room(s)
    – Sketches for how puzzles work

Room Design:

    – One large room, or a few smaller ones
    – annotate where puzzles will be located
    – your mind can be changed
    – create a more detailed sketch of just one puzzle before getting carried away with others

Lecture 51: Version Control 101

Ugh… It’s been almost a year since I set-up Perforce on my computer. I didn’t end up doing particularly much with it at the time, and here we are looking at version control again. Lovely.

Version control is simply making back-ups of your shizzle so that you can easily reset/roll-back to a previous state when something inevitably breaks.

I chose to go with Perforce which is free for personal use. Ben mentions that Git, Mercurial, Subversion / TortoiseSVN, and Alienbrain are all options. As I’ve already got Perforce running on my computer… I’m going to continue using it rather than the SourceTree/Atlassian combination that Ben mentions in this video. Hopefully this doesn’t somehow come back to bite me in the ass.

As I haven’t updated it since June, I’m going to take a moment now though to download the latest version and make sure it’s working. This sort of back-end stuff is no fun for me. šŸ™

Fuck

Sigh. Of course. Maybe a reboot will help?

The reboot didn’t seem to do anything other than kill my mood. But luckily, re-installing did the trick. May as well install new nvidia drivers while I’m in maintenance mode…

Lecture 52: Ignoring Unreal Derived Files

Derived files can be easily rebuilt. Other files, like code and assets cannot. We want to ignore most derived files for version control as having everything there will slow things down and take up more disk space.

– The first thing that I discovered that is necessary for this tutorial, is to set the C++ options in Visual Studio to ignore the intellisense database. According to one of the comments for this lecture:

You have to enable an option in Visual Studio to “Enable New Database Engine -> true”. The old IntelliSense database used SQL Server Compact as backing store, the experimental db is using SQLite. The option is at the: Tools ā€“> Options ā€“> Text Editor ā€“> C/C++ ā€“> Experimental

This means, that you also need to explicitly disable the IntelliSense options under the Advanced tab:

Advanced    Experimental

When I didn’t do this, it created a 308MB .sdf file. Which is absurd.

– The next step is (with UE closed) delete the Binaries, Build, Intermediate, and Saved folders.

If we reopen UE, we see that it lets us rebuild these files. They’re derived, which means UE will happily reconstruct them for us. It’s not really a loss if we lose these files. Thus, it doesn’t make sense to include them in our source control.

If you close Visual Studio… the database file jumps in size. So I guess 308MB wasn’t *as* absurd as I originally thought. This BuildingEscape.VC.db file is large, but is also a derived file. We don’t need it in our source control either.

And on that note, it’s already after 1:30, and I need my beauty sleep.