My First Unity Game

I’ve finally made a game in Unity. A very basic game. As basic a game as I could make. It is a game in the sense that you can win or you can lose. However, it is NOT a game in the sense that you have any control over how you win or lose.

You’re a baby ape. It is 10 million years ago. You’ve been born into a strange primitive world and you depend on your parents for survival. There are dangers all around that threaten your family. Will you survive?

It’s a text game. A lot of text games have a “Choose Your Own Adventure” feel, and through a tutorial I learned how to make those. They are fun and I look forward to making some very cool ones with some basic graphics and a synthy soundtrack. But for this game I wanted to see how a text game would fit in with the survival genre. This is both genres combined and stripped down to the barest bones. Each time you press enter, a day passes. Every day you find out whether or not you or your family have enough to eat and are safe. This is based on chance.

—— This part is for the geekier inclined —-

The way I’ve coded the game (and yes, this is my first ever game with code, so I’m more than a little proud) is so that when you press enter a random number between 0 and 1 is picked. The closer that number is to 1, the safer you and your family is. The closer that number is to 0, the more danger. To achieve this, I used an if statement, and an enumerator with values that represents each of the states.

The enumerator values kept growing. At first, I planned on ten values for my one enum variable to switch between. Once the variable switches to an enum value, a method would be called that changes the UI text to represent that current state the family is in and deduct or increase their health when appropriate. I ended up with 13 values since I needed: a safe and well-fed value, a safe and unfed value, an unsafe and fed value, an unsafe and unfed value. Then if the father dies protecting the family I needed four similar values that represent mother and child… and then if the mother dies (as she is likely to for being more vulnerable) two more values representing the dependent infant attempt to survive by itself… Then, when your character dies, there’s a death value that tells you that the game is over… if you character survives the 100 days, there’s a win value that lets you know that you’ve won… and finally there’s a start value which sets all the stats and introduces you to the game. Thirteen values connected to thirteen methods that wait for you to press enter to trigger a random float that decides the value your enum variable will switch to therefore progressing the game. I made this game in about a week, but of course it took me more than a month to understand this stuff, so in a sense, this was about 4-6 weeks in the making even if I didn’t really know what I was learning for.

—— End Geeky Section ——

For me, finishing this game comes with relief. If I can make this, I can make something more complex next time. It is less a game than an essential foothold a tiny way up the mountain of Unity competency. I’ve staked this territory as my own, and built a primitive home, ready for the next ascent. I’m also relieved to have found a way to put my games online. I have the Unity Cloud to thank for that. All you need to do is upload your files to an FTP server or a GitHub repository (I chose the latter) and link the Unity Cloud so they can: access the files, build the game as a WebGL and create a webpage with its own link for others to play. The most impressive additional feature I’ve found is that the Unity Cloud will periodically check the repository for updates and build a new version of the game based on any uploaded changes. This is autonomous. So, once you set up the game on the Unity Cloud (and maybe check up on it once in a while) all you have to do is push new changes to your GitHub repository and the cloud will do the rest. This is all free. It’s astonishing what technology is free these days. Sure, if you make over 100k making games using Unity they start to charge you, but if I ever get to that point I will be happy to give back.

I have found that the link to this game can break. Or more that the game becomes unplayable through the link provided after a given duration. I will sporadically check up on it and replace the link when necessary.

Please lower your expectations, and I hope you at least find this (proto) game a curiosity since the grim subject matter definitely falls short of being fun. You will need a desktop to play it (no smart phones for this one).

Here’s the link: https://developer.cloud.unity3d.com/share/ZkFi5kNNYf/

Oh, one last thing. You need to click on the game window once it’s loaded to activate it. Otherwise it won’t respond when you press enter. It’s a little annoying but not sure yet how to change that.

More later…

Unity 3D from a complete beginner’s perspective.

Unity 3D for someone who’s never coded, someone who knows nothing about making games, is like looking at an incredible mountain rising from the other side of a great plain. It’s beautiful, seductive, daunting. If you, in your utter naivety, feel that you can conquer that peak with little to no training, and insolently attempt to do so, you could find yourself stranded a fraction of the way up, on some desolate enclave, gradually going mad trying to solve the ethereal riddle of how to make your game camera turn when your little cube turns. And yes, that primitive cube is the sum of your best efforts to make a representation of your game character.

