Announcing the new baby AND the new game!

Hey again. In case there are readers that are not also Twitter users, I wanted to give some updates as to what has happened lately and what I am doing currently. :)

Oddhop swamp theme

So first things first: my wife and I had a baby daughter (our third!) on May, which is nice but I do think that three kids is quite enough! :D Especially with all girls; sometimes I get tired of all this Disney princess and Hello Kitty -stuff.. Anyways, while the new baby has obviously affected my game development work, I can reveal that I am indeed working on a new game: puzzle game named Oddhop! I'm actually developing it with my friend, he does (most of) the game design and I do the usual coding, graphics and so on. Personally I'm rather excited about this little game, and to the best of our knowledge the gameplay is quite original — which to be honest is sooo refreshing after countless match-3 games! :D On the right is the very first screenshot of Oddhop (swamp theme pictured). I hid the (temporary) UI and some of the graphics are not final (the rocks, especially), but it's better than nothing, no? :)

The game started as a prototype back in February 2014 and we've iterated on it ever since. Now we're slowly transforming from a proto to an actual game. The plan is to get the game out by the end of this year, but that depends on various things (including my day job situation). Definitely during 2016 at least. Most of the gameplay elements are in place — we actually thought we had locked the features down but still a couple of more made the list — I think there's two tricks left to try and maybe after that the design is locked.. ;) We are quite likely to have an open beta testing period when the game is at that point, so keep an eye out for beta requests later on. :) Current plan is to make the game paid on iOS (yes, it's of course coming to iOS devices despite my old rantings! ;)) and free but ad-supported on Android (with the option of removing the ads with a single purchase). Nothing is set in stone yet, though.

Oh, and here's an image of the new baby! :)

The new baby girl!

And yet another website change!

Another blog post, another website update, right? :P I grew tired of fighting with WordPress in Google App Engine, but actually the main reason for this change is that the CloudSQL bills were quite hefty! Since WordPress needs the database for pretty much everything — even with extensive caching — the CloudSQL instance has to spin up almost every hour of the day. So it ended up running 24/7 and that costs more than I'd like for a simple site like this.

What I did was ditch WordPress and switch to an entirely static website. I lost some dynamic features like the search, and I didn't bother to implement categories for posts, but I gained speed and simplicity. :) Also the RSS feed is currently not implemented, ping me if you need it and I can add something. Anyway, I wrote a custom tool that generates the site from a few templates, and App Engine just serves those static HTML files. The generation takes only about 2 seconds, which is nice. You might wonder why I use App Engine for 100% static content? Indeed the site could be served from a CDN (speaking of CDNs, I added one for the images on here, go me! :)), but I'll reserve the option to do some dynamic stuff later on, should a need arise. So let's see how this works — personally I'm very eager to see some savings on my hosting bills! ;) I might do an update later if anyone is interested.

Oh wait, actually there's the new theme as well! You did notice it, didn't you? I wanted something simple and responsive, so I took Bootstrap and quickly whipped up something. It's quite basic but shall do, for now.


Website migrated to a new server!

Hello, world. If you see this, you are reading this from the new server, which is great. Notice anything new? Apart from the comments being powered by Disqus now, the font change (I grew tired of the previous serif fonts) and some minor tweaks, the site should function just like before, but only better. I have migrated everything from the old webhotel that would break down even under little traffic to the Google App Engine, so things should run smoothly even in case there is some heavy traffic going on. Assuming everything works correctly, that is. :)

Oh, do let me know in the comments if you notice anything broken that used to work before!


My thoughts on Unity

Long time no see, right? Just for fun, I wanted to write up some (initial) thoughts on the topic of Unity, the game engine. Not sure if I've mentioned it before, but I've been keeping an eye on Unity for years (since 3.x days I think), on the prospect that I might actually use it someday for my own games.

After spending way too long on making the general engine code for Jewels 2 (remember the engine consisted of 75% of all my code in J2, quite a bit of which I ended up not needing at all!) it occurred to me that maybe it's not the best use of my time if I actually want to make games. I have two kids, a day job and generally a lot less time to tinker with gamedev than I used to, so perhaps it should be spent not making engines, but games. And I don't even want to count how many times I've started building a game (engine first, of course) and actually ended up with an incomplete engine and no game!

With that in mind I decided finally to use Unity. Early this year I got back to my old day job of making learning games for children and conveniently enough we use Unity there too, so it was a great chance to actually use the thing. Before I had only tinkered with it, made a couple of very small prototypes.

