Category Archives: Uncategorized

Why so quiet?

Sorry for the lack of activity, incase anyone out there was wondering, I am in fact, not dead. For the past few months i’ve been working for a 3D art & animation company as somewhat of a general interactive-media/app guy. I won’t give any specifics but i’ve been doing a lot of work with augmented reality so i’ll be extremely surprised if my next none-studios project doesn’t involve AR in some way.

Anyway as you can probably guess working full time is keeping me busy so I haven’t had much time for any of my none-studios projects. Hopefully i’ll find a way to squeeze in some decent personal dev time at some point and start posting new and interesting things.

Dialog Tree Extension for Unity: Feature Demo

Finally here’s some more on my dialogue tree editor extension for Unity, complete with shameless self-promotion about how I’m looking for work. Did I mention I’m looking for work? Well I am ;).

I ramble on about the specifics of how its used quite a bit, especially in the part labeled the basics so if you just want to see what its capable of producing you may wish to utilize the links which appear in the top right hand corner of the screen.

Unity Dialog / Dialogue Tree Extension

The Dialogue Editor: This new window displays the trees/content of your dialogue components.

The Dialogue Editor: This new window displays the trees/content of your dialogue components.

Hello internet, its been a while hasn’t it? I thought i’d share one of the things i’ve been working on since the last Old Jolty update. Its a Dialogue Tree Extension for Unity; it manages the editing, display and interaction of in-game dialogue or conversations in a visual, relatively simple and un-intrusive manner. Thusly its easy to integrate and doesn’t take over the whole Unity project. It can manage player choices/options in the dialogue and its all done via GUIText and GUITextures, so runs no risk of OnGUI based lag.

I started work on this for two reasons: Firstly to prove to myself (And any potential employers) that I can rock the C# and secondly because it’ll be really useful for another game project I’d like to start one day. The extension will likely be going up on the asset store for free when its finished. At least initially, ideally i’d like it to evolve over time with critique until a point where I start charging a small amount for it. However i’m aware its not the only editor extension of its kind out there, (Even if i’m not sure how many of those tools are OnGUI independent.)

A Dialogue Box: They come with all three components as standard.

Dialogue Box: They come with all three components as standard.

As it stands it currently has the following features:

• Works through just two parts, dialogue components you add to whatever objects you want to speak and one or more dialogue box GameObjects tweaked to your preferences.
• Simple to integrate, just add a Dialogue component to a GameObject, edit it’s dialogue in the dialogue editor (It opens in the editor at a press of a button), add a DialogueBox to the scene, configure it to your preferences and then finally script a method call for the dialogue into your game.
• Completely OnGui independent, no need to shove stuff in your main OnGui call or risk lag from multiple (Or single) OnGui implementations.
• Formats the dialogue text to fit inside your DialogueBox’s GUITexture, splitting the text up into multiple “viewings” if there’s not enough space for the whole body of text. Compatible with other scripts which alter your GUITexture to scale with resolution as long as they do so on Awake();
• Can process an unlimited number of dialogue options or choices, (Where the dialogue diverges based on what option the player picks.) Though it will shout warnings at you if you put in more options then can physically fit in your dialogue box.
• Visually shows the structure of your dialogue in a clean and concise manner within the extension’s dialogue editor.
• Supports multiple dialogues using multiple dialogue boxes simultaneously. It also supports multiple dialogues using the same dialogue box, though obviously not at the same time.

The Dialogue Component: Add it to whatever you want your players to converse with. (Could be used for text based menus to.)

Dialogue Component: Add one to whatever you want your players to converse with. (Could be used for text based menus to.)

Ideally I’d like to add the following features:

• An option to make the text load character by character instead of instantly.
• a GOTO option in the dialogue editor where you can put in the # number of any text box and that’ll be the next piece of dialogue.
• Support for “click to continue” indicator textures/images at any alignment at the bottom of dialogue boxes.
• An option to make option/choice text become highlighted when the mouse is over it.
• Touch screen support so it can be used on mobile platforms, but remains testable on PC using the mouse (I’m considering using the unity web browser for testing in the future). Also adjustable gaps between the text options, so that they can be pressed by big fingers more easily.
• Optional field for “Header” dialogue box, which displays speaker names, titles etc.
• Optional field for “Echo” dialogue box, which shows the previous “viewing” of dialogue.
• An optional mode that makes the echo box become used for normal dialogue whilst the main dialogue box becomes used solely for the display of choices/options. The result being one box for player input and one box for NPC dialogue.
• An option in the dialogue editor which sends a message to call other methods/functions on the dialogue’s game object at a certain point in the dialogue.
• Variables held by the dialogue system, editable by method calls.
• An IF option in the dialogue editor which will cause a choice/option to only be presented if conditions involving said variables are met.
• Options to slot the variables into the text for showing gender, player name etc.
• Some kind of set up for integrating image/character portrait display into the dialogue.

We’ll see how far I get through them before putting it up. As usual if you have an opinion i’d love to hear it, until next time internet.

Optimizing Unity Games for iOS

Triangle comparison of a Unity plane, a simple plane and zombies

Triangle Comparison: Unity plane (Left), simple plane (Right) and zombies

This post is about something a little different, I’ve spent a lot of time fussing with optimization during the course of Lunacy’s development and I thought I should share some of the more obscure things I’ve learnt, on the off chance I can save somebody else hassle in the future.

There’s already a lot of information on the web about the more common approaches to optimization, lowering frame rates, removing lag etc. Repeating all that information isn’t the purpose of this post, so to that end I’ll only provide links to the following webpages, which were a great help to me.

Optimising with Unity for iOS by Jamie McCarter

Unity Manual: Optimizing Graphics Performance