A hallmark of the information age, Unity 3D is a game engine that anyone can download for free to make very complicated games. You can make almost anything… if you know how to. And if you don’t, well, good luck to you! There’s the catch. You can make whatever game you want, as long as you have a solid decade to spare.

The sheer amount of time it takes to do things in the engine isn’t all that obvious from the outset. Any “make your first game” tutorial on YouTube will include the obligatory plea to make your game as simple as possible, as any added complexity becomes exponentially more difficult to achieve. But in your head, you can’t see how it’d be so hard. On the Unity 3D website there’s a whole bunch of excellent tutorials that take you through the basics, starting off with making a simple game where you get points when you roll a sphere to collect game objects (pictured above). The UI (user interface) of the game engine is also intuitive and easy to use, instilling a newbie game designer with confidence that maybe this won’t be so hard after all.

So, you start coding to make things work. And then you remember you don’t know how to code, and therefore, you don’t know how to make things work. And so, you start learning C# – Unity’s preferred computer language – and very slowly you learn how to make very simple games.

After more than a month at Unity, this is where I’ve got. After a whole bunch of tutorials, including paid tutorials on Udemy (which I may cover in more depth in a later post), I can make very basic text game adventures. Remember those “Choose Your Own Adventure” books as a kid? I can make mini game versions of those. I still don’t quite know what to do with the games once I finish making one. Maybe I should learn how to make a website that can play html5 games and I can export them to that? I’ll have to figure that stuff out and post about it sometime in the future. In fact, the nearest future. I can finally be a little creative, so I want to finish a very spartan text survival game by the end of next month latest.

Admittedly it shouldn’t have taken me so long to do so little, but I’ve been learning a few other programs, preparing myself to create game assets (2D and 3D graphics, models, etc.) for when my games become a little more complex. Soon enough I might even be able to make a game character that looks something more interesting than a basic cube!

More later.

 

How Europa Universalis IV Unwittingly Turned Me into a Game Designer

It’s been a little under a month since my last blog post.

That’s a bad sign, I suppose. Maybe I should worry. Maybe I’m just embarrassed. Of course, the longer I leave it, the more embarrassed I become. Slipping my third (only?) blog post in under a month from the last is just soon enough to not feel too bad. That being writ, I would like this to be a weekly thing and maybe when the discipline of writing these becomes also a weekly thing, it will happen.

I’m going to avoid talking about my elusive progress, even though such an update is overdue. I’m still learning, so there’s not much to say – only mundane descriptions and little to no wisdom. Instead, I want to talk about Europa Universalis IV – a game that is a mouthful of title and a headache of gameplay. But it is also a magnificent, belligerent beast, and has a strange allure that not only makes playing addictive, it makes the entire process of customisation equally alluring.

So what is it? Well, in short, it’s a filthy colonisation game. Set between the late middle ages and the dawn of the enlightenment, the player controls a European nation that can exploit and colonise the technologically impoverished continents of Africa, South-East Asia and the whole of America, to become a world power. And while you can easily feel dirty playing it as you succumb to the strange ethical hypocrisies of Rennaisance-era world politics, the very aspect of discovering and acting upon untapped resources to lift a modest nation up to become the most powerful on Earth just captures something powerful in the imagination.

If you’re beginning to think that this is a complicated game, you’re right. It is an extremely complicated game and entirely overwhelming to the uninitiated. It’s sort of like playing a Total War game but with the complexity of ten Civilisation games. And if you haven’t heard of either of those, then I suggest you try one out before even considering giving Europa Universalis IV (or EUIV) a spin.

I have a small confession. I don’t really play games properly. Never have. In fact, I love cheating and breaking games wherever possible. For this reason, I love sandbox-style games because they have no rules, and it gives me the ability to experiment. EUIV is such a sandbox game, as there are no obvious objectives that you should follow when controlling your nation, and as soon as I started playing, I immediately learned a bunch of console codes so I could warp the outcome of history for my own amusement.

Instead of choosing a world power, like England, or Spain, or Russia, I first chose Ethiopia. A few million years ago, man evolved in Ethiopia. I think that makes it something special. You could say that I have a special fondness for Ethiopia. Why shouldn’t Ethiopia beat those smug Europeans at their own game? And surely, if you’re going to colonise Africa for your own nation’s gain, shouldn’t your nation also be an African one? It’s sort of less racist, right? I mean, it’s still completely inexcusable, utterly morally corrupt, and all that, but, you know… So, with the help of a bunch of console codes (i.e. cheats), Ethiopia did very well indeed.

