Categories
Games Marketing/Business

Published on Google Play? Kinda. Not Really.

After over nine months of development, I finally had a game I felt good about brave enough to release to the world.

My major goal was to release the app on the Google Play store first to get a sense of what the process is like and to get direct knowledge about the customers there.

I clicked Publish late in the evening of Saturday, October 22nd. Whew! A big step!

But now I’m in “Pending publication”, and while many unofficial resources mentioned waiting mere minutes to a few hours, I learned that Google changed its policy in 2015 to manually check apps. It still doesn’t take two weeks like it might on Apple’s App store, but it might take a little longer than it used to.

The status switched from “Pending publication” to “Published” the morning of Monday, October 24th. Woo hoo!

Leaf Raking Game - Published Sorta

Er, wait. Sorta.

For an entire day, and even now the next morning, October 25th, I still see “We’re sorry, the requested URL was not found on this server” when I click on the “View in Play store” link.

I keep finding all sorts of unofficial explanations about caching and how long it can be expected to take for listings to propagate through the system, but the only hint that it might take much time at all is in the Developer Console help article “Issues publishing apps” which asks if it “has been over 24 hours since published”, but then goes on to talk about search algorithm changes and reasons why apps might get filtered out on certain devices.

It doesn’t address a published app not actually being available anywhere.

It’s kind of difficult to feel good about finally publishing my project when I can’t point out any evidence to anyone. As a first-time publisher on Google Play, this experience is confusing and leaves a bad taste in my mouth.

According to someone on IRC, they had emailed earlier in the day and learned that there were some technical difficulties on Google’s end:

“Typically apps can take up to 24 hours to appear on the Play Store, however we are currently experiencing longer than usual delays across a large portion of our system. Our technical team is actively working on a solution and hope to have this issue fixed by the end of the day.”

So, we wait.

I find it confusing because when I self-publish on my own site, I don’t consider the game published until someone else can actually see it.

But this experience is teaching me about the process way more than reading about it ever would.

Categories
Geek / Technical Personal Development

Open Source Taxes

Flash game developers may remember Flixel, the open source game dev library created by Adam “Atomic” Saltsman.

HaxeFlixel is the Haxe-based port that eventually became its own full-featured, mature library that allows for deployment across not only Flash but many other platforms.

The five-year-old project is an open source project using the MIT License. That license, unlike the GPL, does not require code changes to be released to the public.

While the MIT License is appealing to developers who want to leverage freely available code for their own projects, there is nothing to encourage contributions to the source code of a project that is under that license.

The terms of the GPL requires any modifications to be released, so it solves the problem of people taking advantage of the code but not contributing back. But if a project’s developers don’t want to make that requirement, would prefer to have the MIT License applied instead, and still have people contribute to the project, whether in monetary terms or source code, what can be done?

How We Paid Our Open Source Taxes documents how the HaxeFlixel project was able to “collect its open source taxes with smiles on all sides.”

In this case, the core contributors realized that the project founder lives in an area where the cost of living is much, much less than it would be in, say, San Francisco. Just $6,000 would be enough.

So rather than having a vague fundraiser and hoping to make a bunch of money to meter out as needed, they were able to make a hyper-focused plea with their IndieGoGo campaign to get enough money to gain a full-time developer rather than require the project to continue to be supported by an all-volunteer base of contributors.

It’s kind of like when you talk to people about how much money they wish they had in life. Some people talk about “a million dollars” as if it is a lot of money that they’ll never see in reality, and other people realize that they can get penthouse apartments complete with maid service in some exotic countries for less than the cost of a New York apartment, such as what Tim Ferriss described in The 4-Hour Workweek.

The trick is learning what’s really possible.

HaxeFlixel’s story gives some insight into not only how an open source project operates but also teaches the lesson that if you know exactly what you need, it’s a lot easier to ask for it.

Categories
Games

Nah, I Think I’ll Still Call Games Art

No, Video Games Aren’t Art. We’re BETTER by Spiderweb Software’s Jeff Vogel is an alpha strike against…I guess people who talk about games as an art form?

