Thursday, November 19, 2015

There is No Such Word as Failure: A Lesson on Failure and Balance



This may seem like a strange post. But it is a reflection on the past five years that I feel sharing with anyone can help them think about what they are doing in regards to their profession, as well as where they plan on going. Be warned though: Get settled, get some hot cocoa, and enjoy the read. Perhaps it pertains to you in more ways than one, and it does not necessarily have to be about video games or your career.

So, let me continue on and start with the strange, seemingly unrelated topic first: StarCraft 2, a video game.

With StarCraft 2: Legacy of the Void being released this past month, I have spent a lot of time reflecting on the past five years in regards to my past pursuits in relation to video games. These reflections are on how I handle something that I enjoy, how I handle failure, and ultimately, what I have learned from the past five years in regards to my pursuit in the video game industry.

Let us start at the beginning. That is, the release of StarCraft 2: Wings of Liberty. That was about five years ago. A lot was going on for me at that time: I had graduated high school, started my education at DeVry University, and maintaining a wonderful relationship with my now fiancé. StarCraft 2 had a major impact on my life and may have made me who I am today. I say this for three reasons: it happened at a critical time in my life, it helped define my work ethics, and it allowed me have some introspection.

I remember the day I first bought StarCraft 2. I was at a local Target with my fiancé. After some debate I bought it. I then proceeded to spend the first three nights playing through the campaign. I then logged in to online multiplayer (the real reason the game is so popular) for the first time. I began to become assimilated into the SC2 ecosystem within the course of a week.

After a few losses and one win I was placed in Bronze League – one of the lowest leagues to be put in. I played a few more games which led to me being obsessed with winning. This was odd for my personality as I played sports my whole life and didn't care about winning or losing as much as the other players. This obsession led me to spend hours watching SC2 shout-casts by HD and Husky (don't know who those guys are? Me either - anymore) and improving my SC2 skills with tips from Day9 (quite the fellow). The hours spent doing this usually crept into the wee hours of the morning. Sometimes, it would be dawn before I decided to go to bed.

With all that dedication, I started to improve.

With my improvements I began winning. I was consumed with this rush of excitement, the feeling of glory, the joy in crushing my opponents. I was winning games using my god-like macro abilities and my sick Protoss builds. I was rolling over the enemies. Within weeks I climbed the ladder from Bronze league, to Silver, to Gold, then to Platinum league. I was an SC2 super star in my head. (As a note, the Master and Grand Master leagues did not exist at that time).

A few months in I started to pay attention to the pros - NaniWa, HuK, and MC. I would download a few of the replays they would post and study them. I would watch the tournament VoDs – Videos on Demand. I would also do practice runs in game to perfect my build timings. Indeed, I was going all in.

After some time I progressed to Diamond League. The excitement! The joy! I WAS A GOD! ... I may get a little carried away with my statements but it is hard to share the complete, full body experience that came with joining the upper echelon of SC2 players. Worse still, I became a Rank One Diamond in my division for a good period of time. My ego began to tear down the walls of my bedroom around me. This is where the decline began.

The game started to consume my life, it occupied my every thought. I had transitioned to three jobs at the time and all I talked to my co-workers about was StarCraft 2. My lovely fiancé (then girlfriend) listened to me talk her ear off about every aspect of the game - even watched a few tournaments with me (bless her heart). I was a Protoss... that is how I defined myself. I was 19 at the time.

My mind started to become the barrier. I would get cocky trying out for SC2 clubs, I was disheartened by the lack of SC2 community in the Midwest region near me, and I felt alone - nobody I knew played SC2 as well as I did to practice with. It was a void that could not be filled. I began to feel lonely. For some reason, I just lost interest. I started to feel like a failure, there was no rhyme or reason to it, it just sort of happened.

I quit StarCraft 2 before Heart of the Swarm (the second part of the three part game) was even launched.

I moved onto League of Legends, another competitive based game, this time with teams of 5.