But, I still wasn’t happy. As I’m playing, I look over to South America and see all the nasty things the Spanish are doing there, and I decide that maybe I should play a South American nation and take over the continent before the Spanish do. But this is a lot more difficult. During the 1400’s, Ethiopia was a powerful nation and it wasn’t too hard to cheat my way into power. But the South American nations were far more primitive and powerless and so I needed to cheat in a much more elaborate way for them to win. This is what I did….

I subscribed to a mod on Steam (a game modification someone made to tweak the original gameplay) that extends the timeline of the game. I then started the game earlier in time – the year 1000AD… 444 years before the original game start date of 1444AD, giving my tiny South American nation, Mapuche, based in Patagonia, a head-start of more than 400 years. I then googled how to edit the nation’s game files through the mod so that their technological level was the same as Europe’s during that time, gave them the ability to colonise empty land around them, and promptly began a program of rapid Medieval expansion in preparation for the Spanish.

Long story short, the tiny Patagonian nation of Mapuche defeated Captain Cortez and his Spanish cronies.

After this wonderful victory, I realised that I had ended up making my own game (sort of) using the sandbox provided by EU4. And now that I had done that, I wanted to make an entirely different game.

Me, an ex-promotions producer after a two-year stint at screenwriting, wanted to make a frightfully complex and very very strange game of which he has no idea to make.

What is this dream game? You’re going to laugh…

I want to make a game where you’re an ape 10 million years ago, and then you evolve your way into either a gorilla, a chimpanzee, or early man (or more, Homo-Erectus). So, set around the 10mya – 2mya timeline. It’s sort of a survival/sim game.

If in 10 years I somehow make a text-only version of this game, I will consider it a massive achievement. In all likelihood, I’ll make a very basic version of it exploring a handful of game mechanics, before maybe pivoting to something that people might actually want to play. We’ll see.

Anyway, there you have it.

More later.

Blog Post 2: Goodbye Stencyl

Good gosh, I’m learning fast! I feel like a toddler exposed to the elements of a strange world and with it a bizarre, garbled language people call code, or more specifically, C# (apparently pronounced “C-Sharp” not “C-Hash” and definitely not “C-Hashtag”.)

But before I started t learn Unity and the very very basics of 3D game development, I cut my teeth on Stencyl. And that is what this post is about…

And addiction… Don’t think I’ll leave you hanging indefinitely on my promise from last post.

For most of my life I’ve been a movie addict.

During high-school I’d watch up to ten films a week. New films, old films, English language films, foreign language films. Up to this point I’ve seen at least 50 silent films, (and a lot of them are pretty damn good). I’d love to go on, but this blog isn’t a podium for my movie rants.

Up until three weeks ago, my dream was to become a filmmaker. And up until three weeks ago, this dream was unshakable. Now, it’s gone.

Haha, not really… I was just being dramatic. But it has been irrevocably altered. It’s not that it’s gone completely, but more that it has been infected… by videogames. I don’t feel that there’s anything missing, there’s just a shift in focus.

This shift happened when I decided, just to satisfy an old curiosity, to make a little shitty game. In order to do this, I googled game design tools, looking for the most simple, accessible starting point. Among those recommend was the game creation software Stencyl.

48 hours later, I had made a game. It was a bad game. A terrible… terrible game. But it was my game.

I haven’t been the same since.  It’s as if a door has opened in my brain and it’s letting in all my repressed creative urges.

Stencyl is great because you don’t need to know code to learn how to use it, and through using it, you get exposed to the core fundamentals of 2D game design. It’s also got an easy-to-understand Stencypedia and covers everything you can do, so whenever you get to a stumbling block, there’s a page of information somewhere that can help you out.

But it’s super limited. It seems to be only good for 2D; if your imported assets are too large the program will seize up, forcing you to quit; and whenever it has crashed on me, it has corrupted my project file in the process, forcing me to start the project from scratch.

Last week I was working on my third Stencyl game, and even made a little demo of it, but as I was exploring ways to develop it, my enthusiasm for the game soured in favour of a completely different game idea, so I have abandoned the project. It was going to be an Endless Slider game. Sort of like an endless runner game (like Temple Run) but you’re sliding downhill the whole time. It was going to be fast and silly fun (two qualities my previous two games severely lacked) but I quickly discovered that if I’m not personally passionate about the game I’m making (and I’m not the no. 1 fan of the endless runner game genre) my attention will wander.

For now I’m working on a compeltely different game that will hopefully be a lot more fun than my previous efforts while still maintaining the dark and absurd themes of my previous two games. It will be an upgrade, and, with a bit of luck, I may not be working on it alone. It’s early days, so for this post I’m going to be cagey, but in a few weeks I may have more information.

To make this new and (for now) super secret game, I’m graduating from Stencyl, even though I’m barely competent at it yet. I’m haphazardly moving on to bigger fish: Unity.

But more on that next post. For now, here’s a guy who I’ve named “Super Cool Mikey” sliding down a hill.

Welcome

Hello, and welcome to my blog.

My name is Oliver Walter Kennedy and I am a game addict.

I’m not among the worst of the game addicts. I don’t play games twelve hours a day. It hasn’t destroyed my life. I’m what they call a high functioning addict. Honestly, I think there’s a lot of us. Probably as many as there are alcoholics, or caffeine junkies… okay maybe more of us than alcoholics, and less of us than caffeine junkies… If there’s a game on your iPhone that you can’t stop playing during those many little daily interludes, you’re a bit like me.

I’m 30 years old. I’ve spent two years writing two feature film screenplays, a TV show pilot, a 25 page short treatment that could be either a novella or another screenplay, and four short film scripts. And for now, I’m out. Done.

Which is weird, because before that point, spending two years writing was the dream. But the lifestyle of the writer is strange. I became reclusive. Depressed. Resentful. I just don’t see how I’m going to sell any of what I’ve created. When you look back at two years’ work and know the world doesn’t particularly care about it, it is disparaging. And I need money.

And throughout this time I’ve constantly questioned my work ethic. Although I worked on my passion virtually every day since I started, I’ve probably racked up twice as many hours playing computer and iPhone games. And the desire to play these games seems just a necessary, in-built part of my lifestyle.

I’ve got savings. Enough to last me a year. And two weeks ago, I decided that instead of going back to one of my writings projects, I’d make a game. A dumb, terrible, multiple choice game where the guy asking the questions is a crazy person and if you answer wrong his head explodes. It’s called What Bob Wants. Here’s a link – currently works on computers but not phones.

I figured that if I can be hooked on playing a game, perhaps I can be hooked on making one… shifting the focus of the addiction from consumption to production. And suddenly, for the first time in my life, I became a workaholic. I made the game in under 48 hours. Hell, I learned to make the game, including the easy-to-use game development software and made it in less than two days.

Suddenly I had made a game, and the ideas for others game just start flooding my brain… Not only that, many of my unrealised yet-be-be-written screenplay ideas suddenly had their own game manifestations. I mean, I have enough to make another dozen games. An instant backlog to produce!

So, I thought, what if I keep doing this? I don’t see a clear future in becoming a screenwriter. Not in Australia. But games are different. You can just make one and put it up for sale on the Apple or Android store. Sure, if nobody has heard of you, probably nobody will buy it… and nobody has heard of me.

But that could change, and I want to see if it can be done. I’m giving myself a year to make SOME progress, and I want to blog about it on a weekly basis. I want a record of this. I want to be able to look back at the end of this year and know what I did every week and see what made an impact and what didn’t. And I want to share it with you, elusive audience out there… for maybe someone will see this wondering whether they should do the same thing, and hopefully this will help them decide.

You see, I could have used this blog just as a form of self-promotion, and it makes sense that I do. But some part of me, that hidden inner part; that enabler of psychological self-flagellation, wants to project a brutally honest online version of myself. I want to lay all the cards on the table. This is going to be either a scrappy underdog success story or a cautionary tale or both. I can’t say for sure. Either way, I’m turning this year into a narrative and I welcome any audience that it may interest.

Over the next year I will learn to: compose game soundtracks, teach myself to draw and animate characters, learn to code… like actual code, not the pseudo-code Stencyl has. I’ll be learning how to use Unity. Hell, I’ll be reading business books and other entrepreneurial stuff which would have made me cringe a year ago and still sort of does. I’ll explain my steps and my strategies; celebrate the successes and berate the failures.

Down the line, I’m probably going to want to quit. If it’s a total disaster I might actually quit at any point. But there’s one thing that’ll keep me going.

I’m addicted.

But more on that next post.

Please feel free to check out my first two games… they are crude but not without their nightmarish charms. And if anyone knows of any similar blogs out there, please leave a comment. It would be great to hear about/from anyone going through a similar process.