Katastrophe! goes gold

After 12 weeks of planning, scheduling, managing, meetings, designing, codings, bug fixing, optimisations and for me multiple weekends and after school hours meticulously tweaking, researching specific areas until my tasks behaved as I envisaged my parts to behave, e.g. Mirror reflection and controls, Collectable AI, Puzzle FSM, Save and load manager, shaders development, XML Achievement system, GUI creation facilitated by NGUI and Occlusion tuning, Dimidium Games is proud to present the final release version of Katastrophe. Post mortem to follow. For the time being you can grab a copy of the installer here.

screenshot screenshot1screenshot2 screenshot11screenshot13 screenshot14 screenshot20 screenshot23 screenshot25 screenshot31 screenshot32 screenshot36 screenshot38 screenshot40 screenshot43 screenshot47

Storing encrypted strings in memory

Whenever you want to store values as string in memory, whilst at the same time prevent external tools from either finding the value and changing it. e.g. changing high score values. You can use the built in System.Security namespace to do so, the following code shows an example of this.

using System.Security;
using System.Runtime.InteropServices;

SecureString secureStr = new SecureString();

int Score
{
    get {
        var bStr = Marshal.SecureStringToBSTR(secureStr);
        var scoreStr = Marshal.PtrToStringBSTR(bStr);
        Marshal.FreeBSTR(bStr);
        var score = int.Parse(scoreStr);
        return score;
    }
    set {
        secureStr.Clear();
        var chars = value.ToString().ToCharArray();

        foreach (var c in chars)
        {
            secureStr.AppendChar(c);
        }
    }
}

The caveat to this is that its only supported currently in desktop, so if you’re planning on using this code inside unity it wont work for mobile and web as they dont have Marshalling available within their JIT compilers.

If desktop is not an option, alternatively you can hide the value using simple crytography. In its simplest form this can be achieved by means of XOR’ing the value. To allow it to work, a random secret private key is chosen and this is then used to encrpyt and decrypt the value. The following code snippet shows how

private int key = 9999;

int score;

int Score
{
    get { return score ^ key; }
    set { score = value ^ key; }
}

An even better way is to randomise the key when you store the value, as shown below

int Score
{
    get { return score ^ key; }
    set { 
        key = GetRandom(1, 9999999);
        score = value ^ key; 
    }
}

int GetRandom(int min, int max)
{
    Random rnd = new Random(); 
    return rnd.Next(min, max);
}

This way even if they do stumble across the value, the next time they look for the same value it will have changed. Its fast and its also available on most if not all platforms.

Getting Kinected

The introduction of the Kinect Sensor was one of the main reason I finally decided to hop back onto the console train. My last console at the time was the Playstation 2 and having just upgraded my PC to play Crysis 2, there was no reason for me to purchase any of the next gen consoles (XBOX360 and PS3) at the time. That all changed when the Kinect was introduced. This new invention and coming off the buzz surrounding the Nintendo Wii console I felt was quite the game changer. A device to measure your body movement while being able to play HD games. This sold me and by the looks of things I was not the only one a bit interested, Microsoft gained the Guinness World Record for fastest selling consumer electronic product ever due to this little beauty.

Its only pitfall were that most of the games released did not diverge from the common gaming experience, ideas which never explored its full potential, a lot I feel was due to its secrecy with its API as well as not taking risks with how to use the device in games. Even the release of the official SDK was delayed and was only supplied from Microsoft after the community had successfully hacked the Kinect first.

Moving forwards to today I was always intrigued by the devices ability to capture motion mainly its skeletal tracking ability. This fascination stemmed from my other interest in being able to produce motion capture at a cheaper rate than the common and vastly expensive motion capture systems available at time of writing. Being a programmer, my animation skills was always non existent. I had delved into using 3dsMax back when it was version R12 after seeing someone use a bootleg copy of it for their final year project animation of a device from an AutoCAD schematic in 2001. I played around with it but unless I continued to use bootleg versions the cost was always a diminishing factor to take it in anyway seriously, so I never pursued it any further and stopped after a couple of years.

