Pages

Tuesday, 27 November 2018

Equestria at War: Wittenland and Dynamic Focus AI


With another development cycle comes another release for Equestria at War. In this release I focused on creating a brand new nation called the Kingdom of Wittenland.



The Kingdom of Wittenland is in a precarious situation. It is in the middle of several different nations which can be both friends and foes to it. The design brief for this nation was relatively freeform compared to my previous design work for Equestria at War. I could do pretty much anything I wanted, but was told simply to not go crazy. Thus, I kept things restrained and fell back to what worked best, a strong internal narrative.



Wittenland is a nation which is based in the far east of the map, where modernisation has not had much effect yet. To mirror this, I took inspiration from history. Specifically I researched the early medieval period and decided to describe their society as somewhat Carolingian. The empire of Charlemagne was flawed by Germanic tradition and the adherence to old Roman boundaries. So i weaved this into the narrative for my nation. Wittenland has suffered decline in recent years due to being stuck with an ancient economic system which is not fit for purpose. This gives players a reasonable explanation as to why the nation is so far behind, and a flavour of what they are doing. After all, capturing that immersive feel is important during a Hearts of Iron 4 campaign.



One of the principle issues with Hearts of Iron 4 are the slow and rather cumbersome mechanics. After working with it for a while, I can safely say that it has 4 major mechanics which it leans on. The first, is the actual warfare element of the game, and that works very well on its own. The second, is research and the third is construction of factories and equipment. Both of these are not especially exciting in the vanilla game. Most of the time it is a fire and forget choice, however more often than not it plays into a deep meta game strategy that is done before a major war. Equestria at War's development system, means this is much less important, as technology and construction are severely hindered. This has the unintended side effect of there being less to do at the start of a game, and it makes the game more boring.



In order to combat this, a designer must lean on the fourth pillar of Hearts of Iron 4 game design, and that is the focus trees. These national stories need to be able to shoulder more of the excitement, so they need to be much richer and much more interesting than something in vanilla. Thus, narrative and storytelling become much more important to make up for sacrificing the effectiveness of two distinct elements of gameplay.



With the focus tree much more important. The AI had to be better at using it to present the player a challenge. Hearts of Iron 4's national focus AI is poor at best. It takes into account what foci it can do, and then randomly picks between each national focus using percentage weights which can be assigned to conditions. However this approach is very limiting when you are dealing with a large range of possibilities. Instead I developed an AI schema which will allow Wittenland to take advantage of an emergent situation and adapt accordingly. Instead of thinking about what foci it can take, it reads in information about the world and picks out of a general group of foci that relate to that. This makes for a much more dynamic and adaptive AI which can pivot based on what it needs and any one time.


The above video goes into more detail on this new system. So far it has proven to be quite revolutionary and the Wittenland dynamic focus AI makes the nation one of the smartest in the game. All in all, this was a great technical project to solve a problem which I feel is quite deeply rooted in one of Hearts of Iron 4's major game mechanics. Because the focus Ai does not think intelligently, it makes the game very predictable, and non repeatable, which makes sense for a fixed scenario. However, in Equestria at War, we want things to be much more dynamic to produce interesting and varied situations. In this, the dynamic focus AI was a resounding success.

Saturday, 5 May 2018

Equestria at War: The Griffon Continent and the Dread League

After roughly four months of development in my off time, Equestria at War has released it's latest update which adds a whole new continent into the already substantial overhaul mod. While I would love to take credit for the whole mod, I cannot. I did however contribute two particularly interesting nations to it. The Dread League, and the Arcturian Order


A detailed development diary of these two nations can be found at the below link which will give you some insight as to how they play and what they are should you be interested.

https://www.reddit.com/r/hoi4/comments/86tr1f/equestria_at_war_dev_diary_iv_the_skeleton_war/

For now I shall briefly sum up these two nations. The Arcturian Order is an ancient order of knights charged with defending the land from the undead. The Dread League, are the undead that they are defending against. Quite an oversimplification, but if you wish to read further about them that is discussed in the dev diary. This portfolio post will be discussing development decisions in greater depth as well as design and technical challenges.

Firstly the initial design challenge was to overcome the theme of My Little Pony and to make these nations attractive and interesting to play. For the Arcturian Order this proved somewhat easier to accomplish. While initially design was handed off to someone else, due to development issues which I will discuss later I ended up doing a sizeable amount of the design work for the Arcturian Order. In order to simplify their initial broad design which I had nothing to do with, I cut down the possible leaders from 5 to just 2. This made them have a much stronger face than they would have otherwise, and gave players the time to invest in those two characters.