Talk about a vicious cycle. If you reread the entire section about StarCraft 2 and replace "SC2" with "LoL" you get the picture. I fell into that trap as well.

Looking back, playing video games consumed me when it came to competition. I enjoy playing the ‘regular’ games like the entire Witcher series by CD Projekt Red and the Total War series by Creative Assembly. But the competitive games affected me differently than those. They started to feel like a job, a climb to the top. I would get frustrated and feel inadequate and I would blame everything around me for that feeling – all from a silly little games.

With that being said, we will move onto my projects I worked on in parallel with this SC2 craze.

I went to DeVry University for a degree in Game and Simulation Programming. It was all fun and games for the first two years as with any College / University. That is why I had all that time to play SC2. However, junior year began to challenge me – which I enjoyed. I was learning project development cycles, advanced C++, networking, game design, and game engine architecture. I had also joined a few people on some professional projects during my time at DeVry. And this is where I would like to lead into. (If you really want details on my projects at DeVry, read all of my 2014 posts.)

a simple FPS cam (above) and a trailer for my senior project (below)


I had worked on several projects with outside entities while at DeVry. These projects - in no particular order - were named as follows: Super Ubie Land, Undead Fred: A Grave Tale, Invisible Battles: The Quest for Hope, War for Orion, Soccer Legend Online, and Bring out Your Dead Trading Card Game.

I was prototyping Super Ubie Land for Notion Games, LLC on the Game Maker engine. Just like when I was obsessed with SC2, I threw myself into it. I had a working prototype up and running for the developer in Game Maker. I even started to prototype another game for him. Turns out that prototypes and proofs of concept are not permanent nor guarantee a job. I spent a summer on that project and the company decided to go with a different engine that they did not need my skills for. Which I am okay with – these things happen. Was I heartbroken? Yes. To be 19 and have a name on a legitimate game would have been awesome. However, I could not help myself from blaming them and feeling like a failure for some time.

Herald in my 20s. I was looking for a project to work on. So I posted on the Game Maker community forums as a programmer looking for work. I was picked up immediately by a wide-eyed hobby developer. The project sounded fun; I was up for anything, optimistic, just getting off the high of a really fun school project learning DirectX 9 (now ancient). I accepted.

I must say, it was a team filled with talent. If I met that same team today, I would still have the same optimistic feeling. We had a talented artist, a practical game designer, talented programmers (yes, some self-flattery there), an excellent sound artist, and a game demo ready in three months. There were talks of interviewing with some small time indie game magazines. We were sailing along nicely.

test screenshot for Undead Fred: A Grave Tale

One day – it just stopped. It was strange. We went from daily emails to weekly. Skype never rang for me anymore. Eventually – I was working solo on a project. I was disheartened, frustrated. I must admit I was quite angry. I uploaded it to the Steam Community and said “ah ‘phooie with it.”

From that point on I promised to focus on school for I had, once again, completely devoted myself to something just to be tossed aside like used underwear at the end of the day. Worse yet, nobody else noticed nor cared. I felt cheated of opportunity, untalented in my skills, and completely distraught.

Fast forward a few months. I broke that oath. It was mostly out of desperation for an internship before graduation, because internships are of the utmost importance. You are doomed without one no matter the industry.

I cannot remember how I got there, but I came into contact with the owner of an indie game studio in downtown Milwaukee, WI. After some research I started to believe in the project and I worked on Bring out Your Dead TCG for Ever Fire Studios. It was a green project comprised of hobby developers and students alike. All resources were paid for by the owner. For all intents and purposes – it was an unpaid internship, which is not that uncommon.

The project was approached using the Agile Project Management methodology. This was a breath of fresh air because any project prior there was no project management. Which was fine for prototypes, but not for a complete project. We were getting along fine and having fun. The internship required seven hours of work a week and the attendance to a meeting once a week. This helped me regulate my time spent on it unlike the previous projects for Super Ubie Land and Undead Fred: A Grave Tale. Even more so, it was a far cry from my StarCraft 2 days – where I managed my time horrendously.