The idea instead remained in the back of my mind until this year when I was given opportunity as part of my studies at AIE to pursue a topic that I was interested in. Kinect motion capture came to mind immediately. After checking where the release of the SDK had come, 1.7 at time of writing I felt it was the right time to re-explore and take my ideas and make them realities. The community had indeed been active once I got myself a hold of version 1.7, lots of communities had formed all doing cool and interesting things. Now all I needed to do was to come up with a way of taking the motion capture to the next level and create something to record it. This is where Unity comes in to fill the gaps. I figured there was enough available through examples in the SDK and what I had become familar with in Unity to allow me to capture that motion easily, all that was needed was for me to write up the code to record that animation so it could be captured, recorded and played back all while in Unity. Having familiarise with Unity alot over the last few weeks and being introduced to it last year everything about it seemed plausible, so this is where my research assignment begins.

Prototype Week4 – Bug Off!

Due to technical difficulties from last weeks presentation, none of which was our fault thankfully. We did however go out feeling a little robbed of all our efforts. So to make amends we decided to investigate the same game some more. Some of the other teams had done so already with one of their prototypes and granted it was within the rules to continue and expand on an existing prototype, we felt this was the game that required this need. The only caveat was we decided to step it up a notch, which wasnt as bad as it seemed as we had become more familair with unity over the weeks, which also built up our confidence with the tool. We were also becoming much more comfortable with each other and their abilities, so the time was right to spread ourselves more thinly and onto new unfamiliar areas. Firstly, it was time to delve further into the story and experiment on existing mechanics, either polishing them up or adding to them on the programmers side, while on the art side, more detailed models and texturing would be their next stage.

For my task I personally took on the responsibility of creating an in game fly through camera, something I have wanted to do for a while in unity, also investigating if a rewinding feature could be implemented. This rewind action would be called via a button press, namely ‘r’ this would then being the process of reversing the characters movement until the button was depressed, it was designed to remove the need for a life system giving the player a softer punishment rather than a harsh one of restarting from a designated checkpoint. I always thought any type of fly through camera was a better form of narrative in explaining or emphasising points of interest. In our attempt, we utilized this technique by indicating where the character should go next from their current location. It would be implemented as an extra camera that would follow a path, smoothly until it reached its end point, in which event it would switch back to the main camera. The flythrough was borrowed from a google search and massaged into our code. I discovered that the system was using time to calculate the path to follow and this would cause issue when run in game. Basically once started, the flythough camera played. So when the cameras are switched we had not way of pinpinting the position of the flythrough camera which was already making its way around its designated path, which and was also looping back to the start once it completed its full path. So the cheapest workaround with the least rewrite overhead in getting around this was to position and save a prefab in edit mode and save it out as a prefab, later instantiating that prefab with initial positions set automatically. The prefab would then appear and run as if it had been set to run from the beginning, of course some may say, why didnt you just reset the time to zero. Well this is because it was using system time and this is read only. In any event this workaround fixed the issue and was enough to get our point through during presentation time.

The rewind feature on the other hand took a lot long as this idea was quite rare and there was little information on how to do it, I had only seen one game using unity, called Time donkeys and they weren’t doing it as an in game rewind rather a replay system. After 2-3 days of research and coding I came up with a solution that worked, only problem was when time to test I discovered that it did not work as intended against a moving platform. The issue arose due to the rewind not being able to indentify the existing trigger and script that allowed the character to attach and follow a moving platform, so instead you would warp to whatever collider was below. What was most pressing about this bug was that our starting platforms in the game were those that moved, and due due to time constraints I wasnt able to come up with a feasible and stable solution to fix and present. I literally got the rewind functionality working 2 hours before presentation and even then it was in a rough basic form. So we decided not to show this feature and continue with only showing the other things we had added. As for the art we did see some new additions, for example a new model for the character which was created and textured. We managed to get it to perform basic ragdolling, only problem was the ragdoll was applied to another model so it just looked weird when you died and the main character would then swap from the current to an army dude while also going all limp, still got a cheer from the crowd so happy with the result.

prototype-week4

Prototype Week3 – Bug Extermination

