[iOS] Viking Chess! - 3D Asymmetrical Strategy - Available Now!

Update: Viking Chess! is now available for free on the App Store.

In April 2014 I read an article about the ancient viking board game of hnefatafl. It sounded intriguing, and I thought I’d take a stab at making the game in Unity. After a year and a couple months of off-and-on development, innumerable setbacks, and plenty of personal life distractions, I’m finally ready to share my progress.


Viking Chess! main menu

History
After building a prototype in the web player, I realized how well-suited the game would be to mobile devices. Much of the early time was spent learning about the game rules and translating them into programming logic. Since different variants of the game used different sized boards, I wanted to build the board dynamically and offer alternate layouts and rulesets.


Prototype for what, at the time, was to be called “Tafl - Viking Chess”

I got to work creating the game proper, translating the controls to touch input, adding a proper camera, and modeled my first pieces in Blender. Since my initial version was made using UnityScript, I also translated all my code to C#, which was a great learning process. I was very happy with how it was coming along until my wife pointed out how much the black pieces looked like penises. Whoops.


First iOS build. Ignore the penises.

I also initially wanted to support cross-platform play, but multiplayer seemed like such a daunting task, and I was having trouble wrapping my head around the various frameworks out there. I ended up deciding to focus on one platform at a time, and decided iOS was the best market. I found a cheap plugin called U3DXT that provided access to the Game Center API, but it turned out more problematic than anything. A couple months in, the plugin developer seemed to have stopped supporting their work and disappeared off the grid, while I had Xcode errors relating to their plugin I couldn’t figure out on my own.


Cleaning things up. Except for that menu button… Eek.

After abandoning the project for a while, I eventually came back to it and attempted a fresh start by deleting U3DXT from the project entirely. I focused on the core game a bit more and added new black pieces, a fancy board trim, and got rid of the placeholder textures in lieu of a nice flat appearance instead. I actually liked the look of this enough that I wanted to keep it for the final game, but figured people would find it too cheap looking, hence the current visual style. I would like to add “basic mode” as an option, though, as it performs great on older devices.

I took a stab at implementing Google Play Games to handle the multiplayer, with the benefit being it’s cross-platform. What I discovered, though, was that the Unity plugin version of GPG is severely limited at this stage, and it became clear it would provide more obstacles than it would benefits. I finally bit the bullet and purchased prime[31]'s Game Center plugins, and things have gone swimmingly since then.


New graphics! Now with 100% more Unity 5!

I then went crazy making the game look “good” and “Vikingy”. The astute observer will notice I borrowed a large number of assets from the Viking Village. I purchased music tracks, pieced together a UI (that I currently hate) and started ticking off the features I’d been putting off for a while. One of my favorite is toggling perspective on/off in game. Orthographic view is great for smaller screens, and having the option to switch on the fly (by double-tapping two fingers) should let people see which view they prefer and enjoy either easily.


Ortho view without opening a menu!

One of the things I realized was that this game is pretty niche. While similar to chess (it actually pre-dates it by a few hundred years, I believe), it’s different enough to be confusing if you just jump right in. The game will show you each move where you can and can’t put your pieces, and which pieces you’ll capture with your move. There’s also a written version of the rules available from the main or in-game menu.


Dragging a piece shows its valid moves. Helpful to those of us who were never vikings.

I’m definitely discovering how the last 10% of a project is 90% of the work. Every time I launch the game I discover a new bug or discover something I thought I fixed isn’t quite done. I’m also second-guessing a lot of my usability decisions (like how many taps before you can get into a game)… Stuff like that. Last year, hesitating because I wasn’t sure what the right decision was almost prevented me from finishing the game at all, so I’m learning to just do something and worry about fixing it later if I can. It may be more work, but it also may be just fine, and that’s a good risk.


Confirm your move of this highlighted black piece to capture this (faintly) highlighted white piece.

Where you come in
I’m getting to the point where I want to start testing for real. I invited several friends and family to get in on the beta, but they all seem a bit busy and only one of them has even installed the app. :sweat_smile: I’m thinking I’ll find more like-minded people here who are savvy enough to figure out the quirks of working with Test Flight and know what kind of stuff to give feedback on and which is obviously placeholder.

If you’re interested in playing the game in its current, breakable state, send me a PM with your Apple ID email address and I’ll add you to the batch of tester invites. It’d also be great if you could provide me info on what kind of device you have and other relevant information (“I’m colorblind”, etc).