While I don’t disagree with many of his points, I don’t think it ever really lands home the argument that games are somehow “SuperArt,” beyond mere art and evolved into something that is somehow more.

I love literature and theatre. I love great movies. Yet, I can’t remember any work of art, no matter how good, that consumed and drained me as much as the Cyberdemon in DOOM.

You could make the same argument about sex, which is also not something that someone would argue is art in the first place.

Arguing that games are financially doing well, incredibly culturally relevant, and published in great numbers is somehow arguing that games are doing great and don’t need to be forced to grow up and become art…as if someone is making this argument?

Artistic accomplishment? Creativity? Look up any Best Games list from 2014 or 2015. Video games are breaking new barriers in craftsmanship and artistic expression every year and turning profits while they do it.

I’ll bite. From PC Gamer’s 2014 list:

Game of the Year 2014: Alien Isolation, so basically Metal Gear Solid with horror? EGM’s quote according to the Wikipedia article: “”succeeds as a genuine effort to capture the spirit of the film franchise in playable form.” So a SuperArt form that is oddly derivative of the art it is supposedly beyond.

Best Singleplayer: Dragon Age: Inquisition, a sequel. It may be an awesome sequel, and perhaps they did some innovative work there, but it’s a sequel.

And 2015’s version of these awards went to Metal Gear Solid V and The Witcher 3. More sequels.

Sometimes I go to movies to see sequels, as well, but when gaming’s top offerings for the last decade boil down to space marines (to the point that Ubisoft publishes a game called “Space Marine”), World War II first-person shooters, and sequels to successful franchises, sports or otherwise, it’s hard to argue about how creative the game industry is. Even Minecraft, which don’t get me wrong, is incredible and not only offers a lot of ways to BE creative, but also involved quite a bit of creativity to implement, was originally based off of Infiniminer, and steals (and gives back) from Dwarf Fortress, among other games.

But then, Microsoft always liked to claim innovation with the caveat “for the first time on Windows…”

Listen, I don’t think anyone looks at certain popular films or novels as high art. Some of them are just candy, and candy sells well. So I don’t look to best of lists for innovation. I look to them for popularity. What’s everyone playing? Quite frankly, most everyone is playing sequels to games they already liked, overlooking some of the truly innovative work that is out there. That’s popularity for you.

No, I don’t think poorly of the game industry. I think what we do is amazing, and I have also argued against people like Roger Ebert who thought games can’t be art.

But when film was new, people thought it was a poorer form of theatre. Theatre was ART. Film? It was never going to live up to theatre’s ability to be art.

Then film came into its own. I’m sure people argued that film’s capabilities were so beyond theatre’s that art no longer was an appropriate term to describe it. Speculation on the future of film in its infancy leads to such flights of fancy.

Games are interactive. They pull you into an experience in an active way, which can be considered superior to the passive way a movie or book does it. Games can be elegantly well-designed. Games can do more than film, writing, sculpture, painting, or any number of art forms…in certain kinds of experiences.

But not all. It’s why people still buy books and watch films and go to museums. The fact that more people play games and more money is spent on games changes nothing.

When I write a game, I try to make you feel like you have power. Then I try to make you feel the awesome, terrifying responsibility of having power. When I force you to make a tough decision, for a brief moment, I can reprogram your brain and take your thoughts somewhere they’ve never been before. This is amazing.

It IS amazing.

It’s also not unlike art, which can take you out of your comfort zone and make you rethink your outlook on life. People cry at performance art. People have changed their careers and lives based on books they’ve read. And games have also changed people’s lives in meaningful ways beyond sweating and dopamine hits.

We haven’t begun to come to terms with the power we’ve unleashed with these toys, these addiction machines.

Oh, ok. We’re beyond art, but we’re nothing more than a drug?

It’s one thing to argue that games don’t need to worry about denigrating themselves by calling themselves art and being associated with the lower mediums.

It’s another to make that argument and then kick the legs out from that same argument by making it sound like the people behind games are nothing more than drug pushers looking to exploit those looking for their next high. “Video games are popular to the point of global invasion. Find me a human, and I will find a game that can addict them.” So, games are just an opium for the masses?