Optimizing with Unity iPhone, the first three things I’ll do… by Cratesmith Gameworks

The actual purpose of this post is to highlight a few of the less well-documented potential sources of lag/lower frame rates I’ve run into so far:

1. Unity Planes
Unity planes, (the ones from game object -> create other -> plane), are not your friend. Firstly they come with mesh colliders, you’ll want to change these to box colliders, as mesh colliders are more intensive. (And as far as I can tell, completely unnecessary for a plane.) Secondly, these planes consist of a great many triangles, so you could potentially stand to gain by replacing them with simple (two triangle) planes you’ve brought in from a 3d modeling program. Doing so will make you unable to effectively use vertex lighting on the planes or things like fog. However if you’re not using fog and using baked light mapping, which you’ll probably want to do as its less intensive, then the 2 triangle planes should serve you fine.

2. Too Many Active Objects
Now this may seem ridiculously obvious, but it wasn’t for me so for the sake of any likeminded folk reading this I’m including it.

My trail of thought was that I would be able to get away with large amounts of objects as long as they weren’t within the camera’s rendering range, weren’t referred to by any active scripts and were just simple objects. I tested this with basic cubes with box colliders in Lunacy, queried Unity Answers, but ultimately came to the conclusion that I was completely wrong.

As long as the objects are toggled to active, even if they’re very simple, are not having their polygons rendered and are not interacting with anything, they will still cause a significant drain on performance in large numbers.

We had always intended to have fairly large and expansive areas in Lunacy, to compensate for us not having the manpower to produce a large variety of them. But of course large areas require lots of objects and I ran into this issue. Ultimately to counter act this issue I scripted a system in which all the environmental objects in each area are activated and deactivated in tile-marked segments as the player moves around. The cost of this is the occasional brief loading pause mid level, but it’s a price we’re willing to pay.

3. Dynamic Text
This one comes down to using a custom font set to dynamic, as they are by default. (Set under “Character” in the font import settings.) Dynamic means that Unity generates a texture for each character in the font on-the-fly the very first time that character is displayed. I’ve found in certain circumstances this can cause tiny lag spikes the first time specific characters are displayed. A simple enough solution to this issue is changing “character” in the font import settings to ASCII default set. Though this will mean you’re stuck with only one font size per font file and can’t align the font to center or right.

A Final Note
I should stress these are simply things I’ve found to be the cause my own problems via my own experiments, so they won’t necessarily be the cause of any problems you might be having or even be worth worrying about in your game.

Furthermore, this is my first time working on an iOS game, I’m still learning, so if somebody out there does have reason to disagree with any of my conclusions or can shed light on why number 2 happens, do let me know!

I should also mention that we’re developing in the free version of Unity 4, so if you have Unity Pro I imagine point number 2 could be less of an issue, as you can use static batching.

Meet Lupa

With the bureaucracy & organization side of things almost settled, (I’m mostly just stuck waiting for companies to process things now), I’ve finally joined Andy in-engine and I’m happy to report myself and Unity are getting along like a house on fire.

Anyway, time to introduce Lunacy’s final protagonist:

Lupa is short, feral and unpredictable. Whilst Griogair may have become a slave to his inner beast, she has become one with hers, existing in harmony with it much like an animal would. Apparently found in some backwoods living like a wild animal, efforts were made to make her more cultured but the results have been mixed. Lupa can use firearms, read, write and knows not to attack survivors, but is still prone to animalistic behavior. She speaks only in rare instances, and then only to bestow a kind of mystifying wisdom which whilst rarely easily comprehendible or sane-sounding normally has some basis in simple natural truth. She views the rest of the pack much like a wolf would and as she considers Ivorie the alpha female, rarely attempts to make leadership decisions.

The site may become quieter over the next month, as I’ll be focusing on getting the game to a screenshot worthy state.

Meet Griogair

I’ve been buried under bureaucracy since Launch Conference, so I’ve got nothing exciting to report. But I do still have more characters to introduce! Meet Griogair:

A slave to his inner-­beast Griogair makes no effort to control his rage, letting it rise to the surface moments from its conception. A lifetime of brash hostility has made him a huge tank of a man which only the brainless dead would dare cross. He came to the city to let his aggression run free, dreaming of new challenges and fights he’d never get away within the civilised world. As long as his need for violence is kept sated Griogair is actually quite friendly and optimistic, some might even say jolly, but not to his face.

One more pack member to come!

First Glance, Meet the Pack

As the websites looking a little bare and I’m sitting on some preliminary sketches courtesy of Hedjeroo, (Whose creating Lunacy’s 2d art for us,) I think it’s time to start introducing Lunacy’s protagonists.

Ivorie and Colt:

A former black ops operative with professed government ties, Ivorie was responsible for getting the pack together. She makes no secret of the fact that her primary goal is the recovery of the city but seems driven to rescue as many civilian lives as she can in the process. She places a great deal of pressure on herself, believing that there will be dire consequences for the city should the pack fail to counteract the zombie threat. Rumour has it that she grew up near the city, but she has refused to confirm this.

Colt is the epitome of Zen, always calm and collected even in the face of certain death. He keeps to himself, never sharing more personal details then he needs to. He’s well respected amongst the pack and probably the closest thing it has to a true leader. Every step he takes is firm and considered, as if burned by the weight of past mistakes. Despite his calm emotionless exterior Colt has a surprising tendency for kindness, leading others to the theory that he’s a man looking for redemption.

Stay tuned, two more protagonists still to come.

You’re Early

Hello There!

If you’re reading this you’ve managed to peek at the site before I’ve finished setting it up, not much to see at the moment I’m afraid, but do come back later, there will be interesting things, honest!