C++ Practice: Tic Tac Toe

Image from this fine location

This was another small(ish) task that Jamie suggested would be good exercise and yes, it was. This is related to my ‘Learn to code in C++’ SMART goal and supplements the course that I have been taking on Udemy. So the idea was that I would create a simple console version of noughts and crosses that could be played in two modes. Easy, in which the computer would choose a random square based on the ones that were empty and Hard, in which the computer would seek to actively block the player usually leading to a draw, just like in real life. I wont show all of the program, includes, menu display functions and such, just the main function and the more important functions so as to illustrate the structure I went for. I wont be posting code like this in the future unless someone finds it useful as I dont think that the journal is really about that. I think that in the future I will post about the things I am finding challenging and what I am doing about that. I’m posting this because, if I’m honest, I’m kinda proud of this one. It took a while to get it all straight in my mind and it was a really worthwhile thing for me to do.

This is what I can up with…

1 of 2
2 of 2

I enjoyed this task and I learned a lot. I think that the next task is the Unreal Battery collector tutorial as I think I am ready to start learning about Unreal’s flavour of C++.

SMART: SOLID Principles

Yeah, I’m catching on that this is not the way… Image

Specific

I will learn about the SOLID programming principles so that I can write better software which will allow me to make better games and reusable components. I will do this by finding a beginner level course on a tutorial sight like Pluralsight and I will complete that course over the next 4 weeks.

Measurable

I will track my progress by making sure that once I have understood one or more of the principles I will use it in the design of my own code and logic. I will also know that this is complete when I can explain each of the principles to someone else.

Achievable

This is achievable because I have already created projects that are complex and show that I think in the right way. It could be argued that I have learned to create logic ‘the hard way’ and that the introduction of the combination or SOLID principles and design patterns will make writing code easier for me.

Relevant

This goal is relevant because I am actively pursuing a career in software development, primarily in games and I need to deeply understand the foundation of good design principles so that I can write better products.

Time bound

In reality, the study and practice of something like this will last for quite a long time and should be present in a lot of my design thinking, but I can say that I will complete a course and have a rudimentary understanding that will be a good jumping off point within 4 weeks.

Update – I have found a course that looks like its just the thing I need and you can get to it from here, there and everywhere.

SMART: Touch Typing for Code

I know its old. Don’t care.

Specific

I will improve the speed and accuracy of my typing so that I can more easily type code which will allow me to spend less time thinking about how to find the symbols and characters I need and more time thinking about the logic I am building. I will do this by drilling the symbols that are not used frequently is everyday typing such as {} () and []. This will be an ongoing goal using short fifteen minute session about four times per week.

Measurable

I will track my progress by creating a test document that I wish to be able to type, testing how long it takes to complete now and then testing again once per week to track improvements in speed. Accuracy is too difficult to track without software so I will be focused on speed only.

Achievable

This is achievable because I have learned to touch type over the last year and a half and to a good standard and don’t look at the keyboard at all in my everyday typing. The skill level that I am aiming at is an intermediate speed of about 40 to 50 words per minute although I will judge that on feeling and the completion time of a document I will create as mentioned earlier. I need to watch out for making sure that the practice is completed little and often, rather than falling behind and trying to complete the time in bulk. Little and often is the key to acquiring this sort of skill and is how I learned to touch type in the first place.

Relevant

This goal is relevant to me as I don’t look at the keyboard in my everyday typing and have noticed a huge improvement in my ability to think and write at the same time due to my eyes not leaving the screen. I have experienced similar improvement to my coding even with the skill level that I have already as not looking away from the screen allows my to follow the program more closely, therefor understanding it better. I wish this to improve.

Time bound

This is not time bound overall as I would really like this to be a continuous improvement over a very long period of time. I can however commit to completing one hour of dedicated practice for this each week using four, fifteen minute blocks spread out over the week.

SMART: Learn to Code in Unreal

I can feel the hair standing up on the back of Jamie’s neck. Image.

Specific

I will learn to code for Unreal projects using C++ so that I can write more efficient and powerful games which will lead to more opportunities for my games to be successful and for my skill to be employed by others. I will do this by the end of this year, 2019. I will be focused an this narrow flavour of C++ for at least 7 hours per week. Its worth mentioning here that although that amount of time seems small in comparison to the task, there is another 7 hours dedicated to a C++ course and once that is complete, would be rolled into this goal.

Measurable

I will know that this is complete when I am performing only the necessary tasks in Unreal’s scripting language, Blueprint. All of my game logic should be in C++. I intend to complete small game projects similar to the Battery Collector tutorial. I will be following this goal with other smaller goals soon.

Achievable

This is achievable because I already have a good grasp on C++ and can quickly find solutions to most to the problems that I encounter. A similar skill I have learned is Unreal’s Blueprint scripting language and I have been able to demonstrate a high level of understanding about how this system works. C++ feels like the natural extension of this skill. I am aiming to have a high level of skill in this area but I appreciate that its something that will take a long time to acquire. I intend to compose other, smaller SMART goals that can combine to allow me to complete this overarching one. I need to make sure that I am learning good design practices so that I can write my own, effective code.