This week was back to normal in terms of time allowed, we were back to 3 days instead of 2. Last week being interupted and shorter due to a public holiday. Another change was made to the team, another new artist was added and we were now 5 artist strong. This week extra day allowed us to experiment more with mechanics, but what was alleviating us going into this week was a concrete game idea. A few arose, but in the end we were undecided upon two game running of the bulls, my top pick and a rocket jumping game similar to quake in mechanics but with puzzle elements. I prepared a mini prototype going into the week but it wasnt enough as the team decided upon the rocket game that later evolved into a bug extermination game 3rd person puzzler. Similar to tombraider but with bugs as enemies and the main character wielding a rocket laucher instead of dual pistols.

prototype-week3 prototype-week3-1 prototype-week3-2

Prototype Week2 – Hurricane Derby

Due to a shorter week, we knew we had to choose a game from our list that was both fun and achieveable. The game with simplest mechanics was deemed Hurricane Derby and it was the game we set forth to make. A small change this week as well to the team. A new member joined from another team, as this was within the rules of prototype week we decided to give the new guy, who happened to be an artist, a try. His skills in creating realistic greybox assets in short time really helped see this particular prototype come to fruition very easily. Mainly because one of the other artist was beginning to show his reputation of slacking off.
The idea was simple, you are a tornado and it’s your job to destroy as many objects in the game as you can in the fastest possible time you can. Points are awarded for destroying multiple objects chained together. Health is restored by finding the golden cow. The game ends when nothing else remains in the level to destroy or when the timer runs out. What we realised after naming it Hurricane derby was there was little hurricane and more tornado, however, since we didnt want to redo our branding that had been created by the concept artist, the name stuck so we kept it.

prototype-week2-1 prototype-week2-2

 

Prototype Week1 – Text N Drive

10 Refined Game Ideas

Chef Simulator
• A Similar Style to Surgery simulator
• First person perspective (3D)
• Set in a fast food kitchen
• The player has to pick up tools to flip burgers and assemble them
• The player controls the chefs hands
• Apply toppings to the burger by scooping them out of containers
• The burger must also be assembled and boxed (with the bun)
• Your score is based on speed
• The player must add the topping based on an ordered given at the beginning of each round

Text and drive
• A first person perspective from the inside of the car as the driver (3D)
• The player has to steer the car with the numpad or arrow keys
• There is a clingy girlfriend who keeps texting you as you drive and you must respond fast
enough
• While texting the road blurs out as you focus on the phone
• You must dodge traffic to survive
• Your “score” is based on the number of texts you send as well as the distance you travel
• To reply to your girlfriend there is a template response which you must type correctly, as the
game progresses some of the characters are missing
• Start and pause menu are in the phones menu, end screen is a car crash

Animal control greyhound
• You control a rogue greyhound that is running in a race, which then turns rabid and begins to
attack everyone on the ground.
• Objective is to create as much destruction and havoc as possible while avoiding the
RSPCA/Animal control who will attempt to capture and impound you.
• Points are awarded to mauling individuals and objects scattered around the ground.
• Bonus points for mauling hot dog vendors.
• Game is set in a fixed (camera does not rotate) top 45 degree isometric view.

Do You Even Lift?
• The aim of the game is to continously lift weight ‘guilitone’ style to build those sweet upper
pecs.
• As the game progresses, your muscles start to ache.
• Bro Science tells you to continue to lift during this.
• You have to hit A and D at the right point in the lift to handle the weight, otherwise you will
lose balance and drop the weight onto your neck.
• The game gets harder as the player gets slower and the button presses become harder to hit at
the right time.
• If you button mash, your muscles implode and you die, as well as chopping you neck off!

Thieves ‘r’ us
• Game based on stealth
• Pick your victims house at the start as you pace the street, checking out details and items that
you cna loot.
• Start as a hoon who goes after wallets, then you can buy new ‘anti squeak’ sneakers and hit
the gym to carry more items! You can even start some ballet lessons to tip toe through the
house
• Build up your organistion, hire some more poeple to help you with the massive 60″ tv that you
must have!
• Getting caught is one thing, getting away is another. If you get caught, smash through a
window and run for your life, all in 3D thrid person game!
• Oh, and beware of dogs

