Saturday, July 30, 2016

Preparation for THAT Conference Class


While I've been preparing for the presentation I'm going to give on Unity at THAT Conference, anyone who is planning to attend should also be preparing, if you want to try following along.  You should note, that I'm not planning on stopping to help debug issues during the presentation, but I will answer questions at any time in class.  If you plan on attending and just taking notes, use what ever setup you wish.



The game I'll show you how to build is a Chain Reaction game.  It will be easy and can work on a phone or tablet with ease.  

For those planning to follow along, I recommend:
1) a laptop
2) a separate mouse with a middle button.
3) the latest installation of Unity.

 - That's it.

I was considering having some packages, or a starter project already downloaded, but I've worked all that into the presentation now, using no outside content.  We'll be using basic shapes, and getting as far into this as we can.  I would suspect during the class we will get everything up to explosions.

Wednesday, July 20, 2016

Dependency Injection for Unity Statics


Back when I worked for InContext Solutions, one thing I was asked to do was make our Unity code fit into a SOLID framework.  But how do you get a system dependent on static method calls to support Dependency Injection and be testable?  Simple, you write a wrapper and interface for all the static methods you want to use.

But since that is a lot of work, and since these methods change between releases, I've written some code to automatically extract the interfaces and wrappers by finding all the static methods and properties.  It wrote most of the code for me, in fact it wrote two hundred and seventy files.   They weren't perfect, I had to fix about 60 minor bugs for special cases I hadn't programmed it to deal with.
But now I have a fully wrapped Unity asset available for free for anyone wanting to get to develop for DI frameworks like Zenject, or get some mocks made up so unit testing doesn't require unity up and running, but can be included as part of a Continuous Build environment via means of NUnit, MS Test or the like.

I've proved out part of it, but there is a lot of code here.  If anyone runs into issues with it, I appreciate the feed back and will complete this.

In-Component Unit Testing

I've also introduced what I think is an interesting concept.  Unit Tests directly associated with the component's Custom Inspectors.  The value, is that the test cases can then use the state as used directly in the game.  Including pausing a live game and triggering a unit test for an object at any given state (accept destruction for obvious reasons).

I think I'll turn that into a separate asset next, and enhance the appearance, as well as making it easier to work apply to any given behaviour.  The current code, as it was a proof for the interfaces and wrappers, is more just a hard coded grouping of test cases.  Plenty of room to improve.

Download the code here.  Full source included.  https://www.assetstore.unity3d.com/en/#!/content/66012

Tuesday, July 19, 2016

Meetup Retrospectives


I've been trying to create a game development meetup (SDC.Game), and get it popular, but I've faced one problem for a while that I didn't realize was a problem.  Getting help.  I'm often looking up articles and seeking ideas from the group on how to improve it, but I've never had any format to follow.  Its always been ad-hoc.  From now on (or so I believe now), I'll be doing a retrospective after each meetup.  

So what is a "Retrospective"?  A retrospective is a meeting where we discuss what went well, what went poorly, and what changes we should make.  It should involve the whole team.  In this case, all the RSVP'd members to the meetup.  

But for a meetup group, this will not be in person, nor will it be a group phone call online.  For the time being, I'm using Meetup.com's discussion board, and emailing those who RSVP'd to a meetup.  The discussion will give my initial perspective, but then ask everyone else to chime in and off the same kind of feedback or challenge something I said.  Perhaps what I thought was a difficulty helped others.  

Will this improve things?  Who knows, but I won't find out if I never asked.  We can always decide to change the approach in the future.  Which is exactly what the retrospective is supposed to do.  I'm wondering what else would be good to run a retrospective on.  :)


Monday, July 18, 2016

Before your Next Interview


Interviews are scary.  Doesn't matter if you are are unemployed, or doing the hiring.  It can be nerve racking, finding out if you measure up, or trying to size up a candidate to figure out if they will be able to do what you need.  After reading books and articles on interviewing and psychology, and then through countless interviews from both sides of the table, I had the opportunity to practice and observe everything I studied.  

