Creating a game with Blender and Unity #1

22 April 2018 7:58 pm

I have no idea what I'm doing... Well, maybe a bit of a clue, but not a lot. I know how to write software reasonably competently, and quite enjoy the process of making and designing working code but I've always been the kind of person to start with an empty source file and design the whole thing from scratch. I like getting stuck in the inner workings of code, figuring out clever routines to solve problems. Maybe I should have found a job working for a hardware company as their driver coder or something. That sounds like a job I could do.

For the past few months I have played around with the following things, with the intention of "making some games"

  • Pico-8
  • UDK
  • Z80 Assembler
  • C++ and SDL

I also realised that programming based computer games are fun, but once the level of challenge approaches "real programming" I'm more motivated to open an actual source file and make something for real. None of this really produced much beyond crap versions of Space Invaders.

Don't worry, this isn't one of the posts where the writer clearly lacks any self motivation, or dedication to completing tasks. Taking part in the One Game a Month challenge three years ago saw me creating ten games over the year. Instead, this is a post written by someone who values their time and doesn't really want to spend every night of the week trying to solve problems that someone else has already solved, just to create another crap version of Space Invaders. I don't want to write my own AABB collision system, or spend months learning about Euler integration so I can prevent my own physics systems from exploding. What I want to focus on is designing fun games that other people might want to actually play. My One Game a Month games were complete, functional games... but they were a bit half baked, boring and not that fun to play. Kids in the 80s would have felt ripped off if they'd paid 10p for a go.

I got good at programming by doing it a lot, over a long period of time. I need to do the same with game design and not get distracted by the inner workings of the engine. My games need to be more interesting than static screens with colliding rectangles. Or, to put it another way, I need to level up my game design skills. Right now I'm a Fallout character that's had all his stat points piled into two skills that aren't important for his imminent survival.

It took a month to make this game. It was probably the best thing I made that year, but I spent all my time making the sprite animation code and text scaling effects, rather than planning any gamplay. Level 1 was just as hard as level 10, play testing consisted of making sure it didn't crash.

So far I have followed several hours of Blender tutorial videos, and I'm at the point where driving Blender is not a confusing and frustrating experience. The camera controls make sense, I can select objects without the 3D cursor getting in the way and thinking in 3D is not too difficult for me. I have also followed several hours of Unity tutorial videos and created a little basic shooting game, and written down a ton of notes about what I was doing. The way I'm approaching this is as if I were following a Game Design course somewhere, and taking notes to help remind myself what I did.

It's my opinion that the process of creating a game can be broken down into steps that have been done before many times by other people. All I need to do is learn the processes and recognise when to apply them. In a way, figure out my own programming patterns and game design patterns. Turn "I want to have a laser that burns other players" into "I need to do a raycast to find objects" "the burning effect is a coroutine that sets off a particle system". This kind of higher level thinking gives more immediate results; I'm not sat for hours trying to learn how to create a raycast algorithm, I just fire off the one built into Unity. I am also reasonably certain these concepts transfer over into other game engines.

I made this over a few hours by following a Blender tutorial series. I learnt things in this that I would have never figured out by myself. Obvious things, once I'd been shown them.

I could never figure out how to make my own animations play when something died, for example. In Unity I now know I need to create a coroutine to handle it, and an animation controller to manage the animation. The animation being something created in Blender by rigging the model appropriately. All of these things are well documented procedures. My ability to make a giant monster to stomp around my game world is quite low, but learning how to create 3D models feels like more of an interesting evening's challenge than debugging classes of C++ in the bowels of some homebrew game engine. The screenshots are more interesting to share, too!

I followed Unity tutorials for two weeks and produced this little game. The game isn't too exciting, but I did learn a lot of Unity techniques and the context that they should be used in. Mostly I learnt that coroutines are one of the best things ever.

Don't worry, future posts will have more meaty content to them and enough screenshots to make the wall of text easier to digest. Right now I'm just setting the scene.