Magic Pet Shop Escape
• Save magic animals and help each other escape from the wizards pet shop to maul him after
trying to burning it down for insurance money
• Play as different animals with unique controls and abilities to escape the inferno!
• 3D 3rd person cutesy art style
• Save different animals to use them by opening their cages, switch through different animals to
solve puzzles
• Dog: super strength (push cages)
• Rabbit: ice breath (hold off fire for small amount of time)
• Cat: telepathy (scout the puzzle/maze)
• Animals that survive try to maul a wizard
• Gameplay style is akin to “push box”

Lumberjack vs Beavers
• Play as a beaver to race lumberjacks in a game of who can cut the tree down faster.
• The game is 2D
• The tree cut down first falls on the other player. If the lumberjack beats you it is game over.
• Your goal is to keep beating your opponent and progress to bigger and tougher trees thus
increasing difficulty as the game continues.
• Sometimes fleeing animals will run across the screen. You need to ‘jump’ over them to avoid
getting stunned. Landing on them will turn them around thus making them crash into the
lumberjack which stuns him instead.

Taco Tactics
• Grow your taco business from the ground up, use advanced marketing techniques, espionage
and good ol’ fashion delicious tacos to put your rivals out of business and become the most
gargatuously mammoth taco company of all time
• 2D isometric strategy game
• Ruthless AI opponents
• be the first to make 1 million dollars profit to win!
• hire taco vendors to move more product and take revenue away from rival taco vendors
• street thugs to pester rival vendors and protect your own
• cooks to increase the deliciousness and demand of your tacos
• and spies to steal taco recipes and intel from rival companies
• build various buildings to research recipes, sales techniques and upgrade your units

Running of the Bulls
• You play as a Bull trying to kill as many runners as possible while avoiding the Matadors.
• first person perspective as the Bull with interactive horns in view.
• use “mouse” to move the bull left and right, you do not control the bulls speed.
• the amount of points for each runner is represented by amount of red they wear.
• point multiplier based on how many runners you have impaled on you horns.
• after multiplier ends the runners are hurled off the horns.
• hold “space” to build up horn charge to impale runners further onto the horns to allow higher
point multipliers.
• red bull cans give you speed boost and shorter build up time for maximum horn charge.
• matadors can kill you.
• split paths for you to take.
• finish the game by making it to the arena.

Flock of Life
• Lead your flock of homing pigeons to relative safely with your pigeon (cursor) avoiding
obstacles on the way in an Apocoliptic Hellstorm
• pick up stray pigeons to your flock and avoid losing your pigeons to meteors, hell deamons and
giant floating Beiber head (the obvious bringer of the apocolypse)
• top down “galaga”-ish view but with awesome crisp 3D graphics
• Epic Environments
• attack enemies by forming formations (scissors, gun, ect) that are more powerful depending
on your flock size

Bird Shit Game
Idea: You play as a bird and your main goal is to “shit” on as many passers-by as possible, while you
avoid being attacked by larger birds, cats, slingshot-wielding children and angry people.
Style: Toony – can be 2D or 3D.
Gameplay: The setting is beside a busy road with trees on either side, and branches that arch across.
This allows places for your bird to hop to, in order to avoid danger, but also to reach targets on both
sides of the road.
Hitting certain targets may net more points, but they also come with a few consequences – example. If you hit policemen enough times, they may open fire and kill you if you don’t dodge fast enough. You can also acquire more points the larger the shit is– this is achieved by collecting (eating) bugs that spawn in the trees. Certain bugs give different effects.
Characters: You can choose to play as;
•Pigeon – Slow moving, but has small AOE when they shit. Has large shit.
•Seagull – Average speed. Has an average-sized shit, but can fire at a faster pace.
•Sparrow – Very fast. Has small shit, so it needs to hit targets multiple times to get decent
points, but it is also the best for avoiding danger as it is the smallest target. Fastest at shitting.

Game Brainstorming Ideas

Team Taco is incorporated and here are the games we have brainstormed.

1. Magic Animals Escape:
Magic animals join forces to escape a pet shop that is on fire.

2. Animal Control Greyhound:
Punters didn’t bet on this greyhound jumping the fence. They bit off more than they could
chew, literally.

3. Running of the Bulls:
Impale as many people as you can. Avoid matadors.

4. Extreme Chair Balance:
Paper Toss meets Chair Balancing. Overthrow and you die.

