Like taking a jellyfish for a walk

My highschool orchestra conductor had a saying:

“It’s like taking a jellyfish for a walk.”

He was referring to our playing (more specifically our string section’s playing) where the pace would gradually slow irreparably. So much for animato.

That’s what my Failed State game feels like at the moment, a freak’n Jellyfish that just won’t slop over fast enough because of slimy, slippery impediments that stuff up the flow.

Here’s a list of annoyances:

  • Fun with z-fighting billboards. – I tried to get some billboarded text in front of a billboarded background in Unity. It seems the 3DText GameObject and my custom Mesh just don’t want to get along. I’m probably doing something stupid.
  • Freak’n Unity keeps crashing when I try to use breakpoints! Seriously! And the bug reporter seems to keep hanging! Argh! It turns out that I’m running Unity 4.2.1 and they’re up to 4.3.4. Let’s hope that updating makes a difference (It doesn’t seem like that long ago I’d updated so maybe they released a crap build).
  • MonoDevelop gets in this weird state where the CPU maxes out and everything grinds to a halt. One forum post suggested turing off the version control system but that doesn’t do anything. *sigh*
  • Started trying RAIN{Indie} as an alternative path finding library. I’ve had to spend a few evenings figuring that out. The pathfinding seems promising by I need to get it to calculate the navmesh programmatically.
  • And work drains me to the point of computer apathy. No amount of exercise is fixing that.

So here I am, bitching about my misadventures. Hopefully I can look back on this post and laugh at it once I figure this mess out.

Now it’s off to applying a bunch of OSX updates and installing a new version of Unity.

Random Ramblings Regardling Recent Wangling

Wangle (verb): to bring about, accomplish, or obtain by scheming or underhand methods.

…but to say that’s what I have been doing all week would be rather hyperbolic, unless one were to suggest that I’m trying to cheat time but time will always win. In fact, time probably just toys with us.

I set myself the ambitious goal of trying to get a Continuous Integration build server set up using TeamCity set up so I can auto create builds to give to friends and to make sure that I’m not breaking things along the way.

I suppose it was crazy of me to think this would be straight forward.

I set up TeamCity once before for an iOS only build of my Breezy Bubbles game, more to prove that I could than for being really thorough about the games integrity (it was a quick ‘throw away’ title, so to speak). I don’t remember the process being that painful because it required two steps.

  • Hook it up to my git repo.
  • Create a build step using the XCode build step template which hooked into my project settings.

I was under the optimistic impression that the Unity Runner plugin for TeamCity would afford the same simplicity but alas, that wasn’t the case. I got so far as getting TeamCity pulling my project from my git repo but the build runner was going nowhere fast.

I got the impression that I could sink a week into something like this. Yes, there is command line documentation on how to use Unity’s command like arguments to create a build but I couldn’t help but shake the feeling it was going to be easier said that done. So I did what any cautious developer does and bailed.

I bailed and went back to coding my unit circles (the little circles that are going to represent infantry, tanks, vehicles etc). I also made a unity Inspector element whereby I can edit the unit circle’s size and colour during runtime.

Combined with the billboard-like 3D labels which I ripped off from that Auckland International Airport video, I can represent each unit on the map.

Unfortunately even that is causing a lot of drama. The unit labels and associated text are billboarded so that they always face the camera. That bit’s fine (I found some code for that quite a while ago) but I’m having ‘fun times’ trying to get the text correctly positioned and in front of the label background.

*sigh*

I feel like I’m wasting time making it look pretty but the reality is that what I’m trying to create could be considered the bare necessity to represent a unit on the map. Once I get that done I’ll post a victory screenshot.

Inspirational Images

Pinterest is your friend when it comes to discovering great UI ideas. Google images is great too but Pinterest provides the ability to save (pin) all the interesting images rather than having to actually download them and store them somewhere yourself. This week I’ve spent time looking up map UI, tactical map, airstrike and hud and collating a modest collection of ideas for the visual aesthetic of Failed State.

Just to prove that good ideas can come from all sorts of diverse places, I happened to see a video about Auckland International Airport showing off their expansion plans up to the year 2044. I found it thanks to transportblog.co.nz which is a great source of all things NZ tranport infrastructure related.

