Employability Evaluation Post

This is my final post related to this module. I’ll discuss each step I’ve taken throughout and
reflect upon the process.
I began with research, I used a variety of resources to gather as much information
about C++ & the basics as possible. I conversed with programmers and other game-dev
professionals, they were incredibly helpful and shared a lot of information. I could’ve asked
more follow up questions based around their answers, I didn’t understand the concepts
they were pointing me towards. I know the point is to learn the concepts suggested, but
it sounded quite complicated at the time, this discouraged me a little. Aside from that the
research went well, I was pointed in the right direction, found some great resources &
managed to talk with professionals.
The next step was to learn the basics of C++ and make use of the resources collected. I
aimed to complete every hour I’d set myself and learn as much as possible, which did not
play in my favour. I didn’t feel I was learning the right things and progress seemed slow. It
wasn’t until week 3 things became somewhat clearer and progress sped up.
Another problem I had is the 2 huge books I’d acquired to aid my learning. The books
themselves were great, but I definitely didn’t have time for both. I ended up reading the
first few chapters and moving onto the next book for the rest of my learning. This wasn’t
a giant problem as the book I primarily worked from was game development specific. The
other was more a C++ dictionary covering countless features (helpful as I could constantly
refer back to it when things became unclear).
I didn’t finish either book, but I think I made good progress throughout this task. I got to
a point when the author stated the basics had been covered. This was the last week of
learning and honestly I was thrilled to hear that, I’d thought I’d taken a wrong turn and
hadn’t learned enough. But with my last few hours I managed to take a step further and
learn some advanced features.
What did I learn? And how close was it to what was suggested to me during my research?
Well below are the concepts suggested:

  • Classes
  • Object-Oriented Programming (OOP)
  • Virtual functions (polymorphism)
  • Variables
  • Conditions
  • Loops
  • Functions
  • Pointers

Looking back at what I was told to learn I feel as I achieved the requirements of this task.
I can honestly say I understand what each of those concepts are and I know how they’re
used in C++. Polymorphism was the biggest struggle, however, this was a more advanced
feature. The fact I managed to introduce myself to it and attempt to understand it was a
pleasant bonus.

So what would I do differently? Not much, though it didn’t seem it, what I had learned was
very helpful. I would’ve tried get through this process faster, what should have taken 4
weeks took 6, eating into the time I had for the rest of this module. I managed, but I think
this hindered the total quality of the next task.
The final task, make use of C++ and build a prototype within Unreal Engine 4 (UE4). The
biggest obstacle I had to overcome was the learning curve, the code had lots of engine
specific uses. Due to this, I had to spend some time learning about the engine and its built
in types. This does not render what I learned in the last task useless, most of it converted
over quite easily (e.g. int is int32).
After learning about the engine I was ready to attempt my own project. I began by
creating an interactive door, I thought it would be a simple start but it required more than
I thought. After I moved to the next room where I decided to extend the door class and
make the player race it before it closed. This included a lot of functionality even within its
simplicity. I was learning quickly making things work right took a lot of work and thought.
It took lots of trial and error but I eventually got the hang of things and aimed for more
complicated functionality.
The biggest hurdle was the last room, firstly I wanted a lot more in it, I’d planned the
player to win 2/3 minigames then a green door would open. I had to cut this a lot after
running into many problems getting a shooting range minigame working. I ran into
crashes, bugs and problems trying to tie it together, due to this I had to finish with just one
game.
It’s difficult to say how I feel about the product produced, it could include more, however
I’m very proud of getting what’s in there working. Considering the entire point was to learn
C++ at an entry level I’d consider that a success, everything may be simple but I made use
of many different programming concepts. I managed to learn from the entire experience, I
understand more how UE4 works. I definitely learnt a lot about debugging/problem solving,
it had to be done for every asset.
What would I do differently with this task? More planning, I didn’t design the game from
the start. This meant when It came to making something I was lost. If I’d designed
something specific, I’d have known exactly what I was doing & it would’ve been easier
creating the prototype.
Before finishing I’ll talk about the project as a whole. As I’ve said I think the tasks set out
was accomplished, this is the biggest success of the project. If repeated I’d aim to research
the engine before I used it. This would save time & I’d have been able to instantly start
working. Excluding that I’m satisfied with how everything went, it wasn’t easy (especially
the prototype) but I expected challenges from the start. Encountering problems and
overcoming them just added to the overall learning experience.