I hate it when a good game is described as “addicting.” Call it compelling. Call it irresistible. Call it riveting, spellbinding, or anything else your thesaurus can throw at it.

But don’t compare games to mere drugs. While some games might aim that low, many more don’t.

And as awesome as our medium is, art is art. We’re not “beyond art.” We’re just a different form of art. An awesome form of art, to be sure, but I’m still going to call it art.

Categories
Game Development Personal Development

The Internal Struggle on Doing Game Development Right

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.

On the one hand, I want to be prolific.

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.

Categories
Game Development Geek / Technical Linux Game Development Marketing/Business

Gearing Up for Release: Platform-specific Issues, Part 2

Last time, I talked about Linux-specific issues to fix before my game’s release.

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:

ADD_CUSTOM_TARGET(sign
"echo" "================ SIGNING WITH KEY ================="
COMMAND "jarsigner" "-verbose" "-sigalg" "SHA1withRSA" "-digestalg" "SHA1" "-keystore" "${GB_KEYSTORE}" "bin/${ANDROID_APP_NAME}-release-unsigned.apk" "${GB_KEYSTORE_ALIAS}"
COMMAND "echo" "================ VERIFYING WITH JARSIGNER ================="
COMMAND "jarsigner" "-verify" "-verbose" "-certs" "bin/${ANDROID_APP_NAME}-release-unsigned.apk"
COMMAND "echo" "================ USING ZIPALIGN ================="
COMMAND "zipalign" "-v" "4" "bin/${ANDROID_APP_NAME}-release-unsigned.apk" "${ANDROID_APP_NAME}-release.apk"
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/android-project/")

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:

Leaf Raking Game Windows Text Corruption

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-)

Categories
Game Development Geek / Technical Linux Game Development Marketing/Business

Gearing Up for Release: Platform-specific Issues

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.

Basically, I need to build custom dependencies, as per Troy Hepfner’s excellent article series on Linux Game Development, and then distribute them with my game.

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:

$ cat bin/dontstarve.sh
#!/bin/bash
export LD_LIBRARY_PATH=./lib64
./dontstarve

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.

I know some companies make their living by porting games and then selling them directly, but it’s not a business model I prefer.

Next time

In the next post, I will talk about issues specific to Android and Windows.

Categories
Game Development Personal Development

The Satisfaction of Building It Yourself

I like building my games with my own tech.

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.

Debug Path

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?”

Basement Shelf With Paint Cans

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.

Gizmo helping with 1x4s

Plywood, 1x4s, and a drill

Framed plywood

Spray painted doors

Door mounted with hinges

Finished product

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.

Categories
Games Geek / Technical

Becoming an Accidental Fan

When I was a child, I had an allowance.

I had an interest in Archie comics, so sometimes my $2 per week would go towards an Archie Double Digest, but other times I would save up until I had enough money to buy myself a Nintendo game.

At the time, for you young ones who didn’t know, the games would go for about $50. If you do the math, that’s a long time to wait, but there was always birthday money, some of which I got to spend on what I wanted before the rest was thrown into savings for me, so it wasn’t always interminable until I could get my next game.

But as a child, and probably before I had Nintendo Power to tell me what games were being released, I didn’t always have a game in mind to buy. I just knew that by the time I saved up the money, I would go into the store with my parents and look at the walls of the video game aisle until I found something that looked like what I wanted.

I recall one time seeing a blue box with pock-marked fighter plane shooting through a hole in the sky with a space background behind it, guns blazing and everything. I thought it was an F-15 flight simulator that I had seen an ad for in a really old issue of Electronic Gaming Monthly.

I was a kid. I didn’t know what an F-15 was. I just knew it was a plane that shoots other planes, and that I wasn’t playing Top Gun at my friend’s house with its incredibly difficult carrier landing sequences. So I thought I was getting another cool shooty-plane game.

It turned out to be Thunderbirds.

I had never heard of Thunderbirds, but I remember really enjoying the game with its various ships in different environments. You only had so many in-game days to fight your way through your choice of different areas to defeat Hood’s plan to rain destruction on the world, and that extra layer of mechanics made an impression on me.