However, it was not meant to be. Owning two companies cost money and the priorities were on the other company – Forever Interactive – and their exciting project Visions of Zosimos. I do not blame them, this project was just getting started and VoZ had been in development for years – and a great project at that from playing it a few times. But, I was – again – heartbroken.

(above) visions of zosimos trailer

That brings my total time dedicated to projects to about two years. My total number of projects I worked on to three. The total number of completely heart-wrenching, motivation killing, talent squelching failures to three as well. I was on a roll and a nice trip down failure lane.

It was starting to feel like StarCraft 2 all over again. I would start, get excited, be optimistic, make great progress, only to see things halt and die on me. Sometimes, I don’t even know why it went south other than that it did.

To complete the overarching theme, I graduated school and worked on three more projects after that. These ones were shorter term and not as important to me but I will write details just to cover all my bases.

Soccer Legend Online wanted to hire me on a contract basis. They wanted some AI programmed in with networking within three weeks for a small payout. I was arrogant and thought I could do anything, a motto I seem to have going for me as that is how I felt with StarCraft 2, the reality did not match my internal expectations. Needless to say there was fallout in communication and I did not deliver the expected product. Now, they are Greenlit, so kudos to them.

Then the game Invisible Battles: The Quest for Hope. If ever there was a time that I could relate myself to being a wormhole of confusion, it was then. I had no idea what was going on with this project. All I knew was that I was programming a game and I was getting paid some decent money for it. I had no idea where the artists were at, but I never had assets to use from them. Sound designers were non-existent. The game designer, well, I wasn’t sure who was the game designer or just a person voicing their opinion.

(above) Invisible Battles: The Quest for Hope combat, morphing, and item pickup prototype

I made great progress on that project. I was excited to work on it as it was with the recently released Unreal Engine 4. Again, I threw everything I had into it, all my free time, all my thoughts, and all my efforts.

Then the developer ran out of money. Again, I had the overwhelming feeling of failure and complete loss of worth.

This brings me to my last endeavor with an external team: War for Orion. I have no one to blame but myself on this one. I was excited for a brief moment and I was working with that team in exchange for a trade of skills. I program for them, they make art for me. We both meet halfway. I received half of the excellent art assets (and I didn’t even deserve that much) and I worked on the game halfheartedly. This has nothing to do with the project in itself – it is a great concept and I try to follow the team.

(above) War for Orion prototype video

What happened was that I was beginning to become bitter. I started on this project expecting the same thing to happen as had happened before – I start, get excited, move fast, devote my time, and then find out it was all a huge waste. My own pessimism got to me and it gave off an aura to the team.

I was asked to leave – on friendly terms – after a few months.

Again – heart broken. But this time, it happened because I expected it to happen. I conjured the event with my own mind. This is a direct relation to what I did with StarCraft 2 and League of Legends. I brought myself down in the end.

This is the point of the story where everything ties in. You see, I followed the same path when it came to StarCraft 2 and Game Development. I let failure get to me and control me at this point. It didn’t lead me anywhere useful… or so I thought.

Reflection is a great thing. It allows you to look into yourself and learn something new. What have I learned? That commitment to something does not mean going full throttle all in to get where you want to be. Commitment means taking the time to plan for the long haul and balance the work that needs to be done with the rest of your life.

Constantly, I hear about these developers and pro gamers that spend 70 or 80 plus hours a week on their goals. That doesn’t help anybody but your manager or yourself getting the illusion that you are doing something worthwhile. Damaging your health, even if it is for something you love, is not worth it – ever.

I have learned a lot in the past five years, and these are just the things I have learned reflecting on something as simple as my enjoyment of a video game and my pursuits of working in the game industry. Better yet, all of these perceived failures were anything but.

I have learned that there is no such thing as failure – only the opportunity to learn and grow. So, the next time something doesn’t work out, or you lose focus and stop a great project. Sit back, write it down if you have to, and take a look at the why. If you are writing a lot of whys about something other than yourself, stop, you are not ready for this.