Now that we've established why I wanted to use Unity, and I've actually used it for some time, I wanted to list (not necessarily in any particular order) some things I like and don't like about it. Nothing is perfect, after all. This is from an "old school" do-your-own-engines-in-C++ -perspective, so subjective stuff all around. Also goes without saying that I'm no Unity expert; I'm still learning to get into the proper Unity-mindset and finding an Unity-ish way of doing things, which often is vastly different from what I'd normally do as a coder. (Some of you may be wondering why Unity, instead of, say, Unreal Engine? Well I'll get to that in a bit.)

What I like about Unity

  • The Unity Editor: As a programmer I'm used to doing most of things through code, but after getting to grips with the editor centric workflow it is really good. It's very handy to place stuff in editor and especially to inspect things during gameplay, at runtime. The editor is also very extensible, powerful stuff.
  • Asset pipeline: It's great to have the ability to just drop a .blend or .psd in the assets folder and have it ready for in-engine use, (usually) without much trouble. You can also extend it with asset pre/postprocessors, very useful.
  • Prefabs: I think they're neat way to encapsulate and reuse things. They do have a fatal flaw… (see the other list below)
  • Component based: Component based programming is neat! I never got around trying that in my own stuff even though I always wanted to try.
  • C# scripting: After over 15 years of battling with C++; header files, fugly templates, const references, copy constructors and all that shit, C# feels like breath of fresh air. This is the main reason I didn't consider Unreal Engine that much; C++ feels cumbersome and counter-productive after spending some time with C#. Not to mention compile times, C# is much faster to compile. So in short: if I have the option of not using C++, I'll gladly take it.
  • Co-routines: Useful as hell; can't count how many times in the past I've had to add vars for various counters, polling when certain stuff should happen. In J2 I made an event scheduler that allowed rigging timed events, repeating or one-shot to happen, but co-routines make all that so simple I don't know what could possibly be better than them!
  • Cross platform: It isn't quite the "one click and your game is ported", but halfway in the general direction at least. iOS remains a painful platform to develop on even with Unity, since Apple doesn't allow JIT (Just In Time) compilation and code has to be compiled AOT (Ahead Of Time).. Do anything fancy and you'll find that it doesn't work on iOS without having to pull tricks like making dummy code reference all the types that would otherwise get missed during the AOT compilation.. But I digress, it's still whole lot better than spending all the time in Xcode.
  • Prototyping: Unity is excellent prototyping tool! I usually don't do much prototyping (does it show? :D), but with Unity I have and it's been helpful testing stuff without "officially" starting a new game project.
  • Powerful animation: Mecanim is quite powerful if a bit convoluted, and can animate almost anything. I still do lots of tweens from code, but I'm using animation for more and more things.
  • And finally… (I've saved the best thing last) — not having to write everything myself! ;)

What I don't like about Unity

  • Outdated Mono: Mentioning this is something of a cliché, but yeah better GC and updated .NET would come in handy. Luckily once Unitys il2cpp-project matures these problems should finally go away.
  • No nested prefabs: Suffice to say, prefabs would be super awesome if they could be nested and then updated properly. Maybe one day…
  • Magic methods: MonoBehaviour magic methods (such as Update(), OnEnable(), OnDisable(), etc.) feel like they should be inherited or implemented with various interfaces. What I'd like is a new ScriptBehaviour that has the basic methods to override, and bunch of optional interfaces for special stuff (like physics handlers). Or maybe user code could subscribe to events like this.OnUpdate += MyUpdate.
  • iOS development == shit: Sorry, had to add this here again even though I mentioned it in the above list. It's pain in the ass due to the AOT problems, hopefully il2cpp helps with these!
  • Shuriken scripting: Shuriken is a nice particle engine, but I'd like a complete API to all its features from code.
  • 2D still lacking: The (relatively new) 2D tools are great, especially the fill-rate saving tight mesh generation for sprite atlases is helpful for mobile devices. However, there are still some omissions that I'd like to see: automated HD/SD support for atlases, dithering for 16-bit sprites (quite low hanging fruit IMHO and would improve visual quality a lot, especially for Android where 16-bit is the default "compression"), built-in support for premultiplied alpha (must for doing additive and alpha blending in same pass), a way to control the tight mesh quality, etc.
  • Pricing: I think the Unity Pro-price is ok, IF it would include all the mobile platforms. As a mobile dev, having to buy 3X the Pro-price it's a bit too much for my liking. And Pro-subscription does not make much sense: you don't get to keep the license after you've reached the normal Pro-license value. If that was not the case I'd have bought the subscription months ago. Of course even though I complain, I still need those Android Pro and iOS Pro licenses eventually, so I'll just have to bite the bullet and buy them.
  • No source access: This is usually not a problem, but when things don't work as expected, for me the best way to debug is to look what the library/engine code does and actually expects. It takes a lot of the guesswork out of debugging, but I realize having Unity open source would probably not be possible with the 3rd party stuff they're using. Luckily some of the sub systems will be open sourced, such as the new uGUI. Speaking of which..
  • The mythical uGUI: Now the long-awaited uGUI is finally here, albeit in beta form. It's mostly great — and thinking back on how much time I spent building the GUI components, menu layout and transition stuff for Jewels 2 — I'm just glad there is a proper GUI in Unity! Still, have to admit I was a bit disappointed, there were quite a lot of bugs and strange omissions (no drag threshold!?) considering how long it was in the making.. Nevertheless GUI is a complex beast + it's much better than having no GUI at all, and I'm sure it will only get better when the bugs are ironed out and the system is open sourced.
  • Terrain: Old, clunky and very slow to load on mobiles. Don't use it myself but at work we've been battling with it more than enough.
  • Easy to freeze the editor: Granted, this is an user error, but if you accidentally make an infinite loop in code, you're pretty much screwed if you had unsaved things in the editor. :P Before I would just kill the game, fix the code and that's it. Now there's potential to lose some of your Editor-made edits, if you forgot to save.

So there. My initial impressions of Unity. I'm sure I forgot some points I wanted to mention, but I will update this later if anything worth adding springs to mind. No doubt using Unity more will reveal new pain points, but I still believe that it is better to use an engine (be it Unity or Unreal or whatever) these days, IF your intention is to make games and not to tinker with lower level mechanisms. And for me, personally, seems that Unity is a great choice. :)

UPDATE on October 6th: added notes about co-routines, terrain and iOS development being shit.


Gameplay footage from Jewels 2

Just a quick update: I made a (too long) video with some gameplay footage demonstrating the different game types in Jewels 2. It is a not-so-great promotional video, and only about 6 months too late! ;) Take a look nevertheless, if you haven't played the game and the static screenshots just won't cut it! :D