5. Skydiving Game:
Becareful not to be sucked into a planes engine. Avoid obstacles while falling. Hit checkpoints
while falling.

6. Bird Shitting Game:
Jump from tree to tree as a sneaky bird shitting on innocent people. Hit babies for more points.

7. Wrecking ball vs Wrecking Ball
Taking strikes to a whole new level. Two disgruntled crane workers decide to strike by causing
chaos.

8. Text and Drive:
Everyone knows how dangerous it is, but everyone does it. So we want to teach people the
reasons not to.

9. Escape UTS:
The famous crane that hit the building next to UTS, this is what would of happened if it hit the
UTS building, in drunk mode.

10. Hurricane Destruction:
Control a tornado as it tears through a city, get points by collecting as many objects as possible.

11. Balancing Tight Rope:
Jousting meets acrobats. Balance while trying to knock off your opposing acrobat.

12. Lumber Jacks vs. Beavers:
Try and get to the middle of the tree before your opponent to kill him.

13. Do You Even lift?
The aim of the game is to continously lift weifht ‘ guilitone’ style to build those sweet upper
pecs.

14. AI Tower Defense:
Towers only fire when the camera can see them. Move the camera to power up those towers.

15. Drunk Knife Throwing:
Throw knives at a player on a spinning target… While drunk.

16. Drunk Driving Grand Prix:
Formula one driver kills people, in a drunken rage.

17. Hide in Basement:
Based on a true story. Sneak up at night and steal food from your mother who has kicked you
out of home. Spend the rest of your days playing LOL.

18. Monkey Business:
Shoot targets which launch bananas at you and you have to catch them.

19. Pigeon Guide Deluxe:
Guide a flock of pigeons as they fly north for the summer, or south. Pigeons are dumb, guide
them around planes and obstacles.

20. Wifeception:
Steal stuff for your beloved wife as she investigates who is stealing stuff.

21. Taco Tactics Lite:
Turn based game where you have to build your Mexican enterprise to take on your rival.

22. Hair Dresser Simulator:
Cut customers hair without cutting their ears. Become a professional barber and shave them,
with a straight edge razor. Enough said?

23. Chef Simulator:
Control a Burger King and flip burgers for your life. Remember, you are a bit uncoordinated
and burn easily.

24. Vine vs Gardener:
Be one of those annoying leech trees and strangle the life out of other trees. The gardener will
come to trim you down however.

25. Thieves ‘r’ Us:
Pace the street and pick your victim. Call in your hoons to steal that 60″ TV that you dream of.
Build the ultimate organisation.

26. Affair Escape:
Don’t get caught sleeping with your mates wife. Escape the house without your friend seeing.
Stay in the dark the whole time.

Research assignment – Kinect sensor

As part of this years assessment we are given the opportunity to research an advanced topic on anything we so desire within the games industry. Provided it wasnt something we had not previously researched prior and wasnt something we could produce over the weekend or last minute. 104 hours is the recommended time one needs to spend on research and it is to cover the entire year, with presentation at the end in front of peers and academia.

So with that I have chosen a subject that I have had some interest in, the kinect sensor. Mainly the areas of animation and motion capture, it also has speech recognition, a hand gesture API and depth sensing and various other items that I wont list here. Granted if I have time I will visit each of the topics individually, I have decided I want the largest time allocated for motion capture and animation.

Here is an outline of the milestone and topics I want to visit and present.

Human skeleton and joint movement

  • Tracking hand movements and skeleton tracking IDs
  • Processing skeleton frames
  • Bones and joints tracking and live feedback
  • Motion capture and controlling rigs

Colour image data stream

  • Event and polling
  • Enabling, disabling, attaching processing and rendering

Depth image processing

  • Triangulation
  • Depth frame
  • Calculating distance and colourizing data
  • 3d view of depth, creating model

Speech recognition

  • How it works
  • Speech recogniser

Human gesture recognition

  • Gesture recogniser
  • Algorithmic gesture – extending gesturehelper class to include zoom in, zoom out, swipe to right classes.
  • Neural networks

Kinect in the cloud

  • Windows azure
  • Remoting using windows phone

Depending on time and how difficlt each topic might be these may or may not change in future.

Follow

Get every new post delivered to your Inbox.