Reflection takes self-awareness and introspection. You need to know your strengths and weaknesses – what makes you tick. Better yet, you need to find out your flaws and work with them, or improve them. My flaws were obvious in the above stories: I did not balance my life well, I allowed failure to overwhelm me, I used to blame outside entities for these failures, and I allowed myself to be negatively affected by these events.

I have learned over the past five years. I have learned from StarCraft 2 that I can easily become obsessed and unbalanced when it comes to achieving my dreams. I have learned from my past projects that management is a key factor in success. I have also learned from both that there are things more important than making video games, which is just a career after all.

Finally, to prove that there is no such word as failure, I sit every day at my day job, programming – a job that I love. I would not be there if I had not gone on wild adventures in regards to video games and game development. From each of my endeavors I learned a little more about myself. I have tweaked my bugs, and produced a better self. I am happy and I will continue to do what I love outside of work – like play video games and make them, and – most importantly – spend time with those I love. The only difference now than five years ago is that I will no longer consider anything a failure; I will have a healthy balance in my life; and I will only work on what I enjoy in life because life is too short to be miserable.

Now, I challenge you: sit down, reflect on all perceived failures in the past five years. Find reasons why you failed due to yourself. Then reflect and learn that they were not failures, but opportunities to grow.


For those of you interested in the projects (some now dead):

· Visions of Zosimos by Forever Interactive

· Super Ubie Land by Notion Games

· Everfire Studios

· Undead Fred

· Soccer Legend Online by True Illusion Software

Preview my portfolio website for my upcoming games by clicking this text.

Wednesday, November 18, 2015

Preview Developer Site

Hello all,

I just wanted to share my latest quick project of mine with everyone to get some feedback on it. I currently have a website hosted at http://mhgames.azurewebsites.net. I plan on making this website a model of my portfolio and wish to have some feedback on it. My goals for this website are pretty simple:

  • Concise messages about what I do and my projects
  • A list of my projects with an overview
  • A detailed view of my projects
Please keep in mind all content (for the most part) is placeholder content. I am looking for feedback in regards to form and function.

Here is the link again.

Thank you!

P.S. new post coming up about the games on my portfolio!

Wednesday, September 2, 2015

Simple Property Reflection and Serialization

    It has been a while since I posted, but it all because of good reasons, I assure you. However, in my busy life I have found some time to whip together a simple C++ solution that demonstrates how to implement your own C++ serialization and property reflection. Along with that I have included a small demo that shows the code working as well as one that shows one of the possibilities of using this system.

    Keep in mind that this is far from complete as it only supports simple classes in the meantime. However, you can always build up from the source code to add support for enums, structs, functions, templates, interfaces, pointers, references, and multiple inheritance. For right now though, I will show off the basics.

    So, where to start when it comes to a C++ reflection system with serialization? Well, we want to definitely start off with the reflection part of the code. Where do we start from there? First, we want to know what an object or variable is. What kind of data it represents. This is commonly known as the type of the variable or object. This is where we will begin. There are a lot of different ways to go about this approach. For instance, I have seen pre-generated GUIDs assigned to templated structs with a single 'Get' method with a static function member that returns this GUID. Works out pretty well, but I went even simpler.

    The approach I took was a single static struct with a type identifier (incremented long) and a name (a simple string from the standard library). This is how the code looks:


static long typeidInstance = 0;

template<typename T>
struct Type : public IType {
 Type(const std::string name) :
  name(name)
 {
  typeId = typeidInstance++;
  TypeGraph::Get().AddType(typeId, this);
 }

 long GetTypeId() const override { return typeId; }
 virtual const std::string GetTypeName() const override { return name; }