Then I discovered that the game was based off of a television show from the 60s involving marionettes who spoke and made their emotions clear on their faces using “SUPERMARIONATION!” Not to be confused with Super Mario Nation.

It was exciting for me to know that I can enjoy this world in another way, especially when I was in college and TechTV aired the series with a pop-up-video-esque bits of trivia about how the scenes were made or how the characters interacted.

When the Thunderbirds live-action movie was released, starring Bill Paxton and Ben Kingsley, in the summer of 2004, close to my birthday, I tried to arrange an outing to go see it. Unfortunately, when my birthday arrived, I found it was no longer in theaters, due to how terrible it was performing. I still haven’t seen it, although even knowing it is supposed to be bad and that the creator of Thunderbirds hated it, I still would watch it.

What’s even more disappointing was that at the time, Team America: World Police was being advertised, and when I first saw the trailer for it, I immediately thought, “Oh! They’re making a Thunderbirds movie!” And then it revealed it wasn’t Thunderbirds at all. I haven’t seen it, either.

But the point was that buying a game without any idea of what I was getting into was a gateway into a world I didn’t know existed. Every so often the theme music gets stuck in my head, despite the fact that it has been years since I played game or watched an episode of the show, and my favorite ship is still the Thunderbird 2.

I accidentally became a fan because of a somewhat misleading piece of box art.

Another game I bought with my allowance money without knowing what I was getting into was Wizardry: Proving Grounds of the Mad Overlord. I saw the skeletons with swords and the very cool looking dragon on the cover, and I thought, “Yep, I’ll get that.”

And then found that I didn’t understand how to play. At the time, I might have been 9 or 10 years old, and I was used to games in which you played them and tried over and over to get through. I had no concept of the idea of building up experience and exploring a maze, mapping it out manually as you went because it was too much to try to memorize.

It was years later when I gained a new appreciation for the game, and it became one of my favorite RPGs. At some point, I discovered used copies of NES and Super NES games in the series, and when I discovered Interplay had published The Ultimate Wizardry Archives, which includes the DOS versions of Wizardry I, II, III, IV (in which you play as the villain Werdna from the first game), V, VI, and VII. It also had Wizardry Gold, which was basically Wizardry VII prettied up for Windows.

What’s funny is that despite liking Wizardry and owning every game in the main series, most of these games I only played a little bit. I never finished the first one, and I thought I should do so before moving on to the next. So aside from trying them out, and being somewhat disappointed that the music and graphics from the NES version were missing from the DOS versions, I’ve made these games wait for me.

And then there was Wizardry 8. I remember reading that it was being made, and that Sir-Tech was looking for a publisher.

And then I remember reading that they couldn’t find a publisher.

And then it was years of periodically learning that they still hadn’t found a publisher. I remember one article claiming that while the game would be highly polished due to the extra time the developers have, the graphics engine was going to look dated by the time it found a way to be released.

And then it was released! And I got my copy!

And then I learned that Japan has a huge fanbase for Wizardry, partly because the original developers had the technical foresight to make it easy to translate the text of Proving Grounds. What it means is that the Japanese periodically continued to get new games related to that world, including an MMO, which lasted all of a month when it was available in the US.

Even today, I periodically look up Wizardry in case I learn any new bits of trivia. I enjoyed The Digital Antiquarian’s history of the Making of Wizardry and Jay Barnson’s Wizardry 8 playthrough complete with developer interviews. I remember finding out that there’s a We Love Wizardry album which recreates the NES music with an orchestra, which I am of course listening to right now.

Let’s be clear. I’m a fan of Wizardry, but I feel like I don’t have enough playtime with the series to be a huge fan.

But still. Because I thought swords and skeletons looked neat as a child, I got to become a fan ready to explore entire worlds. And get the theme music stuck in my head out of nowhere.

It’s funny, because today I would be afraid to admit that I bought and played a game sight unseen. With so many games, and so many reviewers, it seems strange to not at least ask someone about a game or to look it up before handing over my money on an unknown.