Relevant

This goal is relevant because Unreal is a very popular game engine and is one that I would like to be highly skilled with. Its well known that to get the most from the engine, C++ is required. The goal is also relevant because C++ is an industry standard in game and software development in general and is not something very narrow, created by Epic that could only be used with the engine. I am the right person for this task as I have shown an aptitude already for creating game logic with Blueprint. In the future I will need this skill because I want to make my own games and failing that, I want to be employable as a competent developer. This is the right time for this goal as I am experiencing limitations in Unreal that could be solved using C++. I also have the time to dedicate to learning about this for the rest of this year.

Time Bound

This goal is quite general in the sense that I know that learning something with this much complexity and opportunity to improve is never really ‘achieved’ and is more accurately described as a mile stone on the journey of continuous development. Because of this I am focusing on the time that I know I have in which to learn enough to be employable, which is the end of the year, 2019. I intend to create other, smaller goals that feed into this one. These will be project or feature based.

SMART: GTD (Getting Things Done)

Ill get to giving the reference later… Ok, I’ll do it now

Specific

I will establish a GTD routine including a daily review, weekly review and will define the various Horizons talked about in the book, Getting Things Done. I will use Workflowy which is an excellent bullet-ed list style web application. I will use the @person #trigger and #day to be able to access the right information from any direction.

Measurable

I will know that this is complete when I have all of the could do, should do and want to do items recorded in the system and with a defined ‘next action’ should that be required and am regularly conducting a weekly review of that collected material.

Achievable

This is an achievable as I have used this approach before with good effect and I am only resurrecting a skill that I have already demonstrated.

Relevant

This is a relevant goal as my life is growing in complexity once again and having a healthy grip on all the things for which I am accountable is the cornerstone of productivity. GTD is used to solve exactly this kind of problem and is well documented as a thorough self management standard.

Time bound

I expect that this will take about 4 weeks of reminders and habit building to become second nature again. Its worth noting that I am not starting from nothing and have been running a lightweight version of GTD for the last few months, but I know that the strength of the approach is found in the relentless application of the routines that capture tasks and projects and trigger their next action, each at the right moment.

Money, money, money…

I found this image right aboot here

Funding and Monetisation

The balance here then is to make sure that you are aware of what you need and want from the funding and monetisation of the app you are developing. The first exercise then becomes thinking about what life should look like 1, 2 and 5 years from now and the kind of income that I would like to have. Then I would need to think about how much creative control I would like to have over the things that I develop and whether or not those two pictures are compatible. If they are not then should I change one or both of them and by how much. The compatibility of the two pictures is very important to me as I have come from a place in my life where I was not a happy person and not very financially successful because of various factors, most of which were outside my control at the time. Thats not the case now and I have much more control over my outcomes. Guess what? I’m doing much better… I would like to keep it that way.

I feel that being content in my work is much more important to me that earning a lot of money although there is a course a minimum standard that is needed in order to support myself, my wife and my family. I am not saying that I want the minimum, just that the promise of riches and so on is not a primary motivator for me. This should be an interesting area for reflection and I would hope to come out of this material with a more compete idea of the balance between what I need and what I want.

USP

The HK USP .45 Huh? Not that USP? Oh. Well, maybe you would like to talk to the business end of this USP? … Clack, clack …

This is something that I struggle with a little bit. I think that most things are re-hashed version of what has come before and thats not usually a bad thing. I wonder just how many successful applications and games really are unique? While I was in business I read a book called The E Myth, the myth that all small business owners are entrepreneurs. I was a very interesting book and its main aim was to inform the reader, no doubt a small business owner, that they need to think about the business more like a machine, a franchise, in order to be able to decide what areas of the business they should be focused on and what to actually do in those areas to see the improvements manifest. The reason that I talk about it here though, and if memory serves me, the author, Michael Gerber, goes to great length to explain that no, you don’t need a USP to be successful in what you do. He say’s you can take someone else’s USP and just execute it better. That is a challenge in itself and not to be understated but it doe’s throw a small (probably Snap On) spanner in works for the theory that you must have a USP in order to be successful. I’m not saying I’m right, I’m just saying that I have read a different opinion in the past. Maybe its my definition regarding the extent to which the app (or any product) needs to be unique. Is it enough for instance to say that our game is Halo, but darker and grittier with an adult story and an 18 certificate? Is that unique? Or is that Halo (been done) with a dark gritty edge (been done) would not be enough to declare a USP to investors and audiences alike? I’m not really sure.

What I learned from Rich Barham

This is one serious, heavyweight guy. I learned so much listening to him.

‘Everyone really cared’ – talking about his experience being on the team for World of Warcraft.

In my very short experience as game developer, I have learned this lesson well already. In trying to get Serial Link to be a real game that could actually launch and be more than ‘that time when we were working on that thing a while back’, I have found that the biggest challenge really is getting to work with self motivated people who really buy into what we are trying to do. I’m not going to pretend that Serial Link is the project that every developer should be breaking my door down to work on, but I have noticed the difference in people that float around a project doing a lot of talking and the people that really care about what they do. I am not shy about stating that I am one of the ones that really care and I find it difficult to have to kick people in the backside on a project like this, which should really be a labour of love at the moment. I think that this feeds back into the decisions that I need to make about how to set Serial Link up for future development, how I want to recruit and how and then of course, how to fund the development. Then there is the small question about what to do with it after that…

‘The player experience exemplifies everything that you are trying to put together’

I have become more sensitive to this recently, over the last few months. The practical thing that I have done that embodies this concern, or rather the understanding of this truth, is the inclusion of a ‘Validate’ column on my Kanban board. The done rule for this column ‘Player reactions and feedback has been gathered and analysed. All issues identified and inserted into the workflow as needed. Ideas have been captured for the backlog if there are any.’ This is my attempt to really put the player at the center of what we are doing. Rich goes on to make more excellent and common sense observations in that you can have the best strategy and the best monetisation plan but if people don’t want to come back the game that you have put out there, and they don’t recommend it to others, none of that really matters. Its about the game first as thats the fulcrum for everything else. Closely related to this also is that the ‘single vision’ of what the game should be needs to be preserved and share regularly so that all the development work really is following one unified path. I like the way that he puts is in that the game should have a ‘sharp edge’ that come through in the gameplay and when thats missing the game feels blurred. Thats a really good way to see it.

‘… so that you have all of the pillars of your design down …’

This is another attitude that resonated with me. I like to think of Serial Link in terms of ‘A story of ferocious tactical combat using weapons and psychic powers to decimate anything that stands in the way of your escape’. This tells me that the main pillars of the game are:

  • Story
  • Tactical Combat
  • Weapons and Equipment
  • Psychic Powers
  • Violence in look and feel
  • Being pursued

He also talks about talking about it! Its clear that Rich would not intend for these things to be committed to a design doc, put in a drawer and then never spoken of again. I could see the benefit of organising the tasks and user stories around these pillars and making sure that whatever asset is being created, the developer would be able to articulate which of those design pillars it was supporting.

‘The truth is, unless you have a business plan, you can’t persuade investors and other interested parties to come on board’

This is the less fun side of what it means to make games. I think that when I embarked on this passion project of being a developer, I really enjoyed the creative freedom that it involved, particularly while I was completing the course. It was that safe haven that I needed at the time to just relax and explore the technical and creative end of what I was doing. But, just outside the door, the real world never left and there would of course be a time when I would need to make some money at this. That time is not now, thankfully, but its coming by the end of the year. I have had a couple of ideas about what I wanted to do and the one that has been taken the furthest was that we (the people who worked on it originally and some others I recruited since then) would make a playable demo for Serial Link and then run a Kick Starter. We would use the money that we raised to fund the development of the full game and then enjoy to process of making the game! I think that this is another example of biting off more that I can chew and after a series of events and delays, that just has not happened. However, all is not lost and I think that Serial Link still has the potential to be made although I think that pursuing a publishing deal would likely be the way to go. At worst its a great portfolio piece and I have to say that it has opened a couple of doors to conversations that I would not have been able to have otherwise so I really am very pleased with where we are overall. I am also quick to forget sometimes that I have been an aspiring developer since 24th July 2017 to now. On that day, I decided that I would get into the games industry. I had not coded for nearly 20 years and I knew nothing about Unreal or Unity or anything else. I don’t think I’ve done half bad really in that light.

As far as actually creating a business plan goes, I think that the smartest thing that I could do would be to add a member to Sofa Ninja Studios and share the company with them. That person would be the business development manager, or what ever they wanted to be called. The role would be to deal with all these things that I think I want to leave behind. I want to make games, I dont really want to run a company that makes games but I do want to own one. So, I want to creative freedom and I want a Directorship but I would like to delegate the business side of the business to someone under whom that would like a fire. I like this reflection stuff, helps me think…

Lack of SMART goal

I really hope that this is seen in the light that I intend. I dont want to set a smart goal for the content this week because I have others that have not even been started yet. I am very conscious of the dangers of talking the talk and I won’t fall into that trap. I just cant afford the time to consider this material in any more depth than the 3 hours it has taken to go through it and reflect on it in this much detail. I would rather be honest now and say that I must concentrate on the other areas of weakness that I have identified, in particular the SMART objectives from the jam and that of the last post on GTD and gamification. It does feed into one of the things that Rich Barham said about making sure that the product is good at its core and that what I am trying to do. I am spending the time to fix the things that I already know need improvement in order that I become a competent developer. Having a good business plan for my shoddy work is to miss one of the key points from that brilliant interview.