The second thing I did was to keep all of the leaders as griffons, and I made the Arcturian Order seem distinctly harder and more of an adult story of bitter defence, political shenanigans and desperation. These two effects moved the Arcturian Order away from the more cutesy themes of My Little Pony, and made them much more easier to identify with.


Unfortunately the Arcturian Order went through some development woes before I got my hands on it. The person responsible for creating the Arcturian Order had personal issues and could not work on the mod as much as they wished to. Despite his eagerness to continue, the lead developers felt it was better if they simply handed the Arcturian Order over to me to develop in parallel. This meant I could develop the Arcturian Order as I wished. Yet due to pressure from development, I was forced to make some compromises. The Arcturian Order focus tree (one of the major storytelling mechanics in hearts of iron 4) is short and does not give much feedback to the user. Coupled with this, the long turnover to get rewards means it is an unattractive focus tree. Worse, the Arcturian Order and the Dread League are hindered greatly in their development further.

Hearts Of Iron 4's main mechanics for its strategic metagame layer can be broken down into 4 core aspects. Building, resources and production, research, and national focus. The Arcturian Order was designed to be very behind the times compared to other nations, thus to mimic this, research, and building are almost entirely locked out for them. It is possible for them to do this, but it takes so long that it is boring without more player attention onto other systems. 

The pressure was then put on the resources and production as well as the national focus tree. With the national focus tree somewhat weak, it does make the Arcturian Order somewhat dull in the early stages of the game. This however is somewhat offset somewhat by a mechanic that I built into the Dread League.


The Arcturian Order revolves around the Dread League, thus I put a lot of emphasis in the Arcturian Order focus tree about preparing for a war with the Dread League. It is a grim tale of defiance, which is captured in the character of Ostwald Vind. I tried my best to make him seem like a firm and likeable character, as well as a realist. Meanwhile I offset this with William Steel Beak. While I wanted to overcome the cutesy feel of My Little Pony, I know I needed to keep with the show's themes or I would ultimately alienate the fanbase, which makes up a considerable number of players. Thus I gave them the character of William Steel Beak, who believes absolutely anyone can be redeemed and that the world should live in peace and harmony rather than making everyone comply to a strict doctrine of defiance.

It is these two key motivations that should motivate the player while they are playing the Arcturian Order, and since the Dread League focus tree is so much faster and fluid than the Arcturian Order tree, it really puts pressure on the player to prepare or be destroyed.

Meanwhile, the Dread League was my main focus in development. Again, it suffered some development woes, but none that were nearly as bad as the Arcturian Order. I was handed a design as my first task in development, and told to implement it.

I originally stuck very close to that design, but invariably I added some flair to it of my own. The Dread League followed the story of a necromancer called Rosa Maledicta trying to conquer the world with unholy magic. I felt this had some good potential, so I took this idea and developed it further. I made the character of Rosa much more of a tragic character when I researched some of the other main villains of the MLP show. Most of their issues stem from being rejected or having issues forming friendships, so I made Rosa the same. She was rejected by her peers, she sees the cycle of harmony as pain for everyone, so she wants to break the cycle, and the only way to do that is to kill everyone on the planet.


Genocidal maniac aside, I knew I needed to make her an identifiable and likeable villain. Thus, I explicitly stated that she needed to be cute. While this prompted some humour from the development team, it seemed to work wonders and she was met by great positive player response. My plan was to initially make Rosa an elderly woman who went in search of a magical artefact that either turned her into a beautiful and powerful lich, or a beautiful and powerful vampire. That way the player could choose the flavour and theme of their Dread League.

These two distinct transformations had to have more of a purpose than just aesthetics however. It also allows the player to go down two distinct playstyles. The path of the Lich will grant the player a massive number of soldiers to use in their campaign, as well as a way to pump out fresh recruits quickly. They have a distinct 'quantity' feel to them when compared to the path of the vampire. The Vampire path gives the player a number of bonuses to the quality of their troops and makes them much more efficient in combat. In gameplay terms, the two splits are therefore, quality verses quantity.

After they have been successful in destroying the Arcturian order the Dread League can then enter a special game mode known as the 'black crusade'. The Black Crusade is a state where the Dread League will automatically declare war on the countries around it, making it particularly challenging if one has not built up enough industry or troops in order to overcome at least some of the other factions. Even so, it has proved a particular interest to the hardcore audience, as was originally intended. It was designed to cater to a specific kind of player, and it has happily filled that niche, with praise even from less hardcore players who simply want to experience the prospect of going up against the entire world at once.