I'll sum up a useful portion of my interviewing science in this article.  Note: this is focusing on the interviewee.


Two Kinds of Interviewers

This is rather broad statement, but pretty much everybody tends to fit into 1 of two categories.  Either they were trained for it, or not.  Most interviewers were not trained for this.  They have their position because they were promoted into it, or primarily trained as a manager, but not for hiring.  

Those who are not trained, can seldom give a clear answer at the end of an interview as to why they think one candidate is better.  To them, it is usually about the 'fit'.  Which really just boils down to who did they get along with the most.  Their past history and ability to answer questions, play a role, but numerous candidates will typically do well for that.  So to the untrained interviewer, who ever is easiest to get along with, will typically be hired.  

Those who are trained are walk out of the interview with a clear idea of how the candidate did and also how they compare to others.  They have a list of prepared questions, but they aren't just pulled from the net.  There is a specific set of rules applied to the creation of these questions.  These questions have scores tied to them.  While trying to "be their friend" might help a little, it doesn't play heavily here.  Here you need good answers.  They can often smoke out a liar, and there is little you can do about it.


How to tell the Difference

Inexperienced interviewers will often phrase situational questions as "What would you do..." where experienced ones will ask "Tell me about a time..." 

What would you do?  You can honestly and easily say the absolute best thing that comes to mind.  Customers could yell all day and I'll calmly take care of all their needs.  Not that reflects your history, but that's what you believe you could do. 

Experienced interviewers will ask things like "Tell me about a time when..." The difference being that are asking about a specific point where you had to face some issue.  In this case lying will change a variety of verbal and physical queues.  It is easy for a trained interviewer to identify these ticks, and ask trapping questions.  I.e. Don't lie.  You will get caught.


How to react to an Inexperienced Interviewer

1) Don't lie.  
   No matter what the scenario, lying about anything in an interview is a setup for a failed work relationship.  You can get caught, and often the reason to lie is to appear more experienced.  When you take on work above your head, your time will be nothing but stress.

2) Mirror their body language. 
    Mirroring body language sends a signal to the other that in this situation, you act like they would, which implies you understand like they would, which implies you will understand them at a deeper level than someone with different gestures.

3) Use open body language.  
   You should mirror the interviewer, but only as much as they are open.  Stress, and disinterested can close up typical body communication.  Signs of closed body language include crossed arms (if you can't see the palms), crossed legs, closed fist, all things that close the muscle groups, and get you closer to a ball shape.  Additionally lack of attention would show as little eye contact, feet pointing another direction, body pointing another direction, doodling.  Words are about details, body language is typically about trust.  You want to keep your body language open, and closely mirroring them.  

4) Don't mirror their body language.  
   But what about 1 & 2?  After you've mirrored them for a while, try leading the body language conversation.  This is done by some open gesture that is different, such as leaning to one side, hand on the chin as if in thought, correcting a slouched posture.  Still open, but different.  You are testing the water.  If they start to follow your lead, then you have their trust and interest.  It is in human nature that once a positive connection is made to reinforce that connection.  If they start mirroring you, you are doing well.

5) Laughter and Amazement.
  If you can get them laughing, or smiling, or impressed with a solution, these are all great things.  Please note, this is not accomplished by pulling a rabbit out of a hat (unless your interviewing to be a magician)  or by any form of vulgarity.  This is accomplished by observing the interests they lead with.  This part is played more by the hip, and you'll have to gauge how best to read and respond to the room.  

You'll know you did well because at the end of the interview there will be a clear feeling of success, of connection.  Typically smiling, leaning in a bit during the hand shake.  It doesn't mean you got the position, as they might have found someone else who is hard to deny is a better fit or a better skill resource, but you have done well.  


How to react to an Experienced Interviewer

1) Be truthful.  

Above others, these interviewers can often read body language better than most.  You should never lie during an interview, but these interviewers will often ask questions that feel like traps, and if you are insecure, lying might feel like your only option.

