Posts

troy: ten

Image
 Finally, we have our video clips and its time to turn them into a cinematic masterpiece. I started by slapping the clips straight into windows movie maker [an extremely restricting program but I couldn't get after effects to work with my laptops video card] I trimmed the clips down, removing the parts where unity would take a while to boot up. I also had to reshoot some scenes, either because notifications where popping up or I just didn't like the camera angle. The final video did go through a few revisions, as originally I felt that it didn't contain enough information and couldn't stand alone without the report, so I went back and added several more captions to describe in more detail what was going on in the video and what Id spent the last few months of my life on. I then exported the film in two different levels of detail [as this effects the file size, I didn't want to have a film so big that I'd have to go back, open up the movie maker file again and re...

troy: ach nein

Image
So, finally, I got the gubbins moving around and doing what we want, so now I've got to record everything to show off how smart I am. For this we're going to need some screen recording software, and since I don't have any money it seems smartest to use a free option, for example OBS. It did take a while to get working thou, since OBS works by recording off of the graphics card, but since my laptop uses two cards I had to go into settings and tell OBS where to record off of. After that it was as simple setting up the cameras and letting unity play out, showing how the barrier has an affect on the chariots [since that's the mechanic that we're trying to sell here]

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.