On the other hand, sometimes it is great to discover a gem on your own, and then to discover that there’s an entire collection of jewels to enjoy that come along with it.

Categories
Geek / Technical

Creating Good Commit Messages for Your Project’s Repo

I never thought too much about the commit messages I write. There’s the obvious idea of writing clear messages, much like writing a good headline for a blog post or a good subject line for an email. Otherwise, I did whatever made sense.

Many years ago, I remember learning about CVS and version control in general. I didn’t start using it until I learned Subversion, and eventually I switched to Git.

As a primarily lone wolf indie game developer, I don’t think too much about how other people might read my source repository. I think about how I might use it, and my repo is mainly a place to make sure that major mistakes aren’t going to cost me a ton of time to figure out how to revert.

Basically, the evolution of my project is bookmarked at key points along the way. As I write more code and find I introduced a problem, I can check the diff to see how I did so. If I can’t figure it out, I have the option to throw away what I’ve done and start from a known state.

It works better if I bookmark my progress frequently and not have large commits containing what is actually a bunch of different changes.

And frequent bookmarks mean that I can give concise yet specific names to those bookmarks. I think I’m pretty good at naming what I’ve just done.

But then I found How to Write a Git Commit Message by Chris Beams, and I like what he had to say on this topic.

First, there’s the idea of the context of the change. At my day job, I think the issue I flag most often in code reviews for my teammates is naming their tests, variables, and functions in a way that gives context to what they’re doing. I especially hate test names that essentially tell me what the code already tells me.

WhenFooIsClickedThenCouponCode3IsCalled is not a good test name because it doesn’t tell me why. It just tells me what a reading of the code would tell me. What is calling CouponCode3 supposed to accomplish? THAT’S the thing that I want the test name to tell me.

WhenFooIsClickedThenItemIsPurchasedWithEmployeeDiscount would be much better. It does so by using the CouponCode3 function, which is also terribly named in this contrived example so fix that issue, too, please.

When it comes to commit messages, I see similar naming problems, but I haven’t thought much about it. But if you’re looking for a previous change, which is better:

Fixed crash bug

or

Fix crash when handling sprite rotation

Obviously the second one communicates more context. If I had to read through commit logs to find a past change, I want more commit messages that read like it.

He provides 6 other tips, and one of them is to write your commit subject line in the imperative.

It’s the reason why I found the article in the first place as this tip was shared on Twitter:

A properly formed git commit subject line should always be able to complete the following sentence:

If applied, this commit will your subject line here

For example:

If applied, this commit will refactor subsystem X for readability
If applied, this commit will update getting started documentation
If applied, this commit will remove deprecated methods
If applied, this commit will release version 1.0.0
If applied, this commit will merge pull request #123 from user/branch

Notice how this doesn’t work for the other non-imperative forms:

If applied, this commit will fixed bug with Y
If applied, this commit will changing behavior of X
If applied, this commit will more fixes for broken stuff
If applied, this commit will sweet new API methods

A lot of the article deals with writing entire bodies for commit messages. Other than maybe having a separate line to indicate who reviewed the code at the day job, I’ve never found a need to write more than a one-liner for my own projects. It would be overkill to expect myself to give that much context to myself.

But I’ve otherwise been winging it up until I read this article, and the general style guidelines make sense to me, so I’ve started to adopt it.

Here’s some commit messages from early on in my raking game project:

  • Android seems to not truly restart app; clear containers on startup.
  • Changed to higher resolution; using brighter 3rd-party grass sprite.
  • Added damping factor to individual entities to allow for custom friction.

And here’s some recent ones:

  • Provide background for Ultimate Item speaker image.
  • Fix weather generator so Stormy days result in Windy days more often.
  • Warn player when yards are filling up with too many leaves.

They could still be better, but keeping in mind the imperative style and finishing that sentence above means my commit messages are more consistent, which makes it easier for me to write them in a way that gives context to what the change is doing and makes it easier for me to read them later when I am trying to find the one past changeset that is relevant to whatever I am working on at the moment.

Categories
Politics/Government