 bool IsTypeOf(IType* other) const override {
                return other->GetTypeId() == typeId;
 }
 typedef typename T TYPE;

private:
 long typeId;
 const std::string name;
};

    What is this code doing? Well it is pretty simple. It inherits from a basic IType interface so as to allow a map or graph to contain references to the defined types without knowing the specific implementation. This graph allows getting meta data on types (reflection data) based on the Id or Name of the type. By using this template, a few macros, and static initalization, we can defined types like seen in the "Types.h" header.

    Alright, so we have a way to identify different types without much code overhead. What about information about a type? This would be meta data (reflection). Now, type has the name included (which really should be removed) but we have a class called Meta that will be the base class of everything reflection based.

    Meta has two basic properties: name and typeId. The name is not the type name, it is rather the name given to that Meta information, i.e. class name, object name, property name, etc. The declaration for this base class is as follows:


struct Meta : public core::serial::ISerializable {
 Meta(std::string name, long typeId);

 virtual ~Meta();

 Meta(const Meta& rhs) = delete;
 Meta& operator = (const Meta & rhs) = delete;

 const std::string GetName() const;
 const long GetTypeId() const;

 virtual bool Read(void* obj, std::istream& in, int version) override;
 virtual bool Write(void* obj, std::ostream& out, int version) const;

private:
 std::string name;
 long typeId;
};

    This class inherits from an ISerializable interface to make life easier for this example. It implements that interfaces Read and Write methods. Now, one misleading piece of info for this is that the interface name suggests it serializes itself; but the method takes in a void pointer to the object to serialize. This is probably not the best but works for now.

    In regards to the class details, it does what it does, it has a name and type id and getters for those properties. This is the core of the reflection framework. Another property I would like to add is a 64-bit data property that uses bitwise operators for meta data flags. Such information would be if it is a pointer, a class, a primitive, and / or volatile to name a few.

    Building up from this class we implement a property interface that has two added methods, Get and Set. Both of these methods do as they suggest to the property they reference. This property interface is only made so that pointers can be created for them in another Meta derived class called Class. Class represents meta data about a class. The code for Class is as follows:


struct IProperty;

struct Class : public Meta {
 Class(std::string name, long typeId);
 ~Class();

 void AddProperty(std::string name, IProperty* prop);
   
 std::vector<IProperty*> GetProperties() const;
 IProperty* GetProperty(std::string name) const;

 virtual bool Read(void* obj, std::istream& in, int version) override;
 virtual bool Write(void* obj, std::ostream& out, int version) const override;

private:
 std::map<std::string, IProperty*> Properties;
};

    Create, now we are able to get information about a class. We can also get any instance of a class and serialize it. How so? Well we can save the property information using these Read and Write methods using the Property template to write out the actual properties. If you want to see the implementation details about that, take a look at the Meta.cpp, Property.h, and Class.cpp source files. There you find out how serialization takes place using meta information, streams, and property pointers.

    This lays the ground work of the reflection and serialization example and concludes part one. I hope you enjoy looking at the source code found on github as much as I enjoyed writing it. If you have questions in regards to C++, implementation, or ideas, please feel free to comment.

Tuesday, March 31, 2015

Some Experiments and OpenSource code

Recently I have taken an interest in network communication more so than usual. Particular interests in secure network communications. With that being said, I have recently started on a small project dubbed "f42r". The given name is so because I had no idea what I was going to make when I started, or where it will be going - if it goes anywhere.

Currently, f42r is a cryptochat service. It is a single program that can be configured to run as a client or a server when it is started.

The server simple communicates all messages from one client to all other clients connected to it. The server is also configured on startup with a dh file, key file, and a public key file for ssl based communications with each client.

The client simply connects to and verifies the server. The server is verified as per RFC2818 despite the fact it does not use HTTP or HTTPS. From there, messages can be sent from the client application (running as a simple console application) to the server. These messages are sent to all clients connected to the server.

There is no data storage for these servers, all configuration is defined at run time and clients get to define their own name for each client instance they start up.

There is also some attempt at cross platfrom compatibility; however, the program has only been compiled in Visual Studio 2013 and its relative compiler and run on a 64-bit Windows OS.