What was interesting about it (with the exception of its content and great graphics) was some of the coloured overlays that were being used to define locations and areas on the map. Also of interest was the camera angle, but that’s an altogether different topic.

The overlays in question looked something like this…

…and what was especially of interest was the way the labelled overlays ‘pinned’ to the terrain. I was trying to think of a way of anchoring an overlay representing a in-game unit (e.g. a tank) to a map location. This is not a 3D game as such and the zoom level is too high so there is not going to be a concept of an actual 3D tank model on the map, it will probably just be a circle with a label. The problem is conveying enough info with something like this. I don’t want to use a google maps type pin or anything else synonymous with mapping apps so seeing this AIA video was a lucky break; I’m not above copying it.

Making higher res mock ups is in violation of my idea of quickly getting a first draft done but hi-res is good for eliciting different type of feedback than hand drawn sketches do. It also helps me visualise screen real-estate and how one might interact with units (e.g. tanks).

I’m still trying to find unit identifiers similar to what World in Conflict and Wargame European Escalation use when the map is zoomed out (gosh did my Mac Book Pro just go absolutely nuts running European Escalation just so I could get a screenshot. Meh, I don’t even need it; just take my word for it that those games look amazing). I’d like to use icons to represent units but for now I’ll just use plain text, e.g. a M1-A1 tank will just use that very text on the overlay unit label.

Regardless, here’s something to show off. There is an expectation that touch devices require bold UI elements and simple game play. Failed State is certainly not going to be a Eugen Systems game but one has to start from somewhere, right.

UI Planning: Flow Charts

In trying to determine scope, I’m trying to ascertain the number of screens (or screens with overlays) that are required throughout my game, Failed State. I’ve sketched out some diagrams and as much as the agile way of thinking tells me I should just take a photo on my phone and upload it, it’s nice to have a formatted version… so I started looking for a tool.

What I needed was a flow chart. I think Microsoft Word has flow chart drawing features built into it, but I don’t have a license for my mac. I tried Libre Office but I got the impression really quick that was going to be a mission. I then started to look for online alternatives.

I saw Lucid Chart first, but they wanted about $3 a month or something. That sounds like a good business model and their product looks top-notch but I haven’t committed to this whole idea yet so I kept looking. Next I saw something call Gliffy but gave it nothing more than a cursory glance; then I saw draw.io.

Done!

From my 1 hour of playing around, draw.io seems like the perfect example of a web application. Drawing feels like a desktop app and my chart saves automatically to my dropbox account. Funny enough, I’d just created a dropbox account yesterday so that I could link pictures on these posts I’m making (I think my web hosting service has server side wordpress restrictions so I can’t upload via wordpress).

Here’s a resulting gif from the night’s work.

The basic idea is the the Main Menu screen flows into the World Map screen which in turn flows into the Game World screen. Extra screens are displayed depending on whether one off missions are selected or a campaign is in progress. It’s definitely not a complete drawing; the three adjacent Game World screens probably need a container box around them and there are no supplementary screen such as Settings, Leaderboards etc.

As mentioned in a previous post, for now it’s all about completing that first draft.

Blog posts: The Measure of Enthusiasm

Good ol’ Hacker News is a great source of procrastination but amongst all the rubbish that somehow gets on there (and by rubbish I mean articles that have nothing to do with technology i.e. Mandela articles, geopolitics, travel blogs (seriously?!)), there are a few absolution gems.

One of those gems is the notion that writing about (I don’t like the word blogging) your project is one of the best ways to stay enthused. I can’t even remember the rationale behind it but I can guess that it has something do with:

  • Bringing clarity of mind by going through the process of putting chaotic thoughts to writing.
  • It’s a great way to show off work that you’re doing to your friends or, if you get lucky, a much wider audience. The feedback loop gets the creative mind excited.
  • Each post is like this little piece of marketing (and programmers aren’t typically the best marketers).
  • The idea that each post is like this extra (non-code) commit to your repository.
  • Writing about what you are doing keeps you focused on individual tasks. Instead of thinking “I’ve done all this work, what should I write about?” it will be, “What should I do this week so that I can write about it?” Knowing that progress is being made always helps the self-esteem.
  • It’s always fun to look back and reflect on how far you’ve come.