If you’re not interested or not able to help with testing (sorry, Android users!), I’d also appreciate any feedback here, and I’d be happy to answer any questions about the app, the development process, or code tips for your similar project.

Thanks for reading! Stay tuned for more!

Me entirely… :smile: I wish I could help test!

Interesting take on implementing a board game in a Unity App. And I have to say, dem graphics! How well does that run on current-gen devices, out of curiosity?

Sorry, man. I was actually an Android user when I started the prototype, and made the jump with the iPhone 6. I do really want to release an Android version after I finish with iOS, so I’ll get around to you eventually. :slight_smile:

Thanks for the compliment! There are a few other tafl games on the App store, but they’re all 2D and pretty plain. If you search for images of some of the custom boards people have crafted, some of them are just beautiful, and I wanted to bring that feeling into my game as well. Plus, with an eventual feature I want to add, the pretty graphics will really help immerse people, I think…

It runs perfectly on the iPhone 6. The only other i-Device I have is my iPad Mini Retina, which I was doing all my testing on before I got this phone. I had no performance issues until I started going crazy with the environment, lighting, and camera effects. Part of my optimization process will be to disable the effects one at a time and build, and see which offers the best performance improvement. That, or figure out how to read the Profiler.

1 Like

Awesome. :slight_smile: It’s sort of the other way around with both project’s I’m working on, although that’s mostly due to the fact that I don’t have a mac… :smile:

EDIT: Read thew other bit just then, I can help profile it; just profile the game and screenshot it here. :slight_smile: I will see what I can find.

One thing I can tell you is that although I have only had the profiler since Unity 5, i definitely find it a useful tool to measure android performance. :slight_smile:

You set up in test flight? PM me I can test on 4S and 5.

  • John A

Thanks, @JohnnyA ! I am using Test Flight. iTunes Connect has been pretty wonky the last few days, so making changes and uploading builds has been a bit of a pain. Plus, I think they’re pretty backlogged with reviews now, so that doesn’t help.

What I plan on doing is collecting a group of interested people and then inviting them all at once. I also want to make sure I finish integrating Leaderboards and Achievements, since those (along with just Game Center itself) are the things I’m most worried about testing. And then, of course, I need a proper system for tracking all the issues people point out. So it may be another week or two before you see an invite, but it will come.

Another thing I should point out… I’ve currently been building for iOS 8. There’s not really a reason for it, I suppose, as everything I need is available in iOS 7. So it would also be beneficial to know what OS version any interested parties are using.

I have a 6 plus, currently ver 8.3.

That’ll do nicely. Just to be clear, you want in on the testing? Don’t want to sign you up if you were just bragging. :stuck_out_tongue:

I have about a third of the achievement detection logic built in now. Just need to figure out these fangled leaderboards and I’ll be ready to push out the next build to Test Flight, at which point I’ll invite anyone who has signed up to this point.

Yes, I will help. No, not bragging. It’s actually quiet unwieldy sometimes. On occasion, I kind of wish I had a smaller one.

Those iPhone 6’s are massive things, aren’t they? :wink:

I would gladly help, but I’m not an apple guy.
I love the work that you’ve done to set the ambiance though, very well done.

I use andriod now but I have an old 4th gen iPod touch still lying around, since its an older OS what OS does your game support.

Also I love the graphic style, looks very vikingy :wink:

Thanks for the kind words! I’ll keep you informed of the eventual Android release. :slight_smile:

Thanks a bunch! I can’t take too much credit for the graphics, as a lot of it was done by the talented people at Unity. I’m happy with the board and pieces and how they blend, and of course, the tasteful lighting of the scene. :stuck_out_tongue:

I’ve been building for iOS 8.0. Testing on my iPhone 6 and iPad Mini Retina (first retina version). It plays great on the iPhone, and with SSAO and antialiasing turned off, runs fine on the iPad Mini. I’m a bit afraid to try it on anything older, but if you’d like to give it a shot, I’ll definitely give you an invite and we can see!

I’m also hoping it’s just the fact that it’s a debug build, but the app seems huge at ~325MB. No idea where this is all coming from, as the Editor log indicates my assets coming to about 60MB. I was even considering publishing as arm64 only to at least trim it down to half that size, but… we’ll see.

Anyway, just submitted version 0.2 to Test Flight. I’ll send PMs to those who’ve expressed interest and get your details. If anyone else wants to join in on the fun, it’s not too late!

Edit: @RavenOfCode , for some reason I couldn’t send you a PM. PM me the following info if you’d like to participate:

  1. AppleID email address
  2. What device(s) you’ll test on
  3. iOS version on your device(s)