Word count: 1000

 

Advertisements

Learning Journal Week 4

Following straight on from last week I headed into the Inheritance lesson, this taught me about how classes can be derived from other classes allowing them to access their public methods and variables. Why do something like this? Well the book has a diagram to help explain that I’ve chosen to recreate:

11 (2).png

Basically it stated you create a vehicle class that would store the base vehicle properties then the other types of vehicles would derive from the base class. Each have similar features like wheels, speed, lights etc. but they are obviously very different. Inheritance allows us to create the values we need then easily create different types of objects to use/modify them values based on our expectations. We had a lesson on inheritance (in Unity) that used guns as an example, here’s a diagram to map it out:

12 (2).png

 

At the time I didn’t really understand how inheritance worked or what it can be used for but learning this has definitely opened new doors. Admittedly it was hard to follow and I ended up running into errors that I didn’t really understand so it took longer than expected. But after updating the text adventure and putting it into practice it became slightly clearer.

The Text adventure we added movement so the player can move between rooms (it created a box of rooms at this point). It doesn’t make a very playable game at the minute but it is progress and I’m happy with it. Here’s an image of the project:

13.PNG

I was also happy to learn that the end of this chapter stated the learning could stop there as enough has been taught to cover the project. Which was a relief to hear because I believed I wasn’t making enough progress. It did say the rest of the book was dedicated to the more advanced features of the language and writing more efficient code. Luckily I had time to put into the next chapter covering “polymorphism”.  I’ll be honest I’m still not 100% clear on this subject, the subtopics were fairly straightforward: virtual methods, downcasting/upcasting and interfaces. However, I didn’t quite understand how they worked. It did update the text adventure to make it more efficient and extendable but this is quite upsetting as this is all I had time to do.

I’ve still 2 books covering a lot of the other wonders of C++, even though the learning part of this module is over I may refer back to these books if I get lost throughout the next part (practical). I set out to learn the basics of C++, considering my research and resources I think I’ve done well to achieve this. I will also attempt extending my knowledge and reading further into these books in the near future. There won’t be a post for a while as I progress throughout the next task. However, within the next few weeks there will be an evaluative repot on this entire learning experience.

Word Count: 499

Learning Journal Week 3

Firstly I apologise for this slightly late post, I’ve been ill the past few weeks and working on this alongside the holidays & other projects has been a battle. However, I’ve covered a lot this week and made some good progress, let’s begin.

This week I’m back in the book, this began with functions and learning how they work in C++, this went well as they work almost identically to C#. I did still learn about returning values which is something I hadn’t used before. It also covered passing pointers through the parameters and passing by reference. This uses the reference operator ‘&’ which allows a function to modify the value passed through (rather than creating a copy). Example:

Capture.PNG

