Posts

Showing posts from 2020

troy: sk8er boi

Image
 So now that we've got everything moving and all of the parts in, we need to test it and tweak what isn't working, so for example with the barrier in place the chariots would go past the archers [good] smack into the other side of the map [bad] and then came back towards the archers [good]. It turned out they where massively over-shooting because the chariots where going at about 200 mph, meaning that now amount of braking force could slow them down enough, so I played with the speed, turning it down a little and then running AI over and over again until the chariots did what I wanted them to. There isn't a whole lot to show visually here since it was just a lot of tweaking code and numbers, so idk just enjoy this picture of an old fiesta with teeth. 

troy: idk, seven?

Image
So now I've got some chariots running around and more importantly some archers getting ran over I'm going to be looking into creating the barricade, that's designed to save the archers from meeting their grizzly fate. Getting the model is pretty straight forward [well except there arent many free models of anti-horse fences so instead to got a regular fence, duplicated it set each one at 45 degrees apart from each other]  However unity ai doesn't move for pretty looking barricades, in fact left as is the chariots would simply clip through the barricade. In fact what the ai sees is this blue map.  Any non-blue areas are places where the ai cannot go, either because the there's something in the way, there's a gap too small for the ai to fit through or a slope too steep. So how do we access the blue void, and how do we slap an un-accessible area in it?  By setting the object as 'static' unity recognises the ai cant pass through it and updates the blue map ...

troy: feeling sea sixth

Image
 So we have people moving, but what now? Well now we want them to be killed off. Lets start with killing off the chariots and we have two options. we can either write some proper AI for the archers OR simply add a timer and distance calculator so that if the chariot spends time within a certain radius of an archer, the chariot will have periodic damage done to it.  As seen in the script, when the chariot runs out of health the game object is destroyed and a prefab called 'tombstone'  is slapped into the world. So now we have to do something similar for the archers. And this mostly true, with the exception of the distance and removing the time frame so the archer dies instantly when hit by the chariots. Originally I wanted to spawn a tombstone when hit, but found that since the tombstone was identical to a dead chariot, it was extremely confusing to work out who actually died. So instead the archers spawn skeletons, and when testing I found that the chariots...

troy: five's alive

Image
So we have a world and some gubbins that need to move around it. For this we need to do coding and AI stuff, but this will easy as anything since I used the path finding AI in a previous project so already have the line of [remarkably simple] code and an understanding of how to use it.  firstly, we need to set our charriots up with a nav-mesh agent, so the charriots know how wide they are, how steep a hill they can go up, how fast they are, how mad they can go round corners etc.         Now on the coding, it's literally one line that sets the navigation agents target to any item that's tagged as 'arch',  which is easily done by setting up the archer as a prefab and creating a the tag arch. And boom, that's about it, we have a dude who will run around after an object. 

troy goes fourth

Image
 So we have our models but lets work on a world to put them in. Now we're not looking to make this the best looking map, since firstly we're just trying to demonstrate a mechanic and spending hours creating a detailed map would be a waste of time and secondly we're using unity so obviously it's only going to look so good anyways. But creating a reasonably good looking terrain as appose to a flat, white void can go a long way to making your project look a lot more professional.  In the unity terrain editor you can paint on textures, heights and trees. So to make the world look a little more Greek/a little less Sahara I chose to add some greenery, but no bog standard trees where going to cut it so I once again hit up Sketchfab, found some pretty looking trees, slapped them into unity [and completely butchered the textures] and sprinkled a few onto the map.

troy again

Image
 troy: part 3 so we've mostly got our plan together, now we just need to make it. So we're looking to make a [admittedly very small] section of game and for this we'll be using unity [my reasoning for using such a sadistic program I'll explain in due course] so obviously we're going to be wanting to put something in our scene, such as chariots, the archers and a world for them to go in. So we're left with the conundrum of needing models which, like many things in live, can be solved in two ways. Either make your own or steal it. So with shopping list in hand we can head over to one of my favourite websites, Sketchfab. Much like the unity store, except with a lot more free stuff that's a lot better made and a lot more varied. I decided to start with finding an archer, of which there was quite a selection. such a vast selection in fact I found pretty much exactly what i was looking for.  specifically the little guy on the top, second from the right. So i downl...

troy: wait a second..

Image
  part 2 The creative process always starts with the same three steps; research, research, cry. this especially goes for topics that you might not already have a solid understanding of or an area that you just don't have a whole lot of knowledge in. say, for example, ancient Greek archers/ soldiers or tactical anti horse defences. And although my search history now looks like I have a personal vendetta against horses, I now know a whole lot more about 'cheval de frise' [in laymen's terms, big long spiky things intended to stop cavalry]. At first after a little research I found that many of these devices where absolutely huge, and it occurred to me that no man, even some macho man soldier dude, could singlehandedly carry half a tree, so it was back to the drawing board.  However remember that these anti horse contraptions are only half of the equation, so I started looking at the units in Total war troy that id be designing for [such as archers, light foot soldiers and s...

troy: part 1

part 1 A couple of weeks ago I received my first brief assignment, to design a artefact for the new total war game, 'total war troy' [artefact in this case not literally referring to an ancient piece of tat, and instead refers to simply something manmade, specially video game related] Being a game designer [debate that as you will] I was given the following options; ·        a prototype level design, (1x football field) ·        an in game mechanic ·        an in game system (e.g. currency) ·        a prototype UI design ·        or a prototype narrative design       So at first I wanted to add some sort of mythical inspired mechanic, since the Greek  era is steeped in more  mythology  and folk law than you can shake a  stick at, however, after a little rese...