Posts

Showing posts from November, 2020

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...