Next came enums, something I’d used before but wasn’t 100% clear with. Interestingly I managed to use it within another project (C#) after learning how they work. The next chapter covered loops and flow control; I’m not going to talk much about this as it’s pretty basic (if/switch statements, for/while loops etc.) which I’d learnt throughout my studies previously. I simply had to understand the differences between how they’re written out within C++.

I then got introduced to namespaces and header files, a new concept to me; I know Unreal works with these so I was eager to begin. This lesson ended by modifying the layout of the text adventure.

Then it moves to OOP (Object-Oriented Programming), a topic recommended to learn during my research in task 1. I struggled following at first which made the process last longer than intended. But after reading over it a few times I began to understand the topics it was covering. Including: Encapsulation, Constructors/Destructors, Method Overloading & Operator Overloading. It’d be difficult describing how each work, but I used what I’d learned and refined the Text adventure so the project works with classes improving: readability, efficiency and ease of use. Below there’s a screenshot of the file currently:

pic.png

Admittedly it doesn’t look like much but it’s built to be extended, currently it:

  • Outputs a welcome message
  • Asks the player to input their name
  • Provides instructions
  • Uses loops to allow players to continuously input until a correct choice is made.

Finally, the book covered data & access modifiers; here I learned how to use the static, const, friend & mutable keywords. This included making a simple program incrementing a counter within a class. It showed how we can access values within a class utilising these keywords or create static functions that can be called from anywhere by simply calling it:

“ClassName::FunctionName();”

I’ve only a week left of learning; I’ll partially review my learning next week as well as progress further into the book in hopes of learning as much as possible. The first lesson coming up next week is inheritance which promises to extend the text adventure a lot into something slightly more playable. I am looking forward to taking this as far as I can get it.

Word Count: 500

Learning Journal Week 2

This week I’ve worked through book 2 “Learn C++ for games development”. Part 1 goes through procedural programming; this involves using reusable patterns to build a working program. It started by covering variables, though I’ve learned this previously I was introduced to some new concepts. For example, I was made aware of how variables are stored in memory and the bytes each type takes. Below is a table from the book:

1.png

This covers types that store numbers (Strings become more complicated as the bytes they use varies depending on the length of the string).

I also discovered unsigned variables, I didn’t know these existed but I can see the usefulness of them. Basically an unsigned variable has an increased maximum value but no negatives (the minimum is always 0).

After covering other types, the book moved on to creating a simple guessing game. Here’s what it did:

  • Random no. is generated
  • Player guesses a no. between 0-100
  • Prints the players number and the actual no.

I enjoyed this, especially since it introduced me to random numbers (Something needed often in games development). But the original program was simple so I extended it using what I’ve already learnt in last week’s lessons. I added continuous input so the player keeps guessing until they’re correct (using a while loop) & used if statements to print whether you guessed higher or lower than the actual number. Extending the project myself, without the aid of learning resources shows I’m getting somewhere with C++. I’m quite happy with the progress I’m making.

Next I went through chapter 4 covering arrays. This part’s vital as it also covered pointers which I was advised to understand during task 1. Pointers are difficult to explain; I’ll try making it simple by including a screenshot of an example the book used:

2.png

Here I’ll explain each line:

  • Prints a variable (int) initialised with the value 5
  • Prints the address of that variable (hexadecimal memory address, the place in memory where the variable’s stored)
  • Prints a pointer (pointers store a variable with a value but it’s a memory address rather than the value itself)
  • Dereferences pointer (used to display the actual value of the variable being pointed to)

Pointers seemed complicated to me at first (probably because they’re a completely new concept) but they’re quite simple. They were introduced here because arrays are actually pointers (I found this interesting).

If you’ve experienced other languages you know indexing is used with arrays, example:

3.png

C++ can use indexing, but you can also dereference the array itself, example:

4.png

This works because as mentioned arrays are pointers so printing the array itself (without dereferencing):

5.png

apologies for getting technical but it’s the easiest way to explain what I’ve learned.

To end week 2, I created a new project that will become a text adventure. This is extended throughout the other lessons in the book. Next week I will continue with this book and try to progress with this project.

Word Count: 500

Learning Journal Week 1

I knew early on that learning C++ wouldn’t be easy, it’s been slow but I think progress has been made, I haven’t learned much in the way of games development but I feel I’ve started in the right place.

This week started with a simple “Hello world” program, this required the console to output text. Which was fine but I had two books (both listed in report 1). They both showed me slightly different ways of writing the first program (one included receiving input and printing the input to screen).

I started with the greater challenge but ended up utilising both books to get the program working, considering this was step 1 I ran into more problems than expected. Firstly, the header file used in my resources was custom, when I used the same one I received errors. So I figured out what I needed to include in the file myself. This was challenging since I had no experience whatsoever with C++ but using both books and a little bit of trial and error I managed to figure it out.

The second problem arose when building the program into a standalone executable. I got an exe in no time at all but the problem was every time I moved the program to a computer with no visual studio installed, it wouldn’t load and I’d receive errors similar to this:error.png

The book does cover this (as I found later) but I ended up doing some research and discovered this can be fixed with a process called linking. The problem was with script dependency and the program not having access to files it needs. The fix was easy, it required simply changing the runtime library in the projects properties.

After these hurdles I managed to move forward with ease, I progressed by reading through chapter 3 in my book covering objects, types, and values. This included creating a project that took two words as input and compared them, took a number and printed some math & some commands that reads the text typed and alerts the user of duplicate words. It’s only simple console applications but I think it’s a great start in learning how to use C++. I’ve provided an image of it in action, there’s not much interesting to look at but the functionality’s there:

app.png

This early on my learning seemed quite tedious because I was learning practices and rules I already knew due to my previous programming knowledge. For example, if statements, variables and operators (++, *= etc.) are all things I’d used previously in C#. Admittedly there’s differences and new things to learn, like how types, variables and values are stored in computer memory (bytes) or type safety (converting from one type to another) which was covered in this chapter.

Next week I’m working through my other book focused more on games development. This includes building game-like projects, I’m hoping I’ll find this more enjoyable even if It requires starting simple.

Word Count: 500

Report & Investigation into C++

This part of my learning contract provides me with opportunity to understand C++ and its uses, primarily in relation to games development.

Outside Games…

I started with the book “Programming, Principles and Practice Using C++” written by Bjarne Stroustrup (the creator of C++). Chapter 1 covers software’s uses in day to day life detailing examples from watches, telecommunications, medicine etc. all the way to the Mars rovers. He concludes with “many programmers get to work on projects like these. These are the kind of things good programming can help achieve”.

The book briefly mentions games, but doesn’t cover them explicitly, it points more towards software development in general. It details how programming is important to the modern world & how C++ can be used.

Games related…

My next resource is “Learn C++ for Game Development” written by Bruce Sutherland. He says “C++ has been used by game developers since its inception”. He mentions “All major gaming platforms have supported and currently support C++ compilation” He then lists various operating systems (PC, mobile & console).

I can’t solely rely on books so I contacted programmers that have used C++ for professional purposes. I also contacted game developers in both technical and non-technical roles.

I started with messaging Andrew Crawshaw (Lead Designer & active member within the games industry community). Making use of his industry knowledge I asked whether C++ was worth learning in the context of a programmer role as well as where it can be applied. He began with “Yep C++ is going to remain useful (essential) for a while yet.” He followed by talking about Unreal Engine, mentioning how programmers use Blueprint adding “especially to prototype things – but they still use code to rebuild their scripts in a more efficient way.” He included a shorthand version at the end saying “yes, learn C++”.

I then contacted Evan Todd (Developer of Lemma) and asked some questions. The first about the importance of C++ in games, his response: “C++ is definitely not as important in the game industry as it once was. High quality, performant games are being shipped in everything from Unity to Gamemaker”. He makes a valid point, I’ve used Unity and haven’t yet utilised C++. He adds “I would even say that most smaller teams are not using C++. It’s still essential for AAA studios”. This doesn’t mean it’s not worth learning, it shows it’s not always required.

I asked “What would you consider a basic working knowledge of C++?” a difficult question, but it aimed to direct my learning. Todd replied “I would say the main concept to understand is pointers”

Robert Martin is a professional programmer outside of the games industry, He’s also authored books related to programming. I asked him similar questions about C++, in relation to its importance within games he replied: “At the moment it is because it allows the programmers to get very close to the metal for speed”

I asked about the basics and received “Learn the basics of OO design using classes and virtual functions first” He then talked about more complex functionality within C++ to expand further. (OO – object-orientated)

Elias Daler is an indie developer and programmer using C++ alongside other languages. He provided an informative response to question 1: “C++ is important, because it gives you very fast speed and control over memory layout of your program. C give you this too, but it isn’t very safe and lacks some very important things like templates, classes, function overloading, etc.”

I then asked about the basics, he suggested creating pong as this introduces the concepts “variables, conditions, loops, functions, classes, etc.” adding “There’s a lot of stuff going on and it’s better to learn it in practice.” He then expanded onto further concepts to learn; these will be taken into account throughout learning.

Conclusion

C++ is worth learning; it provides opportunities outside of games development & has uses within the industry. It’s more prominent in AAA teams. However, it can be applied to independent development. Indies use it alongside other tools to implement core functionality as well as create/customise game engines. I should note UE4 supports C++, but as Crawshaw stated Blueprint (visual scripting) is also important throughout development.

I will attempt covering many of the concepts suggested when learning.  This will include creating various very simplistic games in an attempt to understand C++. I will then later move into UE4 and put what I’ve learned to use.

Word Count: 747

Introduction Post

Hey I’m Alexander an indie-dev & currently a student studying Fda Independent Game Development at: http://www.study-game-design.co.uk/

There isn’t much to see on this blog at the minute, but in the upcoming months for a current module I will be developing my skills in programming to increase employability. This blog will act as a learning journal where I will describe what I’m currently learning, the sources I used and reflection on the learning process.

Ideally this should be updated weekly so keep an eye out & stay updated with what I’m doing! 🙂

Until then.

Word Count: 97