Making a Game – Report 4

08 Mar

A whole week late with this one.  Going to have to try not to make it a habit…  The last few weeks haven’t been the most productive, but I’ve made some progress at least.

After emailing James Schell, author of Art of Games Design to ask him about the 2nd edition of his book, it turns out that it’s already been released but linked poorly by Amazon.  This seems to have been fixed now, and so I finally picked up the book.  Then I returned it.  It turns out that the 2nd edition isn’t a regular Kindle book readable on a standard Kindle or the Amazon web reader, but a “Print Replica” which can only be read by installing the Amazon Kindle app on your PC, Phone, or Tablet.  Not really what I wanted, and it’s not helped when the app is just a bad PDF reader.  It’s not what I planned on doing, but I guess I’ll be buying the physical book instead.

I did get the camera controls working, so now you it focuses on a character when they’re selected, and lets you move from that point and rotate the view as necessary.  Took me a while to figure out how to get stop it from colliding with objects though, thanks to Unity liking to do similar things in different ways.  When Raycasting, you provide a list of layers to ignore collisions with in the form of a binary mask.  So to avoid layers 4 and 7 you’d give a value which evaluates to 1001 0000, but when you want to tell an object to not collide with other objects in certain layers, you have to pass in the layer number in a call (so just 4 and 7).  Both methods are fine (although I prefer the Binary mask), but when it’s different it just gets confusing.  It also forces you to set up 2 sets of constants to point to the same layers.  Using Unity to make games is starting to become a bit of a love/hate relationship.

Moving characters between layers is proving much trickier.  Right now when someone tries to climb a ladder they shoot off into orbit, instead of stopping at the top of the ladder, so that needs some tweaking.  The problem I’m having is that I’m trying to make something fairly modular, so I have a climbable surface that I can attach to any object with little other work needed.  Figuring out the logic to get that to happen without unexpected effects such as launching characters into space, or moving them to the top of another ladder connected to the same building is proving a bit tricky.  As I’ve said before, movement between multiple levels is key to getting the feel of this game right, so it’s vital that it works before I start focusing on the other areas.

I completed the scripting tutorial on Digital Tutors, and while the majority of it was irrelevant as I thought, the bits it did teach me were really useful.  For some reason I never considered attaching another GameObject via the Unity interface as an option, which will do a lot to clean up my code.  It also taught me a much nicer way to pass data to and from different GameObjects, which is going to greatly simply things later on.  I think for now I’m done with tutorials, as I need to focus more on learning the Unity API and just getting things working.  I will continue to read through the Art of Game Design though, when it arrives.

Another point that’s worth mentioning is that Unity 5 was just released, and a couple of other big engines will now be free to use too.  For now there’s no reason for me to upgrade to Unity 5, as while it does have some nice new features I won’t be using any of them for some time, and I’d have a lot of cleaning up to handle how things have changed.  Moving to another engine entirely doesn’t seem like a wise move either, as it would just mean repeating the past 2 months again with a different engine, and that could happen again and again as the flavour of the month changes over time.  I’m going to stick with Unity 4.6 for the time being.  Later on, when things are a little more stable, I might look into it.

Leave a comment

Posted by on March 8, 2015 in Making a Game


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: