Getting back into Unity

Around a year ago, I was working on a 2D sidescrolling platformer, called “Cuboidz”. You may remember me talking about it, or if not, that’s ok. It really doesn’t matter because it’s changing a lot!

It will no longer be 2D – it will be a mix between 2D/3D, and although it will have many of the same elements, it will feature some pretty unique things that I will share at a later date…

I plan on making a full version for Mac, Windows and Linux, but there will be an online demo on my website featuring the entire first set of levels, so that people can see if they even want to download it. I hope to sell it actually, but we’ll see!

Don’t worry, I am alive.

It has been a long, long time since I last updated this blog.  In fact, it has been exactly 5 months since I posted anything at all.  I’m great at updating things, aren’t I?

Anyway, as I’m sure you are aware, back in the beginning of the year I was working on a game with the Unity engine.  This was all well and good, but I was quickly growing tired of the concept I had come up with, which was a marble you controlled in space.  Awesome idea, indeed!  But while developing it, I realized I had very little knowledge of how Unity’s system worked.  While I could make my ideas work, they were sloppily cobbled together in the code, much in the same way one might fix a leaky faucet with some wood glue and scotch tape.  In other words, they just barely worked.  My motivation was quickly running out.

So, I put the project on hold.

Then I took it off hold again…

Then I silently put it on hold again on January 25th, 2014, and that was that.  I killed it, like one might squash a mosquito flying around one’s face, annoying the ever-living [bleep]* out of them  And I was happy that I had put it on hold, because then I could focus on what I truly wanted to do, which was learn a lot more about video production, in the hopes that I might become a filmmaker.

So, I pretty much gave up programming, at least for those few months.  I’ve decided I definitely don’t want to develop games for my career – programming, while fun, is something I’m not necessarily the best at, and it takes a lot of brain power.  Sometimes, more brain power than I can really muster!

But does that mean I’m going to stop tinkering with code, and computers in general?  Of course not!  I spent the better part of a decade learning as much as I could about computers, programming, web development, and much more, so it would be pretty silly to give it all up.  It will definitely remain a hobby of mine, although since filmmaking takes a lot of focus, it’s definitely possible there will be huge breaks in-between programming projects.  Especially if that project happens to be a game!

Although I love programming, and game-making, filmmaking has definitely been my #1 interest since… well, pretty much since the first time I saw movies like Back to the Future.  There’s just something about the entire process that captures me, and makes me want to contribute in some way.  Whether or not I’ll get famous remains to be seen!

With all of that said, I have recently been studying Python in my free time.  It’s a language that I really never fully explored, and I’m glad I’m studying it because it is a ridiculously awesome language!  I plan to use it in conjunction with Panda3D to make a small game.  I would use Unity, but I would really like to use a barebones engine so that I am forced to code my own level editor of sorts, since I personally think that’s a lot more fun.

But first, like I said, my main focus is to get started with some videos, to see if I can launch a filmmaking career.  One can dream, can’t they?

*I’m quite certain you know what word I was going to put there.

One Week Later…

About a week ago, I said that I wasn’t going to continue work on my Unity project anymore, due to the idea being tired and worn out, and my creative juices just weren’t flowing very much.  Of course after saying that, I have discovered that ideas are suddenly flowing into my head that would definitely make it stand out, and better yet, be fun to develop!

Just for a quick test, I decided to open Unity back up and play around with one of my ideas.  Not only did I have my idea working within five minutes, I realized that part of my problem with the last project was caused by a simple error of my doing – so I killed that thing, too, and now I think I can start work on it again!
The code name of the project will be “Gravity Ball”, and the main object of the game won’t be to collect Gems to open up a warp gate, but rather to solve puzzles in a certain amount of time, and as the name suggests, gravity will be a huge key element to the game.
Now, it will be a while before I post any sort of demo – it will be a while before I can even get everything set up properly! – but I will begin work on the project this coming week, and be sure to post some sort of screenshot by next Saturday.  Right now I’m working on the game design documents so I can keep track of everything in a clear way and have some sort of outline for the project.
Planned platforms for release are…
  •     Windows
  •     Mac OS X
  •     Linux!
  •     OUYA (eventually!)
So there you have it.  I can’t wait to get started.  It will be so much fun!

Canceling Roll-A-Ball