2) Bad responses are ok, if you learned from them.  

Consider this question, "Tell me about a time when a manager was making things very difficult."  Most of us can think of a story like that.  The trap is when they follow it up with "What did you do to improve the situation."  Suddenly there is the realization that you need to take some responsibility.  Was there anything that you did, or do you just enjoy the opportunity to complain?  If you took no initiative to improve the issues, you can say that at that position, "No, I did not.  However, in future positions, when faced with similar circumstances, I have ..."  And do it.  

You are responsible for your environment.  You can mention a communication breakdown to a manager, or to their boss, if the issue is with your manager.  Once you have exhausted reasonable options, and the problem still exists, you can at least say you took X actions to resolve it, but it did not work.  

The trap questions are not to actually trap you.  They want people who have faced difficult situations and grown from them.  Don't relish in how horrible a past employer was, just be clear about the issues and what you learned from them.  

3) Still follow the advice for the inexperienced interviewer.  

They are using science to read you, but you can still improve the situation with positive body language.  

4) Answer above and beyond the question.

Typically you will get awarded points per question.  Lets say 1-5 points.  5 is usually reserved for something special.  I.e. present the solution, but try to offer some unique insight, or valuable alternative.

Usually there will be extra points for something that stands out.  I.e. not related to a question, just the interviewer wanted to record extra credit.  Perhaps you teach this topic at a college.  Perhaps you have a a valuable connection to an account they want to land.  But the key is to realize you want to go above the expectations of this person to secure those extra points.

-- --- --

Now this has been generalized significantly.  Some interviewers will be in between, developing their skills, or trying something entirely different.  But it seems most often they fall into one of these two areas.  And there is always a candidate more fitting than you.  And some interviews are just off, even with the right candidates.  Don't let any failed interviews get you down.  Learn from them and move on.  

For additional reading, I recommend Victoria A. Hoevemeyer's "High Impact Interview Questions"

Friday, July 15, 2016

Networking Tip: No number on your business cards.


In the book "Networking Like a Pro" by Ivan Misner, (which I highly recommend) it brings up the idea of not including your phone number on your business card.  But how should you give them your phone number?  Write it on the card in front of them.

Why?
Think about the last time someone gave you their card.  Unless there was something super special about the occasion, it typically goes into an imaginary oubliette in your pocket.  I.e. it is pocketed and forgotten.  How does writing the number in front of the person help?  By conveying the message that it really is OK to call.  It personalizes the card in a way to make it more memorable, more connected.

NOTE: It is not the fact that it is written, but the fact it was personalized for them.  I.e. if you just hand write your phone number on all your cards beforehand, it makes it look like you just forgot to add it to the card.  Which appears unprofessional.  You need to do it in front of them, and then it conveys you are providing this additional way to be reached.

Don't Stop There!
Never take a line of advice without considering the psychology behind it.  This isn't about the card, its about the connection.  You are taking a rather mundane transaction and personalizing it to make it more connected.  How else could you accomplish the same thing?

An idea would be to wear something that stands out to your next event.  I'm not talking about wearing a clown suit to your next business convention, but a hook.  Some accessory to get them to ask about it and start a conversation on, especially if it relates to how you can be of service.  Do you sell fishing tackle?  Wear a hat with a fish hook in it.  Sell racing gear?  Have a relatively large gear prominently displayed on your key chain.  Make comics, wear a watch with your favorite character on it, especially if it blinks every now and then.

Another would be match making.  Remember the people you met, how they can help others and what they might need, even if its not for you.  After the meetups, look through your list of people you've met.  Send an email including both parties.  Saying that how you all met, and pointing out the connection.  I.e. such and such place has been having trouble with their email provider, but you know a great IT Technician.  Email them both, and drop the conversation starter on how they can help each other out.  Even though its not directly helping you, they will remember the assistance.  (Please note, if it is an issue like failing email, make sure the technician you are going to suggest is not the source for the broken email) :)