The last point is quite important to me. Sometimes I wonder where the hell my 20s went and I need to dig back up some photos or think really hard to account for that entire decade of my life. The same can be said of software projects. Mobile Assault feels really dated now but upon reflection there is a sense of satisfaction in how much we created; the game started as a PSP hack and turned into a 25+ mission PSP/iOS game in English, French and Italian with graphics that really pushed what could be rendered on a Homebrew PSP system. Historical screenshots through the versions are a great reminder of some of our milestone releases.

So this is why I’m endeavoring to write something every week about Failed State; I’m going to create the modern day journal of all the adventures and misadventures. Come October, which I’m optimistically targeting for release, I can look back and reflect on all the work that’s transpired yet during the journey, share progress with friends, colleagues and the odd random stranger who happens to stumble across my site.

New Game Kick Off

It’s been a lethargic last 4 months from a personal project point of view. I dabbled in some web based languages just to scratch an itch but have come to the realisation that what I really want to do is get stuck into this map based war game. I’ve been thinking about it for years, years because time flies and suddenly I’m a lot older, more of the house is paid off and my face is not looking so 20 something any more (though strangely I’m the fittest I reckon I’ve ever been courtesy of me trying to overcompensate for being a desk-jockey during the day).

But I digress. The point of this hacked together post is to finally kick off my new game project which I’m probably going to call Failed State. I’m pretty confident that that name is in the clear for iOS and Android but I do notice that there is an open source project using the name. And here I was thinking I was being original.

Time: Enemy no. 1

All part time code warriors fight time. That cursed 7-8 hours of sleep required to maintain one’s sanity means that there is about 2 hours max per evening to hack something together and that’s on the proviso that the screen at work hasn’t sucked the soul of enthusiasm. Going to the gym frees the mind somewhat, although that sacrifices another 60 more valuable minutes.

And where am I at with Failed State? Well, I have a rough ‘world’ being rendered using pre-downloaded Open Street Maps data of Auckland. Cool huh? Not that that makes a game; I’m miles from a game and that’s why I need to devise a strategy. I need to know what the heck I’m doing and how to go about doing it.

Program like an author

You can’t edit what isn’t already written down.

I can’t remember the exact words but essentially the idea is that, as a writer, you just have to keep writing and writing despite the likelihood that what you’re writing could ultimately be edited out. The important part is that something existed to be edited in the first place. There’s no such thing as a perfect draft.

The same thing can be said for a game project and I’ve come to the realisation that that first pass is not cutting code; there’s a quicker way of actually getting to the end of that first draft.

What I need is drawings, mockups, ideas; I have to flesh out the entire scope. I have to actually make a game on paper first. I’d love to be writing that in the past tense but the reality is that despite having drawn a few things, I’m nowhere near the finish line. The process then raises even more questions about game play. Good. That means there is less chance of coding myself into a corner.

I’ll admit that I’ve been a little guilty of spending too much time doing my OSM map importer. Sure, it’s work that had to be done and understood but it’s a slow way to get to the finish line; a slow means of doing the first draft. That being said, it’s been great for show and tell with the guys at work. My sister says it’s too dark.

Auckland CBD (landscape)

Balsamiq Mockups

After paper sketches will probably be the digital equivalent. Balsamiq Mockups seems the perfect way to bring order to my mass of sketches. The good thing about Balsamiq is that the output still looks like a rough prototype; it will be my second draft.

Planning for AI

I haven’t even dared to think too far into this. I need to make some decisions trees or something. Ah… so much to do.

Everything else

Scope! What is the scale of the game? Individual units like Command & Conquer? Squads of infantry like World in Conflict? Grand strategy like Civilisation? Touch controls like Autumn Dynasty? Airstrikes? Reinforcements? Is there base building? Air units?

There’s so much to decide. I kind of know what I want but that’s why these paper mockups are so important. From them I can get a sense of scale and scope and how much work will be required to get to the end. Multiplayer? Doubt it. I’d love to finish something by October and I have to cut as much scope as I can to make an entertaining game.

Learning New Languages

I haven’t done any personal projects in a while. Trying (again) to learn Spanish and also going through the process of trying to throw out or sell as much stuff (books, CDs, marbles, clothes, old uni notes, hard drive content; you name it) as possible, strangely takes a lot of time away from anything.