Overall the two nations were a resounding success and I am thrilled at the response the two have gotten. The Dread League topped our community polls for most popular nation. In fact the strong response towards the two nations was so positive, it has warranted further expansion beyond the original scope that they were given, which I am working on currently.

You can download the current version of Equestria at War and see my work firsthand on the steam workshop, or on moddb.

https://steamcommunity.com/sharedfiles/filedetails/?id=1096009291

http://www.moddb.com/mods/equestria-at-war

Sunday, 28 January 2018

Equestria At War

Over the past few months I became very interested in learning to mod for Paradox's Clauswitz engine. I knew that the studio supported a wide variety of modding projects and I was keen to see what I could do with it. In order to further my understanding of the modding tools and to give myself a personal project with which I could co-operate with others thus I decided to help out with a modding project that was already underway.

There were several modding projects which were looking for people to help out with them, however none of them went into the breadth of subjects that I wanted to cover. I wanted to know how to properly create national focus trees, ideas, and script events and in game triggers. After all, such things are what I would imagine a high level scripter at paradox would be doing, and high level gameplay scripting is something I love to do.

There are several total conversion mods out there for Hearts of Iron 4 and most if not all have large teams already and were not looking to take on more people to help with their mod, however, I found one that was.


Granted, I find the merging of hasbro's 1980s My Little Pony reboot and a world war two strategy game to be incredibly jarring and perplexing, the mod is fun to work on. I find if one shuts their eyes and pretends it's not about colourful magical horses with tanks, the actual political and socioeconomic issues which are being discussed work very well.

Equestria (which is the defacto nation which My Little Pony takes place) is a stagnant peaceful giant which must rapidly modernise and shed its peaceful beginnings in order to meet the threats of enemies within and without. The central narrative is compelling and other nations are interesting, creative and have their own unique spins and twists. A lot of fan re-imagining has had to occur in order for everything to make sense (If a weird bit of sense) and the world seems to be populated with scenarios and characters that mirror both the historical and the real world.

Taking the mod on, I have been given the task of creating two focus trees and narratives for two minor nations which will appear on the new as of yet unreleased 'griffon continent', and I am partially responsible for the design and implementation of one of the major factions too. I cannot disclose details at the time of writing.

Suffice to say I have learned a lot about how paradox scripting works and I have learned a lot about how to approach the design of a playable nation in a video game. The unique challenge in developing for Equestria at War has probably been overcoming the theme of the mod itself. My Little Pony and world war two, whatever you think of either, it is really hard to make the two feel like they should go together.



That is precisely the opinion that I took when designing my countries. After all, the intended audience or the mod is very niche, and keeping in players who don't fit that niche has been central to my design. Fans of MLP (or Bronies as they are colloquially known) need to be convinced on their first playthrough that the modders haven't completely abandoned the spirit that their franchise tries to convey. Meanwhile the average Hearts Of Iron 4 player who might have tried the mod out of curiosity (or most likely, a lark) needs to be convinced that the mod offers a genuine Hearts of Iron 4 experience so that they will keep playing.

It's perhaps not the project I imagined myself working on, but I am genuinely enjoying the unique challenges associated with it. I am learning a lot about the technology that the clausewitz engine uses and I am enjoying learning about how to work in a team with other modders. Besides, 'I worked on a mod which combined colourful magic horses and world war two' is a heck of a conversation starter.

The mod can be downloaded and played with a copy of Hearts of Iron 4 at: http://www.moddb.com/mods/equestria-at-war

SFM Models and animations into Unity

A couple of months ago a friend of mine had a thought. Source Film-maker is a tool which is widely used by content creators to create animatons and movies. There are a lot of complaints that it is finicky and awkward to use, but it continues to be popular. He wondered why, such a tool isn't used to make animations to import them into Unity or another game engine. So I decided to provide him an answer.

It turns out, there isn't much of a reason, as the process is quite straightforward. A SFM model can be ported into Blender using a third party add on and then converted using blender into an FBX file. The same thing can be done with a SFM animation as demonstrated by a short video that I made for him.



It turns out that the animation moving around was an issue with Unity physics reading the animation movements into its physics engine. Turning that off means that the animation will play normally.

If one wanted, they could quite easily apply this to a SFM model and use unity scripts to bind the model to the animation data points and quite easily have an animated character, providing one can actually animate in Source Film maker that is.

A short fun project, but one which I found quite an intriguing problem which through the use of third party tools, is quite solvable.

Wednesday, 14 June 2017

Platoon AI Project

During the third year of university, for my dissertation I wanted to focus on game AI and the techniques that are used to create AI, or at least, the semblance of AI, in video games.