Its up to you and your niche market to figure out what else you can do.  These are just some ideas.  But get networking and make valuable connections today.

Thursday, July 14, 2016

Meaningful Decisions - Make your Games more than 1 Dimensional



All games give players choices to make, but how meaningful are they?  If you search Meaningful Decisions in google, you'll see this is actually a very important step in game design.  You could argue that everything a player does is a choice.  Right, left, jump, pick up...   But meaningful decisions will get a player thinking and connecting to the game more.  While you need to make PoC's (proof of concepts) on new technologies, you also need to play test the meaningful decisions, and see if its fun.

So what makes a decision "meaningful?"  Bryce Morrison posted an excellent article on GameSutra.  I'll borrow from a list of what he believes makes a meaningful decision.:

  • Awareness - The player must be somewhat aware they are making a choice (perceive options)
  • Gameplay Consequences – The choice must have consequences that are both gameplay and aesthetically oriented
  • Reminders – The player must be reminded of the choice they made after thay made it
  • Permanence - The player cannot go back and undo their choice after exploring the consequences
A while back, when I first started finding out about meaningful decisions, I scoured the internet trying to find better explanations of it, because it felt to vague.  Its like the articles where trying to explain how to ride a bike.  Its hard to portray in text.  

To help get around that, I figured I would give some key examples of meaningful decisions.


Racing Examples
  • Do I make a pit stop?  
    • The player will lose time, but have a vehicle in better condition less likely to have a tire blowout.
  • Should the car be geared for higher speed of faster acceleration? 
  • Should I drive through a smoking wreck?
    • If I hit another vehicle, I could destroy my own car, but I could also get ahead.  
  • Do I use Nitrous on turns to keep up speed?
    • At the risk of losing control of the vehicle?
FPS Examples
  • Should I take the longer safer route, or the faster more dangerous route?
  • Do I use a bigger weapon and risk running out of ammo, or a smaller weapon with lots of weaker ammo?
  • Do I shoot from a distance where it is safer for me, but risk missing and alerting the enemy to my presence?
  • Do I evade a higher level enemy or take a risk in battle?
You'll notice its not "Should I move left or right" or "Should I jump over pits?"  Those are immediate mechanical operations.  Instead this focuses on decisions a player makes in the game, that alter how the game is played.  For instance, in the racing example, a player who recently had a pit stop would be more apt to make it through a wreck and have their vehicle survive an impact.  A decision the player would have made potentially 6 laps ago is still affecting their options now.

In that example, Awareness could be a damage counter on the vehicle.  Not just gas and tire wear, but vehicle damage.  Awareness would be a pit boss telling you to come in, you need to get fixed up.  Consequences would be getting a flat or running out of fuel, possibly even a drop in speed or acceleration.  Reminders would be a pit boss yelling at you, to get fixed, or warn you that your vehicles to damages to risk taking a hit in a car wreck.  Permanence, means the player can't easily redo the decision.  Typically damage, or destruction to a player's vehicle will result losing the level, or at least waiting to get towed to the pit.

All games will have basic mechanics, but the better ones will give the player decisions that weigh in on future options and game play.  When designing a proof of concept it is important for the proofs to focus on these meaningful decisions.  This is where the game play becomes more memorable.

Wednesday, July 13, 2016

Dev Tip: Play Tests should be Incomplete

If you want to get better feed back from your play testers, consider adding an element that is obvious and incomplete.  If the game looks closer to done, they might reserve feed back to only apply to things that look easier to fix.  


Most people, when attending a restaurant, and the food taste in general is mediocre, the customer is not apt to say anything, but simply not return and possible leave a bad review.  But if the plate has something clearly wrong with it, like there is no burger in the bun, or the bacon is charred black. The customer is more likely to assume the food *could* be good, but has a mistake and ask for it to be fixed.

Play testers are often the same way.  If they think the game sucks over all, they'll be less apt to say that.  But if its clear that it is incomplete, that it is a work in progress, they will be more open about criticisms.