There are two projects I really want to do. One is a game project that I started a few months ago and involves Unity3D (finally) and Open Street Maps data, the other is some kind of web app using the latest web technologies out there; it could be JQuery, GoLang, node.js or AngularJS. For a long time I’ve always wanted to do a music related web based app, but perhaps it would be best to merge this game idea into the web app. Either way, there’s stuff to learn.

My day job is with C++ and that language is old. It takes a long time to do anything and to do anything safely (i.e. bug free). Combine that with having to work on an old code base (5+ years old) that has had a 50+ plus devs working on it who having various levels of ‘giving a shit’ and you can imagine it not being very fun to work on. There has not been a test case culture so there’s no way of knowing if your new piece of code is going to break something and the version of Qt that we’re using is too old to take advantage of the new UI templating and the tests that go with it.

It’s not so much fun and is the reason why I try and placate myself by making personal projects (if I can dare to look at a screen after a day of work).

The web dev world fascinates me. They make pretty things and always seem to be on the bleeding edge of technology. It all seems more modular and giving users a new version is just a few scripts away. You don’t see that much is the C++ world, especially with embedded. So this is why I’ve been meaning to look into these web things and try the modern approaches to ‘making shit happen’.

I started with node.js and made some callbacks happen. That was interesting; I hadn’t done javascript in ages. Then I started with GoLang and made a parser for a flat database file (from some music app). That was certainly different. I liked how the character encoding is built into the language but how the language is structured is pretty strict, which is strange to me.

I played with some jquery at the fantastic Try JQuery website and then realised later that it’s more suited to web sites, rather than web apps. Oh well, so I’m now in the process of working my way through the AngularJS ebook. As soon as I read about the $emit and $broadcast event propagations, I can finally articulate why reading this stuff is such a great idea. Qt uses signals and slots and I’ve been involved in using a project that uses global broadcasts of messages across threads. Now it’s an opportunity to see how something is ‘the same, yet different’. Will AngularJS provide a better implementation for passing messages and data about?

If you don’t know about it already, Packt Publishing is a fantastic source of reasonably inexpensive computing related ebooks (or published copies if you so wish). If throwing away so much of my stuff has taught me anything, is that books = clutter. I wish I could just digitise the lot because they take a lot of space. I have 3 boxes of sheet music filling up a cupboard! It would be great if all that was digitised, although, a few of those books almost seem like collectors items. I love text books (especially ones with a decent index), but I just can’t see me using that Artificial Intelligence: A Modern Approach, second edition by Russell and Norvig any time soon. (Hey look, I just found a scanned version from a university site)

Anyway, Packt just did an awesome $5 ebook sales so I got an AngularJS, Unity Shaders and a Unity Multiplayer ebook. Sweet.

So now it’s time to finish this brain dump post and get back to the coding.

Hello Bitbucket

When I roped in Justin to help develop Mobile Assault, we decided to use Assembla as our host for the code repository. It seemed like quite a good deal at the time. It was $2 per user plus $2 for every gigabyte of data, but thankfully we could pay in fractions of a gigabyte. All up we were paying about $5 US a month, which was pretty good considering that Assembla also provided a wiki and bug tracker.

Things change, and suddenly Assembla isn’t as appealing now. I’m currently paying $2 per person per space, where each space is a separate code repo with wiki and bug tracker. To a computer system you’d think this is not that big a deal and wouldn’t justify extra cost. What’s 100 repos for 1 user that only consumes 1GB? It seems like nothing really in the grand scheme of things, but no. Of the two projects, both of which I’m a part of and the one that Justin is, costs $6 and there is $1 worth of data.

That’s what it’s been since about 2009/2010 (I can’t remember), but my “legacy plan” (as they call it) of $7 a month is now supposed to cost me, wait for it…

$19 a month!

How the heck did that happen you ask?

Well, it turns out that the new cost is a cold, hard $19 a month for:

  • 3 projects
  • 15 users
  • Unlimited repos
  • 6 GB

That a lot of stuff I don’t need. The next step down is a 1 Project, 3 Users 1 Repo 500MB plan, but that’s pretty useless if you want to make further small projects under hosted source control.

