Saturday, March 29, 2014

Armoured Engines: A Game Takes Shape

Armoured Engines is now out of pre-production and in to full force development. The team has been cracking away for the last week and it's time for a development update!

Movement


Basic train movement was set up right away, followed by a scrolling background and foreground to give a feeling of constant speed. The train can be moved back and forth via dragging, with a nice acceleration/deceleration action that allows the player to "fling" the train back and forth along the track. Bounds were set up so the train couldn't be thrown off screen. While more fine tuning is needed, this mechanic is already feeling really nice and fun to control.

Cargo Flinging



The most basic method for dealing with enemies in the game is to fling the cargo you are carrying at them. This week we implemented cargo flinging, and our first cargo type: coal. We've got plans for lots of zany cargos in the future, some which weaponize better than others, but for now we'll be moving on to other features before adding more types.

Enemies



We wanted to get an enemy into the game right away to test against. We chose the Mortar as our first enemy as it's movements and AI are very simple - it simply scrolls across the screen in the background and fires mortars into the air, which must then be dodged or shot down as they fall onto the train. We also created a health system for the train, which sets each carriage up with a small pool of health. This means that each carriage can be lost individually - but if your engine is destroyed, the level is lost and your train limps back into town empty-handed.

Playtesting

We've been forcing the game on our friends and colleagues every chance we get, and have already gained many valuable insights about our control schemes. It's always surprising to see how someone else will attempt to control a game. One of our testers used much longer swipes when flinging coal, which we hadn't expected at all and had to re-program to account for. Others attempted to swipe higher or lower on the train than we were expecting. We learned a ton and will continue to test regularly with as many people as possible.

Overall the reaction to our game has been really positive, with many people asking when we'll be showing more of it. If you are one of those folks anxious for more Armoured Engines, you can follow us on Twitter, Facebook, Google+, or Tumblr.

Next Week

Next week, we'll be adding weapons to the train and improving the way we represent the train in data, so it can be loaded into different scenes and customized. We'll also be doing design work for many of the game's enemies.

Saturday, March 15, 2014

Armoured Engines: A New Project Begins


I am very happy to announce that my small indie team, Bounder Games, are working on a new project. I have come to think of it as a "steam punk western epic", on mobile devices, called Armoured Engines. In the game, you take on the role of a train engine owner who travels between towns in the wild west, protecting the train and making important deliveries. Bandits, evil robots, hostile monsters, and more will attempt to cripple your steam-powered locomotive. Luckily you have at your disposal an arsenal of weaponry with which to fight back. The game will make use of intuitive touch control methods, different for each type of weapon. Some will be mostly autonomous while others will be more manually controlled. A big part of the game will be customising your engine, choosing what and how much cargo to take and where to travel. You can also hire helpers, which provide more functionality for your train (repairing damaged cars, boosting weapon performance, etc). Finally, there will be an overarching story linking all this together, of a grandiose style suitable for something dubbed a "steam punk western epic".

Meet The Team


Sarah Herzog
"Mama Bounder"
Speciality: Leadership, Programming
Other Talents: Art
Background: Sarah has been, at various points in her life, a writer, singer, artist, drama teacher, martial artist, chemical engineer, nanotechnology researcher, engineering education researcher, science teacher, tech support grunt, quality assurance monkey, and finally, most recently, a game programmer. So many hats leads to only one thing: indie game development.




Roy Stevens
"Bounder Bug"
Speciality: Writing
Other Talents: Art, Design
Background: Roy is a student at prestigious game development university Abertay. He has loved games for as long as he can remember, and has always wanted to have a hand in making them. Like the rest of the team, he has a wide range of talents and excels when allowed to have a hand in everything.




Kyle Drysdale
"Song Bounder"
Speciality: Audio
Other Talents: Art, Design, Writing
Background: Kyle is a recent graduate from a creative audio production degree at Abertay University. He shares a deep love of games with his team-mates, and specialises in making awesome music and SFX for games. However, he also is a talented graphic designer, artist, writer, and game designer.





The Plan

The Bounder Games team has big plans. Someday, we want to make amazing, long-term games that will take a year or two to develop and will have a crazy amount of depth and longevity to them. However, to get started, we focused on choosing a game idea that could be developed in only a few months - our target release date is September 1st. To that end, the team met and each of us pitched three ideas, all with the goal of promoting our style while meeting this time constraint. Armoured Engines was the unanimous choice.

Concept mock up of part of the world map

Now, we work. For the last week, and continuing into the next week, we have been in pre-production. This means, for us, creating concept pieces and mocks of how the various stages of the game make look, planning what features will be in the game, and working on story and characters. After that, we dive head first into production. It will be difficult, as I have a day job and Roy has university. We also have a couple planned trips out of the country later in the year that will disrupt our work flow. But despite all this, I am confident that we will be able to deliver a high quality game by September.

