Intrinsic Algorithm’s Dave Mark, a fixture at the Game Developer Conference’s AI Summit, is also the author of Behavioral Mathematics for Game AI.
Most game AI literature covers the basics in a general way, such as finite state machines, flocking and steering to control movement, pathfinding algorithms such as Djikstra’s or A*, goal-oriented action planning (or GOAP), and more.
Mark’s book, however, covers a specific topic in great depth: game AI decision-making.
You might have a character that can do interesting things such as hunt, flee, eat, track, alert nearby allies, etc, but if you don’t create a good system that allows that character to make decisions between those behaviors, it may not convince your players that it is intelligent at all.
The goal is to create behavioral algorithms to get computer-controlled agents responding to their environment in believable and sensible ways. To get there involves a journey through the subjects of psychology, decision theory, utilitarian philosophy, and probability and statistics, among others.
Mark was great at walking you through each step of this journey, combining theory with detailed explanations and examples, including code. Sometimes I felt the detailed explanations were a bit too detailed, but at no point did I feel like I was lost.
He never made a leap in logic that left me behind because he was holding my hand at every step of the way. Sometimes I appreciated that hand-holding, especially for the more involved statistics, but there were a couple of times when I found myself getting a bit impatient and wanting to run ahead.
And it is probably partly due to the fact that it’s a long journey. At one point, I realized I was over 300 pages into the book without feeling like I knew how to integrate and apply all of the individual tools I was learning into a cohesive system.
The examples he used to illustrate his point were sometimes bizarrely relatable. I have never tried to create a model of my behavior related to when I decide to replace my older razor blades with newer ones, but Mark did, and I actually found myself nodding with recognition that I do tend to use my last blade in the refill pack for way longer than my other blades.
Other examples demonstrate how his utility-based decision-making system can address problems with past games, such as the strategy game AI that kept sending its attack force towards the most vulnerable target. Savvy players can keep defensive forces outside of city walls, then place them in the city at the last moment and moving units out of a city far away. By doing so, they could keep the AI units moving back and forth, unable to carry out an attack, for as long as they want.
Solving this issue involves giving the AI the ability to have decision momentum by making decisions include all of the relevant information. The AI isn’t just deciding what city to attack. A single decision is what city to move to AND attack, which incorporates the time it takes to travel to a target city. Suddenly, the decision to change course in order to attack a different city is a bit more painful, and so the current target is more likely to be maintained.
I appreciated that he covered the problem of having the AI always making the best decision. While academic researchers might love that result, players are likely to find such AI as unrealistic and, worse, uninteresting. And if there are multiple AI agents that do exactly the same thing simultaneously, it’s even more of a problem. So there’s an entire chapter on ways to ensure that the game AI can be reasonable yet still interesting from one play session to the next.
The book was published in 2009, and so you would think it means that any information you could glean out of it would be obsolete after almost 10 years of advances and progress in the field. And yet, the basic decision-making system that drives behaviors is still relevant.
One of the benefits of reading an older book is seeing the ideas of that book illustrated in front of you in other media.
I’ve seen these videos before, but having now read the book, I found that upon rewatching them that I understand the sections on response curves and how they apply to the actions the IAUS chooses.
Behavioral Mathematics for Game AI is not a beginner’s book at all, but if you are interested in learning how to give your AI powerful reasoning abilities that produce rich, believable behaviors for your players and want it to be easy to understand and design with, I’m not aware of another book on the subject that is as accessible as this one.
Wow, it’s almost February? I’m incredibly overdue for the blog post in which I give a post mortem of the previous year and talk about my plans for the coming year.
Which isn’t to say that I’ve been doing nothing this past month. I just haven’t prioritized telling you about it over actually doing it. B-)
WHAT WENT WELL IN 2016
As I said in 2015, I improved my ability to remember my goals. I no longer did the equivalent of setting New Year’s resolutions that I forgot within weeks. Throughout the year, I knew how well or poorly I was doing according to metrics I tracked.
Unfortunately, it meant that I was very aware of how poorly I was doing most of the time.
Last year I set out to build on my success with remembering goals by focusing on what’s needed to actually accomplish those goals.
One big and important improvement I had was in the area of project planning.
In the past, even if tried to be formal about my project management, my actual planning efforts never amounted to more than creating a list of tasks.
Now, some developers find that they can do just fine with nothing more formal than a TODO list or two, and it worked fine for me if I just wanted to know WHAT to work on and maybe even in what order.
But when you’re a lone wolf indie game developer, you need to wear a lot of hats. I had no problem with donning the Software Developer Hat, but my Producer Hat was neglected and gathering dust.
So I might spend weeks working on a particular feature or task without realizing it because I never stopped to think about how the entire project’s progress was being impacted.
At the beginning of the year, I spent quite a bit of time in project planning mode. I even wrote about how I approached it in How to Create a Game Development Project Plan. Then I dove into executing the plan.
And I was very pleased at how well following the actual plan worked for me. Even when my project started running late and surprises appeared that I hadn’t planned for, having a more active Producer Hat meant that at any given time I was focused on actually shipping my game.
Which leads me to the next thing that went well: I shipped!
I still need to write the post mortem for it, but it is my first finished commercial project in years. While there are still features and content I wished I could have added, I’m proud of what I put together.
The release of my first commercial game in years also gave me my first sales in years. After earning $0 in 2015, I like this new trend of actually earning money from my business.
Speaking of money, 2016 was also the first time I put together a detailed budget for my business.
I used to track my expenses and income as they happened, and my aim was to ensure I had enough money in my bank accounts to cover everything.
But I got tired of learning that my bank account balance was lower than expected, only to discover that an automatic renewal on domain names or web hosting had occurred. I felt like I should be able to anticipate such regular expenses instead of being surprised by them.
So, I put together a projected budget, which allowed me to see not only how much I anticipated spending in the coming year, but also when my expenses were expected to spike. For example, I knew that my annual web hosting renewal was coming up in August.
And then I tracked my actual expenditures against the budget. It was eye-opening, and not just because I was able to quickly learn that my web host increased its rates without telling me before autorenewing. B-(
As a side effect of being hyper-aware of where my money was coming and going (er, mostly going), I also added to my budget a plan for a monthly investment into my business. I managed to add a significant amount of money into my business bank accounts by the end of the year.
Also, I updated my website, which is something I’ve been meaning to do for quite some time. My blog used to be completely separate from the main site, and now it’s integrated.
WHAT COULD HAVE BEEN BETTER IN 2016
Aside from my newly detailed budget and more robust project plan, I didn’t have plans for much else.
I wish I had spent some significant time on creating a promotion plan for Toytles: Leaf Raking. I had done some keyword research and put together a list of reviewer contacts, but most of my effort was spent on actually finishing the game.
Once it was nearly ready, I struggled to make forward progress on getting it in front of people. I realized quite late that the reason I was struggling was because I had no real plan to make it happen.
I didn’t even blog much about it, so I rarely mentioned it during development. I was a bit too accidentally secretive.
For a long time, I had a TODO item on my list to create a skill development plan for myself. I wanted to direct my learning more rather than pick up things haphazardly, but all of 2016 passed without such a plan in place.
I read 54 books, but only 8 were business related, of which I believe only one was game development related.
My project ran late. I didn’t plan for balancing the design, and so quite a bit of work to make the game feel complete wasn’t in the original plan.
Had I published it in three months, I would have had the rest of the year to figure out how to promote it. I wanted to try earning $1,000 by December 31st, but between the late release and my lack of promotion, I fell way short of that mark.
WHAT I WANT 2017 TO LOOK LIKE
2015 was about keeping my goals in front of me and establishing habits.
2016 was about being outcome focused. I logged more game development hours in 2016 than in 2015, but the more important thing was that those hours were aimed at targets.
In 2017, I want to focus on promotion and sales.
Which means I’ll be putting together concrete, specific, actionable plans instead of hoping and praying, or haphazardly trying to tweet about what I’ve made, which is basically the same thing.
I’ve already started the year with efforts to port Toytles: Leaf Raking to other platforms. More platforms means more opportunities for people to find my game. First up is GNU/Linux, mainly because it is my development platform and is easiest for me.
But what about making other games? Project planning is one thing, but product planning is another thing entirely. I have various ideas for new games, but I don’t want to be random about picking something just because it appeals to me. It will be easier to promote new projects if I do my market research and ensure my projects already appeal to players.
My blog has historically been about running an indie game development business, and so my audience has been other game developers primarily. My customers, however, aren’t going to be other game developers and aren’t necessarily going to care about what happens behind-the-scenes.
The thing is, I like writing what I’ve been writing on my blog and don’t want to stop. Can I address players more directly, or do I need to separate my business from my blog to do so?
I am confident when it comes to creating games, but thinking about selling them is both exciting and terrifying to me, the way new things often are.
2017 is when I challenge myself to be incredibly proactive about putting myself and my work out there.
There’s been a meme going around in which indie game developers have posted photos of themselves today juxtaposed with photos of themselves from 10 years ago.
It took me forever to find a 2006 picture of myself.
Let’s go back in time.
10 years ago, states were passing laws to ban the sale of video games to minors. It was after Bush was elected and everyone was falling all over themselves to prove they had “family values”, so a lot of governors were posing with moms and demonizing the great scourge of video games. In the end, each state had its law struck down as unconstitutional (which is to be expected when you base your law on versions from the other states that had been declared unconstitutional already), and it cost the states a lot of money.
Roger Ebert was claiming that games could never be art. Again. And some high profile people in the game industry were arguing the same. I gave my thoughts back then in What Are Games Good For?.
Games were projected to double in revenue by 2011 driven by online and mobile gaming. Keep in mind that the iPhone wasn’t introduced until the next year, and so everyone was thinking mobile meant Java and Brew or Palm Pilots.
Digital Rights Management was in the news, whether it was about computer hardware, games, or things like the Broadcast Flag. I made my opinion known about how annoyed I was that people were so cavalier about it.
Steve Pavlina’s Dexterity.com shut down that year as he completed his transition from the game industry to the personal development industry. His game developer forums eventually became the IndieGamer forums, and his old game development articles turned up either on his site or elsewhere.
The World Cup was in Europe, and the United States had one of their most epic matches against Italy, with both sides losing players before the final whistle. The US was defeated by Ghana to be eliminated in the group stages. Super disappointing. It took two more tries before they would beat them.
Back then, I was living with a girlfriend in an apartment in Chicago. I was working as a paid intern at the Chicago Mercantile Exchange in the UNIX group, and shortly after I formed my company, I got a software development job at WMS. It was across the street from Midway Games, and I worked on slot machines.
My cats, Diego and Gizmo, entered my life that summer. Before them, I never even had so much as a goldfish as a pet, unless you count the rooster my father brought home one time which I later realized was the dinner my mother prepared the next day.
During crunch time, I would get home feeling dead, and the next thing I knew I would have both cats curled up on me as I lay on the couch. I hated crunch time, but I loved those moments with my cats.
As someone interested in becoming a better indie game developer, I joined the Thousander Club. Back then, everyone was recently introduced to the idea that it takes 10,000 hours of practice to become an expert at something. Seriously, everyone who was blogging was blogging about it. If you work on your craft for a few hours a day, over the course of a year you would do about 1,000 hours, well on your way to becoming an expert in 10 years.
The Thousander Club was a way of tracking my hours and publicly holding myself accountable. Aside from the person who originally started it, I don’t remember too many people joining this club, but I would keep it up for a few years, although I never spent that much time in a given year on it. By the end of 2006, I had only 262.25 hours, only a little more than 25% of the goal.
I was working on a game I codenamed Oracle’s Eye, and I can’t remember what the game was about at this point. I remember a ball that could be bounced around the level by the player.
It was a stick figure in 2005. I actually like the look of the tiles. Eventually I created a business man sprite.
Since I was writing the game from scratch using libSDL, I encountered and had to solve issues most kids these days get for free with their Unity3Ds and their GameMakers. I had to solve my own hit detection issues, such as the ball or the player entering and getting stuck in walls. I spent time learning the wrong and better ways to write code to make objects move around. Thanks to those early efforts, today I recognize certain issues before they become issues. That’s experience.
But I was bad at finishing my projects then. I had plans to submit a game to the Independent Games Festival that year, but I eventually started over with Oracle’s Eye Prime, which I also don’t have much of a recollection of. It was one of those “I’ve learned so much! This time I’ll do it better!” kinds of restarts. I never finished it, and I never ended up getting a game submitted to the festival. I was super frustrated with myself about that failure.
I switched to creating a Pong clone (I should write another one just to see how much faster I could do it today), and later a Space Invaders clone.
I created this desktop image to inspire me to finish my project.
Note the orange “ship” which was originally blue.
I was just starting to learn about Agile software development and wondering how to apply it to my own efforts to make me more effective.
I joined the Association of Software Professionals the year prior and wanted to become more involved so I could get more out of my membership. A lot of indies joined back then, and many of them let their memberships lapse, which was too bad. I attended the Grand Rapids Schmooze and met a bunch of great people I’m still friends with. Eventually I became a board member and then president of the organization, something I didn’t really anticipate back then.
The next year’s resolutions included the goal of selling my first game, but I woefully underestimated how much I still had to learn about making games, let alone selling them.
And today?
Since then, I had saved up a chunk of money, quit my job, moved from Chicago to Des Moines, Iowa, all to go full-time indie and live the dream. I got quite a bit of feedback from people in the industry which I promptly ignored, then ran out of money and got a day job again after about two years. So, GBGames is back to a part-time effort for me.
So four years as an employee at a company making slot machines, two years being a full-time independent game developer, and now another four years as an employee, only now I don’t work on slot machines and the devices are quieter.
I went to GDC in 2011, so I could check that off my list. I met a lot of people I’ve only ever known through the Internet, including a bunch of people from Ludum Dare or the IndieGamer forums.
These days when I learn that someone’s kid is really into Minecraft, I find that half the time they get super impressed when I say, “You know, I met Notch once.” The other half of the time they say, “Who?” That meeting, by the way? We talked about our Ludum Dare projects before he had to go handle some email emergency.
Shortly after GDC, I proposed to my girlfriend on the balcony of a castle in Europe. We got married. I still have two cats. I’m a home-owner now.
My four years working on slot machines taught me a lot about working on big projects, but my experience working on Stop That Hero!, writing and designing everything from scratch, turned me into a pretty good software developer. I leverage the knowledge and expertise I gained from game development at my current day job, which pays me well.
I spent way too long working on this project, but I’m still very proud of what I was able to accomplish with it. It’s currently on the backburner indefinitely.
So, in general, I’m doing great. I’m fairly healthy. I’m getting paid very well to apply my skills and training daily. I’m fortunate to be married to a wonderful and incredible woman. I am living in a comfortable and spacious home. And again, I have cats.
And yet…
But my business isn’t doing well at all.
Part-time efforts means that things run slowly. What I thought would take me a matter of weeks ends up taking many months. And being slow in this industry is death when there are dozens of games being released daily. I learned about the importance of speed at GDC in 2011, so I knew this fact even before the market got flooded.
I once went to a talk by an entrepreneur who said working part-time on a business just isn’t sustainable because by the time you put something out there, others with more resources and time on their hands might have gotten there first. He said there’s a reason why many entrepreneurs end up divorced.
Well, that sucks. My priorities put being a good husband above my business, and I know other people make different choices in this regard, but I love my wife and can’t see ever deciding that my Limited Liability Company is more important than our partnership.
When I was single and younger, I could work a full-time job, then work for hours on my game development without too many worries. I was just undisciplined and unfocused then, so I didn’t take advantage of it as much as I should have.
Today, I’m better disciplined and more able to focus, but now my time is split quite a bit. I’ve learned that I can’t work on my business too much before I start getting rubberbanded back towards other responsibilities or my health starts forcing me to pull back.
The year prior to 2006, I assessed my ability to create at a very low value and identified it as my major weakness. It’s why I joined the Thousander Club, and I wish I put more time into it back then.
In 2006, I did 262.25 hours of game development. That’s about 1.4 hours a day, which isn’t much, but it can work. It didn’t really result in much that year, though.
This past year? I only did 259.5 hours of game development so far, although that number doesn’t include the 40+ hours of writing and 40+ hours of business planning and marketing I’ve put in. Yet, I had a plan, and I managed to publish. 10 years on, and I am still taking too long to work on a game, but at least I finish my games now.
My three month project that took me 10 months to publish. I think it’s a pretty good business strategy game, and I’m REALLY proud of finishing this one.
Yes, it was meant to be finished in three months and took about 10, and even though I spent a lot more time on game design and balance as opposed to infrastructure and technical details, I still felt very frustrated with how slow this project went.
My wife pointed out that had I worked on it full-time, I easily could have done the almost 260 hours within three months.
Fair enough. I felt better. A little. It’s easy to get frustrated when you compare your struggles and efforts with the successes that other people publicize, or with the future possibilities. Saying things like “I’m a failure because I spent a year making a dinky game while this highly polished mobile game is making millions” is a good way to get yourself stressed. I went through that with my previous project.
You need to measure your progress looking back at where you came from. And compared to how I was in 2006, I’m way more capable as a game developer, as a software developer, as a partner in a relationship, as a business owner, and as a leader. I mean, I know terms like “the Dunning-Kruger effect” now.
10 years goes by quickly
But in 10 years, I’ve only published less than a handful of games commercially? Oof. I still haven’t submitted a game to the IGF. It’s not that I haven’t worked on games, but unless I take my Ludum Dare or One Game a Month projects and polish them up for release, they kind of don’t count except as ways I’ve gained experience with making games.
But again, when I think about what I have accomplished since 2006, it adds up to a few commercial attempts and over 20 different published projects that are more or less playable. Each Ludum Dare game jam or experiment adds to my expertise. Each finished project makes the next one that much easier.
So, I’ve grown quite a bit. And I did it my own way. And doing it my own way was part of the appeal of going indie in the first place.
I don’t know too much about what my life will be like in another 10 years. My wife and I will be middle-aged then. My cats are getting old and may not be there with us, which makes me sad when I think about it. I’m getting old, and I worry that I’ll fall behind in terms of my technical expertise with artificial intelligence and automation threatening once-secure jobs. I worry about continuing to miss out on opportunities. I feel out of touch with the game industry as it is. I worry about becoming a sad old man who refuses to acknowledge the futility of what he’s doing.
Frankly, I don’t have an exit plan. I don’t have an idea of a situation or point in time when I say, “Well, that’s it. I’ve hit the limit of what I will accomplish in game development for my lifetime.”
Ever since I went back on “corporate welfare”, I’ve been working slowly and trying to build up my business, with the expectation that it will all come together. I don’t mean getting lucky with a hit game, but that the business will eventually become sustainable as my full-time employment.
I have been aiming to build up streams of income, rather than hope for a big jackpot. But for a few years now I’ve been worried that the premise isn’t workable, that it’s not possible to do what I’m doing and expect great things eventually. I’d hate to think I’m limiting myself to mediocrity.
But I chose my current approach because there are certain things in my life that I value as more important. I’m trying to be the tortoise and shouldn’t get frustrated when the hares around me are sprinting by, often off cliffs.
Many of the game developers and blogs I followed back in 2006 are no longer around. Some retired. Some switched industries. Some gave up.
I’m still here, though.
And I expect to be here for another 10 years. In order to have more to show for it by then, I’m making plans to do more rapid and focused learning and hard work now to get me there. Part of that is rereading some of the advice people gave me in the last 10 years and reconsidering what I’ve ignored or misunderstood then.
I just learned about the book Independent by Design by Stace Harman and John Robertson.
And now I want it.
Independent By Design is a celebration of indie games and independent videogame creation, presented through a deluxe hardback book that chronicles the experiences and vivid design of over twenty of the world’s most revered and renowned indie game developers.
Each chapter tells the story of an indie game development studio, such as Vlambeer or Frictional Games, and the book looks gorgeous.
In fact, there’s two different books. One is the basic, “core” book, which you can get signed by the authors for a little extra cost.
The other is the Transcript Edition, which features “written transcripts of the dozens of hours of interviews we’ve undertaken with independent developers and videogame industry figures.” It’s quite a bit more expensive, but it sounds like a great way to get into the heads of multiple indie game developers without having to do your own set of interviews.
My mom did ask me what I wanted for Christmas recently…
There are a lot of conflicting thoughts in my head about how I want to approach my efforts at creating games. Some of these conflicts are from seemingly contradictory pieces of advice I’ve received over the years, and some are just related to fear, uncertainty, and doubt due to inexperience.
I want to quickly get a minimum viable product out there in the hands of customers, get their feedback, and similarly very quickly make an informed decision to either tweak the existing game or abandon it for a completely different project. If I can do this quickly enough, I have more chances to earn enough money to make these efforts sustainable.
On the other hand, I don’t want to put out junk. I don’t want to release half-finished ideas, non-workable games, or projects that aren’t anywhere near ready. I want the projects to have a chance, and in order to be proud of what I put out, I need to finish my games.
But on the third hand, I don’t want to work on my project forever, constantly tweaking, adding, and removing inconsequential features. You might call it “feature creep,” but I don’t think that name really describes the issue I’m worried about. It’s more like being so afraid of pulling the trigger that you distract yourself into thinking there’s more development work to do to avoid thinking about the hard work of actually releasing the game to the public.
There’s always unimplemented features and more balancing work that could be done in a game, right? As a developer, I KNOW how to do that kind of stuff. It’s easy to stay in the comfort zone of being the technician.
And when you work by yourself, it’s easy to forget to take off your Developer’s hat, put on your Producer’s hat, and think about deadlines and what work is optional versus what work is core to what your game needs. You need to ship.
On the fourth hand, I will become a better game developer if I work on more games more often. There’s that story from Art & Fear by David Bayles and Ted Orland about the ceramics teacher who split his class into two groups. One group was graded on the quality of a single pot on the last day of class, and the other group was graded on the quantity of pots produced by the last day of class.
It turned out that the group that produced the higher quality pots was the group graded on quantity, mainly because the experience of creating each pot also gave them insights into how to make the next pot better. Meanwhile the quality group spent more time merely thinking about how to make a quality piece of pottery, and when it came time to actually put in the work, they were not necessarily up to the task.
So, if I focus on making more games more often, I’ll make better and better games.
Of course, on the fifth hand, I don’t want to make throwaway entertainment that people pay little or no money for and pay little or no attention to. I want my games to have meat on their bones. I want my games to be the kinds of games I’d play.
On the sixth hand, I am not my customers, and I need to make sure I create games with a target audience in mind. I should find out what THEY want to play.
On the seventh hand, I’m creating these games, and the message these games put out reflects what I want to see in the world. I own my art, and they’re not “just games.”
On the eighth hand, I’m not working on games in a vacuum. There are other games being made by other developers, and I should make sure to spend some time playing those games.
I should research other implementations, see what other developers have tried, learn what works and what doesn’t, all without spending the effort myself.
I should listen to podcasts, watch presentations online, and read blogs more regularly.
I can leverage the experience of other people.
On the ninth hand, I’m a part-time indie game developer. There’s only so many hours in a day that I dedicate to being a game developer, and if I spend it playing other people’s games and watching other people talk about how they do their work, I won’t have time to do my own work and put out my own games. I barely participate in online forums anymore, and I finally understand all of those people who complained about the lack of time to participate in forums. Where does anyone in my position find the time?
There’s a difference between doing and learning how to do, and there is always more to learn.
There’s also always more to do, and doing is the hard part.
On the tenth hand, I hate that I’m ill-informed about what’s going on in the world of games and their development. I was blown away to learn that multiple people were making virtual reality games for the most recent Ludum Dare 48-hour game development competition, as it sounds like the kind of thing that still requires a huge upfront investment. Clearly I’m out of the loop.
On the eleventh hand, I’m an indie game developer, which means I define my own rules of engagement.
It’s not a race, despite the realities of opportunity costs and trends, and despite the realities of impending life events that change everything.
Success isn’t defined by money but by accomplishing goals, despite the fact that earning a significant income from this effort would be a great side-effect of those goals being accomplished, one that could help me set and achieve bigger and better goals. Money isn’t a goal, but it can be a measure of progress. But it also doesn’t have to be.
When you’re starting out, you look to people who already know what they are doing to provide some guidance. And they are often more than willing and able to share what they think works.
But in the end, it’s easy to get stressed out about meeting someone else’s expectations if you don’t take care to set your own expectations.
I’ve had people tell me what I should do and what I shouldn’t do. I’ve had people question decisions I made and ask why I didn’t make a better decision on a choice I didn’t know I had.
There is no wrong or right way to go about this process, though.
Some people swear by putting out prototypes daily. Others like to work in secret for months or years at a time.
Some people like to explore one game mechanic fully, and others like to experiment with lots of different concepts.
Some people like to put out fully formed games to be consumed, and others like to release early development builds for people to nibble on.
Some people throw spaghetti at a wall to see what sticks, and other people like to plan out an entire evening with a multiple course gourmet meal.
If I use the same criteria for the spaghetti-thrower’s efforts that EA uses for their heavily-invested and marketed blockbusters, it’s going to look like a lot of failures and flops are being thrown at a wall. That’s not the way to make a blockbuster hit!
But the spaghetti-thrower has different goals entirely. They’re not trying to put out blockbuster hits. They might not even be trying to make something commercially. They’re trying to gauge interest in prototypes, seeing if there is a significant amount of interest in something before putting a lot of time, effort, blood, sweat, and tears into a more substantial work.
Following EA’s playbook is probably not going to help them achieve their goal. They’ll probably stress out way too much to be useful if they somehow get it in their head that EA has the truth about How Games Are Made(tm) and that they are not following it.
While other people might have great advice for their own expectations of how things work, it’s a lot less stressful (although still pretty stressful) if you politely ignore them and create your own expectations. You have enough to worry about without second-guessing if you didn’t make games similar enough to how some celebrity game developer did.
It’s fine to seek out and get advice, and it can all be really great advice, but don’t forget to make your own path.
This time, I’ll address the issues I’m seeing on Android and Windows platforms.
Android: manual code signing
Quite frankly, between running the game on my phone and on my tablet, I haven’t seen any issues since I first tried to get my game built and installed on this platform. The main issue I had was figuring out which directory to save to, and I solved that issue.
Oh, and code signing was another solved issue. I can build and deploy debug builds by turning on developer mode on my devices, but the release build needed to be signed. As I am not using amazing IDEs that have one-touch buttons that do all sorts of fanciness, I had to figure it out myself from the documentation.
Luckily, the Android developer documentation for signing manually was fairly straightforward in this regard. In my CMakeLists.txt, I added a custom target called sign, which requires the location of my keystore and its alias. I created a few environment variables that I pass into my build, and the following is basically what’s needed as per the documentation:
Otherwise, I found porting to Android be very straightforward thanks to using the NDK and libSDL2-based libraries. If anything, I worry about scaling to different screen resolutions and device-specific compatibility problems due to the lack of devices I have to test on.
I’ve already signed up for the Google Play developer program, so the main piece to worry about is actually submitting my app to their store. How hard could it be?
Windows: persistence and font rendering
While GNU/Linux and Android are more or less the same, Windows is the odd duck.
I can easily cross-compile to create a Win32 build, and with my limited testing I found that the 32-bit version runs smoothly on a 64-bit system, so that’s good.
Since I don’t need to use a lot of memory, there’s no real advantage I can see to building a 64-bit version of my Windows port. The main downside would be an inability to support people on 32-bit systems, requiring that I provide both 32-bit and 64-bit binaries as I might need to do for the Linux-based package.
However, I did have to fix a few issues this past week that I didn’t know were there until someone tested it for me. Thanks, Rick!
I knew of an issue with using MinGW to cross-compile to Windows in which using std::cout would result in a crash. I never looked too hard into it because I only used cout for my own logging in order to find out what is happening, so I just commented them out when I released for Windows, usually for a Ludum Dare game.
Well, it turns out that there was still a crash, and I found that if I commented out the code that saved the current game state to a file, it would run just fine.
Was the known issue applicable to file stream operations, too? Luckily, gdb can be downloaded and run as a standalone applications on Windows, so I ran my game on Windows through gdb and read through the stack trace. It pointed to yaml-cpp.
I use yaml-cpp to save and load my game data, and it works very well. But why does it crash on Windows?
I found this thread on GitHub that mentioned a similar stack trace: Crashy shared object
It was closed without really being addressed, as the original poster gave up after seeing the issue disappear when using a later version of gcc.
Luckily, someone else found a different solution involving a change to a few lines in yaml-cpp’s code, although they said more tests are needed. I tried it, and it seemed to solve the problem for me, although I am a bit wary about not knowing what the change does or how it solves it. B-(
The other issue I found on Windows was that resizing the window results in the text looking completely wrong:
All the other graphics look fine. Under the hood I am using SDL2_ttf, but using it directly isn’t showing this problem. I am using NFont, which does some caching, and I wonder if it is somehow being corrupted. I need to do some more tests, but this issue does not occur on my Ubuntu system, and Android doesn’t allow you to resize the screen dynamically at runtime, so it’s a Windows-specific issue so far.
I’ll continue looking into it, but updating to the latest version of NFont didn’t help. I tried updating my SDL2-related libaries next since some Windows 10-specific updates were made between the initial Windows runtime binaries and the latest release.
NFont’s creator Jonathan Dearborn has been running test apps I’ve sent him and sending back updates to try, and so far it seems we’re nearing a solution. Thanks for being so responsive, Jonny D!
The main major issue is signing my game’s binary. Windows 10’s SmartScreen puts up a warning about how they have protected your PC because they prevented the app from starting. It shows the binary as coming from Unknown Publisher.
That’s scary. I need to look into how to make it less scary. Does it require buying a code signing certificate, or is it similar to how Android’s code signing works? I don’t know yet, but I’m looking into it.
The other issue with Windows is that saving the game is sloooooow. In my game, I persist changes each time the player makes a major decision. Basically, if you click a button that switches to a different screen or causes something to happen in-game, I save so that if you shut the game down and reload it, it takes you back to where you were.
My Linux-based and Android-based builds are zippy. I can click, click, click, and any changes are instant. As a result, the game has been feeling very responsive despite the lack of a real-time need for it.
My Linux-based system does not have an SSD drive, and my wife’s Surface Pro does, and yet her system takes forever to save a file.
So on Windows, it feels less like click, click, click and more like click, wait, see screen update, then click. Because of the delay, sound effects are playing too early as well. It’s a lesser experience on Windows.
I haven’t ever needed to do multithreaded programming before as a single thread was usually plenty for the work I’ve ever done, but now I am wondering if I should spin of a thread specifically for writing to a file due to this issue that seems to be Windows-specific.
How Much Longer?
Ok, so there’s some technical issues, and some are easily surmountable, and some require some more investigation, and it’s possible there are some I haven’t run into yet.
Since Android seems the simplest to release, perhaps it goes into the Google Play store first, and I worry about the Linux and Windows versions later.
But I do not want this three month project to get to the ninth month before its first release.
The good news is that the next project will have a much clearer release plan, and many of these issues will be already solved. B-)
I started a three-month project at the beginning of the year, and I’m now in the eighth month. I reported on the reasons why it was taking so long last month.
But I’m feeling pretty good about it, and while I still have some balance issues to work out, and it’s a bit ugly, I’m preparing for the actual release.
The thing is, I haven’t really done a serious release before, and since I want to do a simultaneous cross-platform release, I’m finding issues unique to each platform.
The platforms I currently support:
GNU/Linux
Android
Windows
What I want to support:
Mac OS X
iOS
I’ll start with Apple platforms, then talk about the environment I use natively. Other platforms will be discussed in the next post later this week.
Mac/iOS: no development or testing environments
I would love to create a Mac port. I know it is theoretically possible to create a cross-compiler to generate a Mac version, but it seems I need Mac-specific libraries, which requires owning a Mac.
I don’t own a Mac, and while I know of virtual Mac services you can subscribe to online, I haven’t bothered to look too seriously into them. I would also like to be able to test the game, and so I would need to use a Mac in order to see how it really runs, especially after running into the Windows-specific issues above.
As for iPhone or iPad, I’m in a similar position. I don’t own an iOS-based device. As I’m using libSDL2, I know it is possible to port to it, even without a Mac, but I would need to look into how to do so, and I would still need to invest in the devices to test on.
I am saving up for these things, but at the moment I don’t have them and I don’t want to spend time on them until I know what I’m doing.
And in the past it’s been difficult to hear back from people willing to be paid for porting a game for me, and volunteers have had difficulty figuring out how to put my project together on their system. I might look into it again, because that was years ago, and it’s a different world today.
GNU/Linux: distributing dependencies and architecture compatibilities
I develop and test the game on my Ubuntu GNU/Linux system, and the main thing to worry about there is that I can distribute the game and have it work out of the box on other distributions.
My game uses libSDL2 and related libraries. While I installed them on my system using my package manager, I can’t assume that my customers will have them installed as well.
Quite frankly, rather than worry about an installer to put everything in the correct locations on someone’s system, I think providing a basic tarball might be fine. Rather than provide .deb or .rpm or customer shell installers for each type of system, and then worrying about following the correct Linux Filesystem Hierarchy Standard, you allow the player to put the game in the directory of their choosing, extract it, and play.
But then I need to worry about how the tell the system to load the libraries. Running an application on Windows, the system generally looks in the local directory for libraries to depend upon. Unfortunately, Linux-based systems don’t do so, and while there is a way to point it towards your libraries using the LD_LIBRARY_PATH environment variable, I also know that it is frowned upon to do so due to the security and compatibility issues it can introduce.
On the other hand, many popular commercial games on my system do just that. For instance, looking at the directory for Don’t Starve, I see:
The fact that it is in this shell script wrapper is better than the original concern of changing the default environment variable in a more or less permanent way, which can cause version conflicts and such. It’s your program. You know what it needs, and any other applications that run will not be affected.
Still, supposedly the better way is to tell your binary at build time where to look, which isn’t very difficult. It requires -rpath=\$ORIGIN/[directory where you put your libs]. $ORIGIN expands into the directory that your binary is located.
So if the extracted tarball would have the following structure:
– foo-bin
– libs
– libfoo.so
– libbar.so
Then I would build foo-bin with -rpath=$ORIGIN/libs.
Of course, now foo-bin MUST be in the same directory as libs, but in practice, it’s fine. When was the last time you moved parts of a game’s files to different relative locations and expected it to continue to work?
I’m sure there’s issues with this approach as well, but with these two approaches, there’s plenty of precedent.
The only unknown I have is dealing with 32-bit vs 64-bit systems. Ubuntu has multiarch support, but I’ve seen comments on forums about people not being able to run an application due to architecture issues.
Don’t Starve distributes separate 64-bit and 32-bit builds. FTL, on the other hand, distributed both the 64-bit and 32-bit binaries and libraries together, and using a shell script, it determined which platform you were on at runtime to point LD_LIBRARY_PATH to the appropriate directory.
And other games distribute all desktop platforms together in one file, so if you bought the game, you bought it for Windows and Linux and Mac, whichever one you wish to play on. I like this option, especially since I hate the idea that I have to pay for a game twice in order to play on two different platforms.
There was a game jam in which I used Stencyl, but otherwise, all of my projects have been based on my own hand-coded C++ with libSDL. I spent time figuring out how to write a basic game loop, how to design my software architecture, how to create simple buttons to interface with, and more.
It’s time I could have been spending designing games rather than implementing them. I know this fact.
And yet, I persist.
Over the years, I’ve been told to switch to Flash, or use an engine like Torque 2D or Unity. When XNA was released, I remember wondering if C# was going to become the dominant programming language in game development.
But my C++ game engine is still with me, and still relevant. Granted, it’s not as full-featured as some systems, and the asset pipeline is still a manual effort. But what it does feature is well-tested, and I know how it works.
There’s something about learning how to build it from scratch that makes development more enjoyable. My A* pathfinding algorithm might make oddly suboptimal paths, but learning how the algorithm works and figuring out how to implement it was a fantastic experience.
As you can see from this 2010 development shot of what ultimately became Stop That Hero!, the AI hero should have followed something like that yellow line rather than the path it actually took.
It’s sort of like doing my own home repairs. There are some things I’ll leave to well-paid experts, but other things shouldn’t be too difficult to do. For instance, replacing the toilet’s fill valve and flapper took a small trip to the hardware store to get a replacement part and then a few minutes of work.
A bigger project I finished recently involved putting lockable doors on shelves we have in the basement. My wife and I are getting licensed to become foster parents, and part of the requirements for our home’s safety include keeping flammable materials such as paint in a locked storage area.
Rather than buy a big expensive cabinet, I thought, “We already have these wooden shelves in the basement. How hard could it be to put up a piece of wood with some hinges and a padlock?”
I measured the area I needed to cover. I bought the wood and had the guy at the store cut it for me as I didn’t own a power saw myself. I learned the screws for the hinges were longer than the wood was deep, and I found that you could get 1x4s to frame the wood to make it look nice while also giving the door the thickness needed for those screws.
In the end, the doors looked nice enough and were functional, although they are not perfectly centered, as you can see. It turned out that the dimensions I measured didn’t take into account parts of the shelf protruding in ways that would prevent the doors from fitting perfectly. The good news is that they look homemade. B-)
Now, it took some time. I had to go to the hardware store a couple of times to get all of the materials, and I had to spend time on it when I could have been doing something more important, like working on finishing my game before we have foster children in the house. Did this time and effort translate into a better return on investment than the $90 cabinet I thought we could avoid buying?
No. In fact, we probably overspent on the wood and other materials for other projects.
But there are some benefits to having done it myself.
One, I learned 1x4s are not actually 1 inch by 4 inches. I never knew this fact, but when you buy wood, you need to expect your 1x4s will be 0.75 inches by 3.5 inches. It’s about how the wood is when it is cut and rough versus when it is dry, planed, and made ready for sale. It’s just one of those things that I now know for future projects. Luckily, the screws I had to attach the 1×4 to the plywood weren’t too long, but that could have been another trip to the hardware store since I was expecting the nominal dimensions to be the actual dimensions.
Two, I discovered that I can improvise a carpentry job. I had not made plans, yet I was able to put together some decent looking doors. When I ran into trouble, such as finding out that the doors wouldn’t fit where I expected them, I was able to shift them to different parts of the existing shelf and keep going. I could easily have given up when I found out that the doors were just a little too big, but I made it work. If I was doing kitchen cabinetry, I would have been more careful, but this project was more about the functionality than the aesthetics.
Three, I have the pride of saying, “I built that myself.” There’s nothing like that feeling.
My game development efforts might result in projects that are somewhat askew like my basement shelf doors are. It might take me longer. The end result might be less than what I could have gotten had I leveraged someone else’s efforts.
I know.
But I am a much stronger developer than I was in the past mostly because of all of the from-scratch efforts I have put in. I did the research myself. I explored from first principles rather than taking the shortcut of an existing path. I understand the trade-offs involved in design decisions rather than accepting decisions made for me.
And in the end, when I release a game, I can say proudly, “I built that myself.”
It won’t likely be important to my customers. And it won’t likely be important to you. But as an indie game developer, I don’t have to pay attention to your criteria for what’s the best approach.
I can build it myself, a process I enjoy.
And next time, I will be more experienced and knowledgeable than I was before.
In January, I said I had created a plan. This plan was to release a minimum viable product (MVP) and get it in the hands of at least one customer in at most 90 days.
My thinking behind this plan was that I should be able to put together a fairly complete game easily in that time, get it in front of paying customers, and get useful data about the market to help me decide what to do in the next three months. Maybe I would flesh out the game more, adding features and enhancements based on customer feedback. Maybe I would switch to a different project entirely if no one cared about this one. When I get real customer data from my 90 day project, I would interpret the data and make an informed decision then.
My project is now past its 180th day. Oof.
What happened?
Pride, partly, and the lack of a relatively satisfying game experience. I didn’t want to release a broken, ugly piece of software, and when my original deadline was arriving, I decided I couldn’t release it in the state it was in.
MVPs are meant to be fairly complete products. They might be missing key features, such as copy and paste in a smart phone, or might have some clunkiness, but they are meant to be something you can hand to a customer so you can get feedback from them. You can ask for feedback about different aspects of the game, but real customer behavior requires real customers, not just people who claim they would pay for something when asked in a survey.
So what was wrong with what I was making? I wasn’t worried about a lack of animations or polish. I was worried about a lack of satisfying game play. Various features were in the game, but they weren’t working together very well.
My plan did not initially accommodate the need for time spent on balancing the game mechanics and economy, and while I knew I would always playtest and tweak, I didn’t realize how far off the mark the initial implementation would be. My game didn’t just feel out of balance. It felt broken. I couldn’t release it in that state.
I’ve been in this situation before. My first major commercial game Stop That Hero! was originally supposed to be a one month project that I woefully underestimated. I worked on it for well over a year before my indie game development business ran out of money. I kept slipping my self-imposed deadlines constantly, and I just kept working harder to try to bring the game to a finish line that kept getting further and further away.
There are other similarities between STH! and my current project. STH! was a Ludum Dare game originally that I decided to flesh out into a full commercial project after getting some good feedback, and my current project started out as a physics-based One Game a Month project with similarly good feedback. Both projects were being built using my own code instead of leveraging an existing engine (eventually Daniel Cook will hug me, and I will check it off of my indie game development bucket list). And in both cases, I worked on them mostly solo.
But there are some differences.
STH! was built when I was running my indie game development business full-time. I spent more time in one day working on that game than I do sometimes in one week for my current project now that I have a day job, am married, and have other responsibilities. Looking at my numbers, I think I could have built my current project in its current state within a few weeks of full-time effort, and I would probably have plenty of time to play other games as well.
But STH! was primarily about feature development, especially since I opted to start from scratch, and it was a long time before I got to the point where I could even play the game, let alone figure out if I need to change anything about it as a result of playtests.
For my current project, I developed a few simple prototypes early on. I created a quick text-based version of the game that took me moments to put together, and I spent a few days tweaking and changing it. I had a few systems that I was able to test out quickly and determine if the concept would work.
And I focused on getting something playable quickly ever since. For many months, I’ve been able to play the game, show it to people, and get feedback, although I haven’t had any serious playtesting sessions.
While STH! was delayed due to missing key functionality for a long time, this game is delayed due to what might be called “informed feature creep”. I say informed because I am not just adding features when I think of them but only after recognizing that they would make the basic game more complete.
But it does have the effect of changing what is considered “minimum” for my minimum viable product. Focusing on the need to ship helps me decide if a new idea is a must-have or not.
While my initial project plan was a good first effort, I clearly missed the target.
But it was more out of underestimating what had to be done than in underestimating what I knew had to be done. Everything I scheduled time for more or less got done when I said it would, but playing the game showed me gaps and problems that needed to be addressed with work I didn’t anticipate at the start.
And that’s to be expected. You should learn about your project as you work on your project, and there will always be changes to the plan as it hits reality. You should expects lots of changes and tweaks to the design of your game.
I knew game development requires playtests and balancing, but I forgot to address it in my project plan. Whoops.
And that oversight is why I’m in my seventh month of my three month project. That, and the fact that it takes me weeks to do what could probably take me mere days if I was 100% focused on the project.
Like many indie game developers, I have a day job.
It pays the bills, but in exchange it asks me to dedicate a significant portion of my time to it during a given week.
I am married. I like being married to my wife. Since love is spelled T-I-M-E, in order to continue being married to my wife, a portion of my time is also spent just being with my wife.
We have a house. Now, before you buy a house, everyone is excited that you’re looking. They ask about neighborhoods you are considering and let you know about realtor friends they have.
But once you buy a house, suddenly everyone’s tune changes to the sarcastic song of “Oh, have fun doing all the maintenance on it! That’s home-ownership for ya!”
Like, they knew. They knew the entire time, and yet they never said anything until you joined them in their misery! So a portion of my time is spent mowing the lawn, fixing things like dryer vent ducts and minor plumbing issues, and general cleaning.
I like to sleep a full night. Well, I don’t actually. I wish I could use that time for other things, but I know sleep has a bunch of benefits. So aside from the occasional all-nighter in an emergency, a portion of my time is spent being uselessly unconscious.
So between a day job, commuting, married life, home ownership maintenance, eating, and sleeping, I find it difficult enough to schedule enough time to make games on the side. Cut back on idle time spent on Twitter and Facebook, cut out TV watching, cut writing in my blog, and there’s still only so much time left in a day.
And there aren’t even any children in the picture yet.
So how do some of you find time to actually play games?
It amazes me to read that other part-time indie game developers not only have time to play a new release but to also finish it within a week and give their well-conceived thoughts on it.
I once read about an interview with a prominent game designer who was asked what his favorite video games were, and he admitted that he didn’t play games. I remember wondering at the time how it is possible that someone could be in the industry but not play the games made by that industry.
But if you’re busy, and you are trying to make time for what’s important, then the less important stuff gets cut.
When my choice is to make games or play games, even if the temptation is high for play, making gets priority. I can play later. Or I can make time to play, but it will be limited.
For instance, this past Saturday I played board games with a bunch of people. The evening was dedicated to it, and then it was over.
Other times, I have played Mario Kart or Smash Bros with friends, or I’ve found myself with some free time and decided to use it to play a single-player game.
But those times are rare. They’re definitely not daily, and I don’t find myself playing a game for many evenings in a row until I’ve finished it.
That’s because I’ve dedicated those evenings to making games. Or mowing, but assuming the grass is fine, then it’s dedicated to making games.
It’s not that I don’t want to play games. In fact, I do want to play the many games in my collection, including games I still have from the NES. I have this delusion that one day I’ll have time to sit down and properly finish Final Fantasy and all the Wizardry games. I was playing X-COM, but only when it was released on Humble Bundle, but I never did get around to playing Civilization: Beyond Earth. Heck, I bought Civilization 3 at a physical store many years ago, and it has yet to be installed on my computer. Despite my poor game-playing track record, I love playing games, and I would play them more if sleep wasn’t so important.
Playing games is also good for research. How do you make games if you don’t know what is already being done, or what the trends are, or what conventions to follow to avoid reinventing the wheel?
Playing games keeps me informed. When someone talking about game design refers to Super Mario Bros or StarCraft, I’m on the same page. When they say something about flagpole jumping or Kerrigan’s betrayal, I know exactly what they’re talking about.
But when they refer to StarCraft 2 or Fallout 3 or really almost any major game released in the past couple of years, I’m going to have trouble understanding references if they aren’t explained.
It’s kind of embarrassing. Growing up, I was the “kid who knew everything about Nintendo”, but today I would have no street cred.
But I find myself choosing between making games and playing games, and playing games isn’t chosen often in favor of making progress on my own creative projects.
So if you are one of those people who somehow makes time for both, please write a comment below to let me know: how do you do it? Do you find that some areas of your life are out of balance as a result, or do you somehow make it all work? Do you purposefully take a period of time off from your indie game development to play a new game to completion, or do you play games regularly and squeeze in game development in the time left over?