(On a side note, Assembla is actually free if you have an open source project, meaning your repo is public).

Well, Assembla, your pricing balls-up has surely cost more customers than me. Heck, I was paying! It’s not like I was scrounging a free service out of you.

Bitbucket to the rescue

After some research, github proved to have about the same price as my “legacy plan” with Assembla, but after more searching I found Bitbucket. The price? Well, it turns out it’s free for what I need it for!

  • 5 users with unlimited private repositories (huge win!)
  • Unlimited data (it seems)
  • Wiki and issue tracking tools. The wiki is also under source control, which is useful

Even better, Bitbucket has a slick modern website that is low on clutter and easy to navigate and use. The migration was very easy. I was able to import my three Assembla repositories by merely providing Bitbucket with the url of each git repo, all within the browser thus no messing with files on my machine.

Assembla – the evolution

Don’t mistake this post as hating on Assembla. I think part of what happened is essentially a change in business model. About 3-4 years ago, their service was quite simple and straight forward. They offered exactly what an Indy developer needed; a source repo, bug tracker and a wiki.

As you can see from their current product offering, there is a lot available. This makes good business sense because enterprise level customers are very lucrative. The problem is that during this evolutionary process, there has become a gap in their pricing model to cater for small Indy teams of 2-10 people. Disk space is super cheap these days, so the only appropriate pricing metric is features and to a far lesser degree, the number of users (because of simultaneous connections to servers, I suppose).

$19 US is peanuts to a team that is actually making lots of money, but when the Indy dev is really just a hobbyist who is making enough in sales to pay for coffee, then $19 increments starts to mount up.

Competition at its finest

It’s great seeing github and bitbucket offering an alternative to Assembla. Now I just have to get my team from 2 to 10 people to justify the $10 a month plan. If I was a part of a 10 man team, I’d gladly pay that, but at the moment it’s just me. Coder-loner :|

Feedback => Mobile Assault 1.8.6 for iOS

One of the rewarding things about making software is getting positive and constructive feedback. Even if users report bugs, it shows they care enough to take time away in order to let you know.

Feature requests are sometimes a little depressing because most of the time the devs want those same things too, but for all sorts of reasons can’t deliver them any time soon. That being said, when on that rare occasion you do have that very desirable feature at the cusp of release (and unbeknown to the users), then you get to revel in their excitement when that release hits.

Mobile Assault can’t really deliver on feature requests any more, but it’s great to get feedback from users, even if it is to report a bug. Normally the bug report is prefixed with how much they love the game, which is great for the self esteem, so naturally it gives extra impetus to go fix that bug.

That’s what happened a few weeks ago when a user reported that one of the Mobile Assault missions wasn’t able to be completed. Whoops. It had been that way for as long as I can remember.

I remember Lucas Arts’ Tie Fighter had a few issues like this, when you’d spend 15 minutes dodging X-Wings and A-Wings and blowing stuff up, only to get the mission in a state where there weren’t any enemies around and the mission objectives were only partially complete. Mmmm. Then you’d hope that after spending the next 15 minutes doing the exact same thing, that the exact same thing didn’t happen again (which seems like a recipe for wasting one’s time).

Anyway, that’s what happened to a Mobile Assault mission, but it’s now been resolved. That and one of the impossible-to-achieve bonus/secret objectives, whatever that may be ;)

Unfortunately all this coincided with some Turkish researcher/hacker compromising the Apple Software Developer site. That resulted in all the developer tools being taken offline for almost a month! What a nuisance. Even worse for me, it turned out I had to review a license agreement in order to download a new provisioning profile on account of mine having expired. I needed that to test Mobile Assault on the device. My luck as it is, the last things Apple brought online was the license page.

Thankfully all that misadventure is over now and Apple had the graciousness to extend all our developer licenses by a month. At the end of it all Mobile Assault 1.8.6 is available for download.

Mobile Assault 1.8.5 for iOS

It wasn’t my intention to make another Mobile Assault build (unless I finally get the Spanish translation done), but I happened to stumble across an App Store comment that said the last mission wasn’t loading.

Whoops.

That’s now been resolved so there is a new release available for download. Yay.

Right, now back to work on my other project(s).