For this task I had to research various techniques which are used to create AI, such as Hierarchical Task Management and Goal Orientated Action Processing. It was a great opportunity to learn a lot more about a field I had only briefly glanced over during my first year of university. It was great to hear how the logic of game AI worked and has helped me in my further projects when thinking about how to create AI.

The actual dissertation project was to 'Create an AI which mimicked real world Platoon Level Tactics'. Now, to the uninitiated in military organisational structure, a platoon is simply a group of men. No doubt you will have heard the term 'squad', well, a platoon is essentially a group of 'squads' alongside machine gunner teams, mortar teams and under the leadership of a lieutenant. Squad AI is something which has been done before, but I was more interested in creating a simple algorithm which could control a group of groups effectively.

The demo itself uses SFML to represent graphics. There are two teams of dots, red and green. The yellow and blue dots are 'officers' of each team. They act as rally points for the squad members, but I will explain more about that later. The blue squares are 'cover' which improves survivability, and the green squares are open ground

The algorithm itself is separated into two specific parts. The individual soldier's logic, and the platoon order logic.

The individual soldiers use a GOAP algorithm to decide their actions. They take in information about the world such as how far they are from enemies, where their officer is located and where cover is, as well as what their orders are in order to make a decision about what they are going to do.

The Platoon order Logic uses a basic HTM system to decide whether the soldiers orders should be to attack or defend. The soldiers then use this information to work out their preferential tactics.

Overall the system is a good representation of the techniques, however it lacks a little in quality of life features and debug information to properly showcase the algorithm. I also feel I did not use enough C++11 features during development, and that is something I will continue to work on.

You can download the codebase for your leisurely browsing from the github link below.

You will need Visual Studio 2015 in order to run the demo. It currently does not run in release, you will have to build it and run it in debug. You will also have to use the visual studio 'stop debugging' button in order to quit, as the window quit function does not work.

https://github.com/Falsan/AIPlatoonProject

Saturday, 3 June 2017

Galaxy Defender TV

Galaxy Defender TV is my first independent project. I started this just after I finished most of my university work. It's a pet project which is designed to be a fighter shooting arcade game, similar to R-type. I have created this game in Unity and I created everything from scratch.




I built an Audio manager entirely from scratch which works very well. This manages all the sounds and audio in the game, and so long as there are sound clips in the resources folder, you can just pass the manager a string and it will create that sound at that specific time. It's a really nice system, and it even does fade ins and fade outs.

I also created a generic 'Application Manager' which utilises Unity's scene management tech. I use this manager to use the additive scenes which are now common in Unity, to load in things on top of each other, and load out what I need to get rid of. It needs some work, but it is a nice system so far for what I need.

I made every single enemy produce a simple behaviour pattern and I made each enemy shoot at the player, or not if they were tagged as a shooting enemy and I also designed the levels and bosses for each of the levels too. I wanted these to be huge screen filling enemies in custom with similar bosses and games of the time.

I also created all of the models and all of my own foley for the game as well as UI elements and particle effects.

The game isn't finished yet of course, there are quite a few things that need to go in. Some proper in game UI, a pause menu, a score system, several new models, several new levels, some better menus, scaling for screen resolution and some background music. There is background music in there at the time of writing of course, but it is not my own.

If you wish to download and play the current build, you can find it at the link below.

https://drive.google.com/drive/folders/0B2-4-3Aj27LXOGFWTE12UG1pSUk?usp=sharing

Friday, 2 June 2017

Kojima Drive

At the end of our game jam module in the third year of university, the entire cohort had to work on a game together. This was a highly ambitious project and the largest one I have done to date. Kojima drive was the brief that was given to us. We started off having to come up with game modes for a party driving game which were to form the mini games in the game.

We created a game mode which we entitled 'drive and seek' which was a kind of hide and seek. The player who was the 'hider' got a head start and had to evade the 'chasers' before finally reaching an end point.



I was in charge of the initial game mode logic which was then scrapped and replaced with a better system which utilised Unity's events. This system then later went on to be made with all of the game modes in Kojima.

I then went on to create several little systems such as waypoints, teleporters and decoys which never went into the game in the end. I also was given a 'twist' mechanic to create a manager for, however, due to poor inter team communication, this feature was never implemented in the game. It is widely the consensus of my team that this was not my fault, but nobody who was meant to be figuring out what to do with the system were actually thinking about what to do with the system.

I also helped to fix plenty of bugs in the game code with my group's systems, and I worked with my team throughout to support the systems that they were making



Overall, Kojima turned out to be a decent game, however most of the features that were made for it that I created didn't end up getting put in, which is a bit of a shame.