Why Are American Police Carrying Out Executions against American Citizens? #BLM

One of the things we’re taught to believe as American citizens is that we cherish our freedoms and our rights. Life, liberty, and the pursuit of happiness. Freedom of speech. Freedom of religion.

And if we’re accused of a crime, we get to face our accusers and have a fair shot at defending ourselves. It’s in the base Constitution, and in the 6th expansion pack it even says “In all criminal prosecutions, the accused shall enjoy the right to a speedy and public trial, by an impartial jury of the state and district wherein the crime shall have been committed.”

We’re presumed innocent until proven guilty.

We’re taught, “Look at THOSE countries. The oppression by the government, the jack-booted thugs executing people without trial or with sham trials where the deck is stacked against the accused. We have it much better here.”

We Americans have it good, right?

But some of us don’t.

In fact, many of us look the other way when again and again and again and again the police carry out executions against people of color. We look the other way when it happens in broad daylight. We look the other way when there is video footage showing it happening.

Somehow, even when the evidence says, “You can’t look the other way”, we find a way to look the other way.

It doesn’t matter whether or not the victim is a teenager or a grown adult. It doesn’t matter if the victim was a model citizen or had a colorful past. It doesn’t matter if the victim was fleeing or standing or sitting or had his hands up.

It doesn’t matter, because if we are being accused of a crime, we as Americans expect to be able to defend ourselves before we’re found guilty of the crime. In court. With a fair trial.

To stand that trial, we expect to be alive. We should NOT have to worry that our lives are forfeit just because someone suspects we might be bad guys.

Worrying that the government will bring about my death if I breathe wrong when accosted by police is not how it is supposed to work in this country. That’s for other, lesser countries with totalitarian governments.

And yet, we live in a country where some of our fellow citizens are not being afforded the right to a trial by jury.

We live in a country where some of our fellow citizens are being told that the basic rights guaranteed by the third article of the Constitution and the 6th amendment do not apply to them if a police officer decides to act as judge, jury, and executioner.

We live in a country that has tolerated actions that we are supposed to look down upon.

So what kind of country are we living in?

Because the totalitarian-type actions happen predominantly to Black people, we ignore them. We justify it by looking for reasons why they got themselves killed by police officers, people who after all have a tough job and risk their lives to keep us safe.

As a White male, I live in a completely different America. My America looks a lot like the one I was taught about growing up.

And because of my White privilege, I can look the other way when there is too much cognitive dissonance. When what I want to believe about America and what the daily experience and death toll for Black people in that same America are at odds, I can choose to say, “No, I live in the greatest country in the world, so it must be something else that’s going on.”

I can stay silent when I witness what happened to Philando Castile.

I can stay silent when I witness what happened to Alton Sterling.

I can stay silent when I witness what happened to Eric Garner.

To Michael Brown.

To Tamir Rice.

To Eric Harris.

To Samuel DuBose.

To Freddie Gray.

To Walter Scott.

To Laquan McDonald.

I can stay silent, because it doesn’t happen to me.

After all, I live in a completely different America in which I don’t have to fear being executed by a police officer for a routine traffic stop.

I live in a completely different America where even if I was violent and a threat to the people around me, and even if I killed officers trying to detain me, I could be sure that I would be arrested, alive, and ready to stand trial.

Executions in the streets? They only happen in other countries.

Including that other America I can pretend doesn’t exist.

Because Black people are being regularly harassed, beaten, terrorized, and executed by police officers, and because those actions get covered up often enough by those same police officers, there is a movement called Black Lives Matter.

Because in this America, it’s clear that they don’t matter to the majority of Americans.

Because if Black lives really mattered in America, we wouldn’t be silent about the injustice of death sentences being metered out by police without a trial. We wouldn’t keep saying, “Keep calm. Let’s wait for all the facts,” while simultaneously reaching for tenuous justifications and defending the indefensible.

It doesn’t matter whether or not the victim was a good guy or a bad guy.

We live in America. We don’t execute people in the streets. It’s not how it is supposed to be in this country. And we shouldn’t tolerate it when it happens in our name.