I’m sorry to say I will no longer be developing “Roll-A-Ball”, for 3 major reasons…

  1. I’m still learning a lot about Unity, and Unity’s physics engine, so starting a physics-based game probably wasn’t the best idea
  2. There’s some weird issues that may be bugs with Unity (or just resulting from my lack of knowledge) that I can’t quite figure out and it’s too frustrating to try
  3. The game concept has been done too many times, and I can’t come up with many major ideas to throw in to make it different enough from the others

So, I will begin watching a lot more tutorials on Unity, and trying to learn as much as I can about it before I really start a project of my own.  Right now, I’m continuing the lessons on GameInstitute.com, as well as using tutorials from Unity Cookie and whatever else I can find.

I’m also going to study JavaScript a bit more because it seems a good 95-97% of all Unity tutorials are taught in that language, rather than C# – it’s only the pay-for tutorials (or Unity’s own tutorials) that seem to focus on C#.  A bit odd, isn’t it?

Anyway, Roll-A-Ball was fun, but definitely not a great game to start out with when one is still learning Unity…

New Beginnings?

I have encountered some serious, serious issues with my current game, and how things are handled inside of it.

First, I’ve had some issues with the physics engine, and have done some research which shows the way I’m controlling the player isn’t exactly the best.  While this would be a small change to make, changing it would mean basically re-writing almost 200 lines of code, because of the way I’m storing the player’s information and stats.  I’m just using regular old public(!)* variables that I can set in the Inspector, but what I should do is separate that information from the control input script entirely, and store all of player info (score, lives, hp, mp, whatever else I may need) in what’s called a GameState Manager.

A GameState Manager is a very handy script, written in a Singleton pattern (meaning there’s only ever ONE instance of the object) in which I can do things like set the current game session’s information through a loaded save file,  save the current game state to a save file, set the current level, update the player’s lives, health, and whatever else I may need.  They’re pretty awesome things, and should be talked about more, because I’ve only learned of them through a couple of references people have posted on the TGC forums, and a reference in a lesson on GameInstitute.com.

They’re a way to centrally control specific parts of the game, and accessing parts of it through other scripts would be as easy as this:

if(enemyStrikesPlayer)
{    
    // Update Player's health
    GameManager.Instance.SetHP(-enemy.hitForce);
}

 

The GameManager is the GameObject created by the script at run time, Instance is the instance of that object, and SetHP() is a public function that one could use to then update the player’s health.  And that could be accessed through any script, on any object, just like that.  Cool, eh?

Sadly, I can’t really re-start my project just yet.  This week, I’m going to New Orleans, Louisiana with some friends from Wednesday until early Saturday morning – meaning that I’ll have to wait a few days to start, since I don’t have a laptop to program on.  I wouldn’t want to anyway, except maybe in the car.  This also then affects my deadline for NaGaCreMo, but that’s ok – the project is still alive, and as long as I can complete something for it by the end of January, then all will be well!

*This, as we all know, is very very bad practice, although in some cases this is the only way to do things in Unity (when you want to set variables from the Inspector, for example).

updatedBanner

Continuing work on my game

Work is pretty steady on my Unity game.  I’m really not sure what I’m going to call it anymore.  For now, it’s still being called Project “Roll-A-Ball”, but it will be renamed later on.

I’ve done a lot over the past couple of days:

  • Changed the gems to actual 3D models of a Gem, although they need an actual texture to see the effect
  • Changed the tutorial message zones to what will eventually be signposts – when the player approaches the signpost, a message saying “Press “Enter” to read me!” will appear.  When the player does that, that message goes away and is replaced by the sign’s contents, which will use Unity’s dialog boxes, once I figure them out.
  • Added skyboxes.  Helps IMMENSELY!
  • Added scoring system and second stage to game
  • Added “Warp Gate” which unlocks after gathering all of the gems, and is how the player travels to new stages

Although there isn’t a new demo today, I will have one either tomorrow night or Sunday.  In the meantime, here’s a screenshot!

Screen Shot 2014-01-10 at 11.27.55 AM

What it looks like editing the game in Unity

Here’s a quick little video of what it looks like editing the game in Unity.

I have managed to implement a LOT since that video was shot last night.  I’ve worked out some more camera stuff, added different directions the camera can face, updated the scripts for the player and camera (though the player script still needs a LOT of improvement!), and basically I’ve done a lot except actually build a more playable game.  But work *is* going on!

Things I want to add:

  • Checkpoints
  • Traps and enemies
  • When the player collects all of the gems, a “Warp Gate” will appear, which is what will make the player physically go to the next level

I only work for four hours tomorrow, so we’ll see how much I actually get done!