Another small feature, done as experiments in OS APIs, is the InfoHarvester class. This guy, upon load, gathers miscellaneous information about the computer that the client is running on, then sends this data to the server being connected to. I was planning on using this feature to create hardware based identities.

Currently, the project is on github, found here: https://github.com/hollsteinm/f42r

As a warning, the project uses Boost and OpenSSL as mentioned in the Readme.

Thursday, February 5, 2015

Version 0.0.5.4 Of [Working Title] AdventureGameQuest Released!

Just a quick announcement for all of the awesome people out there, I have released version 0.0.5.4 of my text adventure game! It comes with a few gameplay enhancements as well as some additional security features.

The gameplay enhancements are as follows:

  • "whereami" command that tells you where you are, where you can go, and if where you are at is an exit.
  • First person narrative. Originally, we had some bad grammar, and that is fixed now. Everything *should* be in the first person narrative.
Security Changes:

  • You may now reset your password from the Login page.
  • Password requirements are less strict (due to popular demand, it is *just* a game after all)
I look forward to hearing about some of your adventures in the game and comments about what can be done to improve it! Link here to play: http://adventuregamequest.azurewebsites.net/

Tuesday, January 27, 2015

Program Like A Pro

Today I have decided to program like a pro and implement a "One function to do everything" class that acts as an entry point into any program I will ever make again. I call it, the 'Jerk API'. How does this work? Well, let me tell you.

First and foremost, let us look at the greatest operator overload to exist:

operator()

Why? Why is this awesome? I will continue after we look at the greatest return type ever created:

void*

"Whoa!" You may be saying. I agree, it is "Whoa" worthy. The best return type is now combined with the ultimate operator to exist:

void* operator()

Do you see where this is goin? If so, you should keep on reading. Because the ultimate function that should only ever be implemented in every API, SDK, software package, library, so on and so forth is as follows:

void* operator(...);

Yes, the ultimate function. It is the one ring of programming, the Filet Mignon, the Mt. Everest, just simply the best!

For those of you who are not familiar with this sort of epic programming, let us look more closed at the void* return type. Firstly, what is void? It means nothing, or no type. How awesome is that! We don't need to worry about what we return because it doesn't care. Making it a pointer allows us to actually return a pointer to something that somebody else has to worry about casting to the right object. We can return whatever we want, when we want, and however we choose so.

Now let us take a look at the best parameter argument in existence as well, the vararg (...). This allows us to accept any number of arguments without telling the mewling babe of a programmer who uses our library/API/etc. the types of the arguments or even a description. A true interface that only the pros can handle.

union AnyKindOfParam{  float _float;  int _int;  char _char;  unsigned long long _ulonglong;  unsigned char _uchar;  double _double;  void* _anything_you_want_dear; };   class Jerk{ public:  Jerk(){   }   ~Jerk(){   }   void* operator()(int theFirstParam, char* the_second_param[], float something_that_may_be_time){   return new Jerk();  }    void* operator()(double you_cant_do_this, unsigned long long yes_i_can){   char buff[1024];   return buff;  }   void* operator()(AnyKindOfParam chaos){   Jerk method;   return method(chaos._double, chaos._ulonglong);  }   void* operator()(...){   int* i = new int;   *i = 0;   return i;  } };  int main(int argc, char* argv[]){  Jerk random_methods;   Jerk* no_way = (Jerk*)random_methods(0, argv, 0.000000000000000001f);  void* why = random_methods(0.5, 100);   return *(int*)random_methods(7, 8, "what", 23443.0f, random_methods, "we just put in varargs that returns a null pointer and we casted it to an int pointer, then dereferenced, we better have some awesome documentation!", 0x96, (char)7); }With that being said, let me give a great example of all the fun we can have! I even included unions for this example (probably just as awesome of a argument as the varargs). (I would click it to see all of the glory)


Well, isn't that just great? I concur. Anyways, if you want to be a pro programmer, always remember, your classes need only one method.

void* operator()(...);

ENJOY!