I will be posting regular development updates here and on the team's many pages. If you've got any social media accounts, it would be a big help to us to give us a follow/like, or, if you are feeling generous, a share. Our accounts are:
Drop by and say "Hi!", and look forward to our future updates!

Tuesday, March 4, 2014

Unity Tutorial: Scrolling Ticker Text

As I work more and more with Unity, I've begun to learn tricks and tools that I'm guessing would probably be useful to others as well. In my most recent game, Bubble Market, I created a scrolling ticker text box at the bottom of the screen to display active events which were effecting the game at any given point in time. This kind of scrolling text is useful as a general UI element, so I made sure to keep the script generic enough to be re-used. It also occurred to me that these sort of tools may be useful to others as well, so I thought I'd write a quick post explaining what I did, how I did it, and providing the script as an example.


Step 1: Scissoring

The first thing you need to create a scrolling ticker text object is a graphical effect known as scissoring.
Scissoring: In computer graphics, the deleting of any parts of an image which fall outside of a window that has been sized and laid over the original image. Also called "clipping."
There are some more advanced ways to create this effect in Unity, but I went with the easiest route: using a separate camera to render the scissored object. If your scene has a lot of scissoring with different areas going on, I'd suggest looking into other methods, but for simple and limited applications, the camera method works just fine.

To apply this technique, first set up your object without scissoring enabled. Make sure it's large enough that it is easily evident whether your scissoring is working or not. For my example, I used a long test string in my ticker text mesh:


Before we set up the camera, you'll need to change the layer this object is set to. In the upper right of the object's inspector window, click the Layers drop-down and choose to create a new layer. Call it something like "ClippedObjects". Set your ticker object to the new layer.

Now, in your scene hierarchy, duplicate your main camera. Call the new camera something like "Clipping Camera". Make sure these two cameras are in exactly the same place in the game world. You'll need to make several important modifications to the cameras:

  • Clear Flags: On the Clipping Camera, change clear flags to "Don't Clear".
  • Culling Mask: On the Clipping Camera, change the Culling Mask to only have ClippedObjects (our new layer) selected. You'll also need to modify the Main Camera's Culling Mask, so that ClippedObjects is NOT selected. This will make our new camera only render this layer, and our old camera ignore it.
  • Viewport Rect: This is the actual rectangle where the clipping will take place. On the Clipping Camera, define it to whatever you like. You should be able to see the camera's bounds in the scene, and the effect in the camera preview and Game panel.
  • Depth: Make sure the depth of the Clipping Camera is higher (more positive) than the depth of the Main Camera. This will ensure the Clipping Camera is drawn AFTER the Main Camera, which is what we want.
If you run the game, your object should now be clipped based on the Viewport Rect you set on your new camera.


Step 2: Scrolling

This was the first part of the effect I was after, a ticker text where the text disappears as it scrolls to the side. Now for the scrolling itself.

The actual scrolling is just a simple change to the object's transform each frame, I won't bore you with that. The interesting bit was figuring out when the object was no longer visible, and figuring out exactly how far to the right to place it so it can start scrolling again.

While I could have simply used the renderer's isVisible property to tell if it was off screen, this wouldn't have been enough for the second part of the scrolling: moving it back to the other side of the screen. Instead, I decided to use the renderer's bound property, which measures the bounds of the object in world coordinates. I set up minimum and maximum x limits for the visible range of the object, which correspond to the viewport I set up in Step 1. I saved these limits as data members in the script.

With this set up, I can easily tell when the object has moved off screen to the left by comparing the renderer bounds of the object to my saved x limit:


ResetScroller() is a method which moves the scrolling text to the right, just off screen and ready to start scrolling again. We determine where to place this text in the same way that we determined when it was off screen: using our scissor limits and the object's renderer bounds:

This first calculates the width of the object in world space, then edits the object's x coordinate to be the maximum plus half it's width. This is because my text object is centre aligned - however, if your text is aligned left, you won't need this step.

If you create a simple script and apply the method described above, you should see something like this:



Further Modifications

What I described above will get a basic scrolling text functionality in place. However, what if you want to change the text? What if something tries to change the text mid-scroll? Currently, the text will change right there, somewhat ruining the effect. For my scroller, I designed a queue system which accepts new messages and switches to the next message while the text is off screen, or repeats the last message a specified number of times (or infinitely). I'm sure there's a lot more functionality you could add to the system even beyond that.

If you'd like to see the finished product, I've made the script available as a gist. Feel free to use it directly or as a model for your own creations.

What interest text systems have you added to your Unity programs? Please share if you implement the ticker text system in your game - I'd love to see this tutorial being put to good use.

Thanks for reading!