Thanks!

Only had a moment to test out v0.02. I played in couch mode. Everything ran smoothly. Instructions were clear and not overly verbose, which I particularly like.

The King piece is a little difficult to distinguish on my screen. This is especially true if I pivot the camera angle to be 100% top down where all perspective is lost. Maybe tinting the Kings top a little, like a crown, would help? The overall darkness on my screen made things difficult to see as well.

This might be intentional but I figured I would point it it just in case; game loses track of unconfirmed moves if you navigate away from the game. This occurs either when switching to another app and then back or checking on notifications (swipe down from top of screen).

Is it considered a valid move for a piece to move into a square that would have been a capture condition during the opponents turn? Example, O moves between two X’s, O is currently safe.
X
<— O
X

This is a great point. And I love the idea of giving the King a crown. Added to the To Do list. The brightness issue is a bit tougher, since users can adjust brightness themselves. Maybe higher contrast would help, but I don’t want things to get washed out or be too harsh if they have their brightness settings up higher.

I considered this, but was scared to mess too much with how I was currently saving game state. I figured as long as it wasn’t breaking your turn and you could still move your piece back to where you wanted it, no foul. Did you find it particularly annoying or anything, though?

That is a valid move, and the O piece would be safe. I should indicate that in the rules, though, so it’s clear to players that’s how the game works.

Thanks so much for the feedback, @SpectralRook !

You can disregard my brightness comment. I have been using my phone with the brightness set pretty low for so long that I forgot I had done it. Everything looks great when the phone’s brightness is set appropriately.

I wouldn’t say it’s annoying. I expect most people playing the game will be fine with it. There might be some initial concern that the game reset since the camera realigns and the music restarts. Not sure if it’s worth implementing, but a Continue screen where the player needs to acknowledge that they want to pick up where they left off might make the transition easier. I don’t expect it will be a big deal though.

Another question continuing along the lines of the previous example. O moved into the safe position, being surrounded by X’s on 3 sides. Then on X’s turn, an X is moved to completely surround O. Currently O is still safe?
(.'s are place holders so things align.)
.X
XO <— X
.X

I tried to aim for the brightness at the middle setting, but it shouldn’t become so dark at a lower setting that it impedes your ability to play, so I bumped up the brightness a bit in-game anyway. I also gave the King a crown.


It’s not much, but it helps a bit when viewing from the top. My wife suggested making the top of the piece all gold. Thoughts?

My sister discovered an even worse bug tonight. While playing an invite game, suddenly the match seemed to reset, we switched teams, and our names were marked incorrectly in the info panel! I think her daughter tried to invite me to a game while already in a game with me… But I’ve got to look into it more.

In the situation you described at the end there, O should be captured. One, because he’s flanked on either side, and two, because he’s surrounded. I did spot a capture bug tonight in my sister’s game, so I’ll see if I can recreate the situation you described as well. Any idea on how to recreate it?

Again, I really appreciate your time and feedback.

I think the crown is a good improvement. It will help having the gold color distinguishing enough to be clearly the King.

I haven’t quite worked out what series of events I took to get into this situation. I’ve tried recreating this board a few times and was unable to do it. Of course the screen shot comes from the first attempt I made just to test it and now I can’t recreate it. I’ll try to spend a bit more time tomorrow. I’m wondering if it’s a combination of the testing I was doing when navigating away from the app with unsaved moves.

This is a really tough thing to isolate. I actually hate the way I’m handling local games when switching in and out of the app. My sister had pointed out that when she was playing a local game and checked a text, she came back and the game was gone. So I threw in a save-on-lose-focus, load-on-focus kind of thing, but it does that camera shift and music jump, as you pointed out.

I think I’m going to change it to work more like online games: the game state will be saved after each turn. If you switch focus on the app and come back in time for it to have not shut down, it’ll just pick up where it left off. If it closed, you’ll be returned to the main menu, but resuming the saved Couch Play game will take you to where you were, anyway.

A handy feature to have would be an undo move option that works all the way to the beginning of the game. Even if it’s just for debugging. Though, I imagine someone might like an extension of that feature to include the ability to watch a replay of the game. But just for debugging, something easy might be to store moves in an array and display them like a log.

Another feature players might like is to lock the camera. Sometimes when trying to move a piece the camera shifts because I didn’t touch the piece I intended. I imagine this is more problematic on a smaller screen.

And I just did it again but of course I’m not able to recreate it when I do what I think was the exact same moves in a new game. I don’t recall having navigated away from the game during this session.