Categories
Virtual World Building

Llama Drama Dev Blog – Critical Appraisal

Frankly, this wasn’t a great project for me. The combination of physical sickness early in the year and mental health issues later into the year meant I was playing catch up the entire time pretty much. I felt like I was always behind schedule and didn’t have enough work completed because most of my time was spent redoing the same things because they wouldn’t work in the first place, or they had to be changed to allow something else to fit in. I also spent a lot of time just researching and watching videos, trying to learn as much as I could about what I needed to do and the ways to do them.

It never really felt like there was a time when I could focus on this project. We spent a month or two planning a project idea that most likely wasn’t going to be what we worked on, then we had a submission that required detailed plans of the project we were going to work on for the year. The others ended up doing their original ideas, but our group had to come up with something new and flesh it all out in a week or two in time for the submission. After that was the thesis submission. We needed to research a ton in order to formulate the structure of the paper, and then we needed to write it all. That left little time to focus on this project and probably contributed to my feeling of playing catch up. After that submission we had a little time, but then we had the showcase to plan for with their numerous deadlines, and the virtual networks submission. Along with all the presentations we’ve had every few weeks and having to prepare for them, it has kind of felt like everything has been trying to take our focus away from this project, despite it being the final major project.

Working with Colin and Jamie over the course of this project has certainly been an experience. Compared to our Sheffield collaboration last year, I think this one has gone much better. Being able to use your preferred skillset with some overlap with others, I think, is a major benefit when it comes to getting work done and seeing the vision come together. We were able to plan things easily as we were all enthusiastic and we could bounce ideas off of each other since we all liked to play video games too. There have been times when we’ve needed something done before we could progress and it’s taken a while, I know I’ve been the cause of that at least once, but everyone managed to find something to do in the meantime. It is also refreshing to get a different perspective on a problem you are having. They might give you ideas for how to tackle it that you wouldn’t have thought of due to your thought process being different. Or they may even have the same approach, but being able to discuss it could lead all of you to a new solution.

In regard to my own efforts in this unit, I struggled a lot. It constantly felt like I hadn’t done much and couldn’t show off much work despite putting in the hours. There were times I would help the others with their problems, some bigger and more demanding than others, but that didn’t really feel like I was contributing work to the project.

Pretty much everything to do with the llama has taken me many more hours than you might think from what can be seen. Designing the basic concept took hours of drawing terrible concepts until a friend showed me some AI concepts as they had been generating some for their own work. That saved me a huge amount of time. Modelling the llama took even longer than drawing it. Multiple attempts from different approaches and it would never go how I wanted. My perfectionist brain really sucks when I can’t manipulate the tools the way I want to. I hated modelling that llama. Probably should have given it to Jamie to model seeing as he was handling all the rest of the modelling, but I did ask if anyone wanted to do it when we first divvied up the roles and he said I should do it seeing as the llama was my brainchild from my original project idea.

Coding the state machine was also a long and arduous task. I offered to do it though because I did have a little experience from last year with state machines, so thought I would have the least trouble with it. I don’t know if Colin would’ve done it faster, probably would’ve, but after seeing how he does his other scripts I think I would be horrified to try make sense of a state machine written by him. It was hard enough for me to understand what I had to do for my own. I think part of the reason it was harder than it should’ve been was because Colin and I were programming scripts that needed to interact with each other separately and making them work on their own before putting them together much later. Not many of our scripts needed to reference each other, but it probably would have helped me to structure some areas of the state machine quicker/easier had I known the variables and methods he was using to pretend to be a state machine. I remember my dad telling me we should make a dictionary or whatever you call it, where we put the variables we each will use so we can know how to make them interact. I forgot about that, so we didn’t do it.

Overall, very stressful last year. I’ve learned a lot through all this self-study and collaboration, and I think it will help me a lot when making my own games, whether that’s as a job or in my own time. It has been a pleasure working in this group and seeing the fruits of our labour come to fruition.

Categories
Virtual World Building

Llama Drama Dev Blog – Llama State Machine

This thing has given me so much trouble over the months. A previous project I did also had a state machine so I thought I had learnt somewhat from that one. Apparently not. I struggled with this thing. What started as four states and a bunch of item interactions quickly became nine states with numerous conditions between them. It hurt my brain to think about it so I spent a few months just writing it down on paper with pseudocode so that I could change things easily but still see previous work.

It was also really easy for me to get confused when writing the script to the point where it was easier for me to just start a new script than to try figure out what is missing from the current one, as shown by the numerous similarly named scripts in the adjacent image.

The most confusing part of making the state machine was figuring out how to do it. Having only made a very simple one before, my immediate thought was call each state as separate functions in the update function. I then got confused about how I would transition between each state and just everything. The other idea was to put absolutely everything in the update function but I figured that there would be a lot and putting it all in the update function might not go very well. It would also mean I’d have to plan around the function getting called every frame, and I couldn’t just make the code wait before executing the next line. The other option I was shown was to make classes for each state and fill the classes with the code for each state. I tried each of them and got confused every time. I thought making separate classes for each of them would be the best way to go, if only I could wrap my head around it. I understood it in class but then I went home to try and just couldn’t understand anything. So that’s a no go. I couldn’t figure out how I would go about having each state as a function, so that was out. Leaving me with putting everything in the update function.

States as Classes
States as Functions
Everything in Update()

The state machine ended up with ten states, nine of which are currently in use. Idle, Searching, Advancing, Retreating, Annoying, Attacking, Spooked, Stunned, Trapped, and Grabbed. Grabbed is not in use currently as we decided to leave it out, but it would be for when the player picks up the llama. Idle is when it’s doing nothing and is used as a transitional state. Searching is when it gets a random target to go to. Advancing is when it paths to its target. Retreating is when it runs away and paths to a random hiding spot to then check if there is a line of sight with the player before teleporting away. Annoying is the task version of attacking – the llama takes one of the items required for the player to complete a task. Attacking is for the llama to do some sort of damage to the player or specific items from the fabricator. Spooked is when a thrown item or a specific fabricator item effect makes the llama run away but come back to the same task target or fabricator item target. Stunned keeps the llama from doing anything until the duration is over. Trapped is similar to stunned only it requires a physical trap object to keep the llama there.

There’s not much else to say about the state machine. Despite how big and important it is, it’s pretty much just the states, how to transition between the states, and any interactions with other objects in the game.

Categories
Virtual World Building

Llama Drama Dev Blog – Target Randomisation

One of the main jobs the llama needs to do is to get a target and path to it. But we don’t want it to be the same target every time, so we want to randomise it. And when the target has been dealt with, we want to get a new target that isn’t the previous one. By itself it is pretty simple. Make a list of targets, randomly pick one, and set that as the agent destination. When it has been dealt with, remove it from the list and randomly pick a new one.

Target Randomisation

This isn’t by itself though. There is a HUD for the player that lists the tasks they need to complete. Those tasks are the targets for the llama to disrupt. That list is random every time, with a task appearing third in the list one day and maybe first the next. To make matters even more confusing, that list is full of integers. Somehow the llama needs to take a list of integers that correspond with certain tasks and then populate its own list with the gameobjects of those tasks, then path to one of them, disrupt it, remove that gameobject from its list if it gets removed from the HUD list, and get a new target.

I got around it by giving the llama two lists. One of them gets the integers from the HUD list, the other gets the gameobjects that correspond to the integers in the first list by using a switch case for each integer. In hindsight, it’s not actually as bad a problem to solve as I thought it was at the time.

Corresponding Gameobjects of Integers

The other problem was the llama lists weren’t actually getting any of the tasks from the HUD, and the HUD wasn’t even filling its own list fully. Colin and I thought maybe the HUD script didn’t like referencing the llama’s script so we tried having the llama script reference the HUD script, but that didn’t work. We spent hours on a call trying to figure it out but nothing we did worked. Finally decided to use the download the debug tool and attach it to Unity as I remembered I could stop the code executing to see what happens. It’s been a few years since I last used this tool so I didn’t think of it for a while. We put in a bunch of breakpoints and found that it was skipping some, but we couldn’t figure out why it was skipping them. It would start up, add two items to the list, then skip. The next time it would start up, add one item, skip. It was inconsistent, but that also made me think that it was a specific thing that was triggering it. I decided to use step over instead of breakpoints to go line by line and see the results of variables. Turns out that when the script was removing variables “task1”, “task2”, and “task3” from the list “tasks” if any of them were null it wouldn’t know what to do and would skip to the next frame. So a simple gameobject not being assigned in the inspector turned out to be breaking the entirety of the game. After adding the object into the slot in the inspector, everything ran smoothly and all the lists filled up nicely.

Debug Mode
Categories
Virtual World Building

Llama Drama Dev Blog – NavMesh

The best way to have a state machine path around an environment in Unity, I found, is by using a navmesh. I had briefly looked into them in a previous project, but due to the tutorials I was following leaving out a lot of the required code and details as to how to get it all to work, I didn’t go ahead with using it. So this was my first time using a navmesh.

I spent quite a bit of time just watching videos about how they work and the different components just to get used to them. I found Brackeys’ “Unity NavMesh Tutorial” series and LlamAcademy’s “AI Tutorial Series in Unity” on YouTube particularly helpful. I also found it pretty funny that I found a channel called LlamAcademy that has an entire playlist about navmeshes when I’m needing to learn about navmeshes to make a llama move around.

I started testing how navmeshes work in my test project, starting with a simple point and click navigation.

Point + Click Navigation
Point + Click Script

After that it was pretty easy to set up a navmesh. If an object isn’t going to be moving then set it to “Navigation Static” in the “Navigation” tab, check if you want to generate offmeshlinks for it, choose from the drop down if an agent can path on it, and bake.

Llama Drama NavMesh

I did see in several videos that you can use downloadable navmesh components instead of the built in navigation tab and it looks like they have much greater flexibility. I would like to try use them in the future, particularly for offmeshlinks. The built in navmeshlink component takes a start and end gameobject for it, whereas the downloadable components can designate entire areas to link between instead of the position of specific gameobjects.

The navmeshagent is pretty straightforward to set up too. It is annoying, though, that it allows you to make custom agents besides the default humanoid, but doesn’t like when you do. We had a lot of issues with custom agents where they would work fine for a while and then out of the blue Unity didn’t like them. We ended up having to go back to the default humanoid and change the values of that around, which isn’t such a big deal with just one agent in the scene, but if we had multiple different types of agent then it would’ve been very troublesome.

In the state machine, the llama teleports from one location to another when spawning into the office and running away to hide. Turns out, navmeshagents don’t like it when you use transform.position to set their new position. Sometimes it works, like it did for me for months, but at some point it will probably break and never work again. So use navmeshagent.warp() instead. It does the exact same thing only the agent will like you more for it. I haven’t had a problem with the teleport since. Just make sure you’re warping onto a navmesh.

Unfortunately, a problem has come about this last weekend. So navmeshagents have multiple coloured arrows that point in directions corresponding to the values of those arrows. One such arrow is blue, and the blue arrow points in the direction of velocity. The direction the agent is applying force to move is the direction the blue arrow points. Our problem is that sometimes when the llama spawns into the office workspace, that blue arrow is pointing straight up. Consequently, the llama doesn’t move when that happens because there’s no velocity being applied in any other direction, and the agent won’t leave the navmesh. We didn’t have this problem before and we have no idea how to fix it. The internet is not very helpful for this problem. Sometimes the arrow will point in the direction it is meant to, but it will flicker, and the agent with slowly move in that direction. It will constantly change speeds but never reaches the set speed it should be using. We’ve tried asking lectureres for help and they’ve given suggestions, but they haven’t worked either. So we’re stumped. I have no idea how to fix this problem and I’ve been trying all weekend to no avail.

Categories
Virtual World Building

Llama Drama Dev Blog – Llama Model

Using the drawings, I started modelling the llama. One thing this process has taught me is that I really hate modelling creatures, which is pretty funny if you know that I sculpted creatures out of clay for my Art GCSE. It’s probably from the lack of control you have with the mouse and keyboard compared to using hands, and it takes much longer to get the same amount of progress. Anyway, my first attempt ended up as shown on the right. I thought getting all the vertices to fit the outline of the reference images would be a good place to start, but that ended up stumping me more as my perfectionist brain decided that because it clearly looks too blocky, I couldn’t advance further despite my attempts.

I struggled with a few new attempts before I finally got one that stuck with me. Instead of doing the outline of the entire model all at once, I did each part of the body separately. I started with the main body, rounding it throughout so that the widest parts would be the middle vertices. I then moved onto one of the front legs and copied it for the others. The back legs are slightly different from the front though, so I needed to make adjustments before copying to the other back leg. Next was the neck and head, which I kind of did at the same time. I modelled the neck up to the top of the head and then extruded from that to make the face. The ears and tail were pretty simple from that point. All of this was done by extruding from existing faces to add to the model. The eyes were a little annoying as they aren’t symmetrical and the faces of the mesh were arranged in straight lines, so making round holes wasn’t smooth. As you can see from the left and below images, however, I did manage to get the model done. At this point, it needed a bit of sculpting to get some more facial details, but I needed to work on other areas in the project and so ended up leaving this for quite some time.

Front View
Top View
Side View

I came back to it briefly to test the colour scheme we had chosen back in the brainstorming phase. As you can see, they are very bright, much brighter than we had anticipated, meaning more testing was needed. I also worked on the UV unwrapping just to get it prepped for when I would come back to paint it in photoshop after we had decided on the new colour scheme.

UV Editing

Me being the forgetful moron that I am, I forgot that I needed to smooth the mesh more in order to sculpt the details into it, and that would mean I would need to retopologise afterwards to reduce the polygon count. So the UV unwrapping was pointless.

When I did eventally come back to finish the model, I had spent so much time just getting other things to work, such as the state machine, that I was in a rush to get this done in time. This led to some features being left out, and others forgotten. The derpy tongue, sculpted facial features, and UV wrapping to name a few.

I did retopologise the mesh using the quad draw tool but it needed smoothing again to get that cleaner look. There are still way fewer polygons than before I retopologised though.

Then the tedious process of rigging began. I needed to come up with the bone structure, which wasn’t too bad, but then weight painting occured. One of the joys of weight painting is finding that you haven’t actually removed all the weight from an area of skin. The default look of weight painting is the black and white shown below, black being no weight and white being full weight with grey being somewhere between. There is an option to turn on colour ramp and it shows the weights in colour. Apparently black doesn’t actually mean no weight because I didn’t paint any weight before turning on colour ramp and taking the picture below. It’s always fun to think you’ve finished the painting and then when you go to test the rotation of a joint part of the nose is moving, even though you’re rotating a leg.

Another joy of weight painting is finishing painting a joint, changing to a different one, and then when you go through them to check they’re all done it turns out they’ve all added extra weights in places they shouldn’t have. It’s a repetitive and tedious process of continually redoing the same joints until they finally acknowledge what they’re supposed to be like.

That is all that would be done for the model. I wanted to UV wrap it but as shown below, the UVs consisted of hundreds of shells in a cluster that needed cutting and sewing together, and I just didn’t have the time amongst all the other problems that kept coming up to sort it out. So any colour editing would need to be done in the Unity project where there is much less control with settings materials in already made prefabs.

I also didn’t have time to manually keyframe all the animations, which was stressful as I had looked before online for quadrapedal animations and there are barely any. Pretty much none are free either. Luckily, I found a Unity package that had some animations that I found interesting – “Free Animals – Quirky Series” by Omabuarts Studio. This thing was honestly a life saver.

For now, the colour of the entire llama is brown as I can’t separate the parts of the mesh in Unity. This, along with many other problems and quality issues, will be fixed before the showcase.

Categories
Virtual World Building

Llama Drama Dev Blog – Detection Bubble

The purpose of the detection bubble is to detect specific entities within a given radius around the llama. We originally wanted it to detect the player, any items thrown by the player, and items from the fabricator. With the cut back of items from the fabricator, and the continuous new problems with the state machine, the bubble only detects thrown items.

Detection Bubble

In the video above, you can see the bubble in effect due to the use of an editor script. The lines are visible in editing mode but disappear when running. You can set the radius of the bubble depending on how far you want to be able to detect objects. The yellow line is the angle of detection and can be changed from 0 to 360 degrees, opening outwards from the front of the object. Also, you can set objects to obstruct the bubble and act as a barrier to prevent detection, or just completely ignore objects by using layer masks.

Detection Script
Editor Script
Categories
Virtual World Building

Llama Drama Dev Blog – Llama Design

I didn’t know what I wanted the llama to look like so I started by drawing the outlines of real llamas to help me get the general shape so that I could then draw miniature stylised llamas.

I wanted to see if I could draw something cute but recognisable.

Out of the two drawings above, I drew the darker lined llama first. It was too realistic and not cute enough for my liking, so I drew the smaller one next to it. This one looks much closer to what I want with its size and proportions but I felt that it wasn’t recognisable as a llama. It did make the idea of short legs more important for the design though.

After not much success, I started creating AI generated concepts of a llama using Dream by Wombo and DeepAI, with varying degrees of success. As our game is set in a post-apocalyptic world and the llamas have mutations, it meant the AI generators could really go ham with what we could accept. And they did. The prompt “short legs” apparently meant three legs. Below are a few examples of art generated by the AIs, and you can find more here.

We ended up picking a more casual design that we wanted to take from but with some adjustments. The full body image below was our choice, however, we decided to shorten the hairdo. It is also an example of “short legs”. I didn’t really like the eyes though, so I decided to change them to those of the image next to it.

The idea of a derpy tongue hanging out was also suggested. The adjacent image is what I drew using the group feedback and AI images as references. I added the mismatched eyes as my own idea and we all like it. It’s cute, it’s derpy, and it’s strangely menacing.

I started working on the character rotation of the llama, drawing front, back, and side views of it. The front and rear views are alright but I really didn’t like the side view I drew. It looks more like a dog than a llama, and that’s after changing different body proportions to make it look somewhat comfortable on the eyes. I hate it. I needed to change it before I modelled the llama.

Front View
Rear View
Side View

I went back and redesigned the side views of the llama. They don’t quite line up with the front and back views but I think they are close enough that I can mess around during the modelling to find what works best for the overall model.

Categories
Virtual World Building

Llama Drama Dev Blog – Brainstorm

After presenting our individual ideas, we then had to decide groups to work in and what project to work on. Colin, Jamie and I decided to work together and create a new game idea with elements from our individual ideas. We created a Trello board (https://trello.com/b/HDvGRJQv/llama-drama) where we could add ideas, research and concepts to.

Trello Board

It was decided that we would make a narrative game with a frustrating llama and machine learning somewhere. Where exactly to be decided later.

We all assumed we’d just do all the jobs in the group when needed, resulting in all of us working on animations different points for example, but that’s not very professional of us. So we came up with a list of roles for each person and any extra things will be done by any of us/external help if needed.

Project Management
Colin & Jamie & Will

Design
Colin – Level & Environment & UI
Will – Llama

Narrative
Jamie – Story of game

3D Modelling
Jamie – Office environment
Will – Llama

Programming
Colin – Fabricator & Item Mechanics & Anything Else
Jamie – Narrative Objects & Anything Else
Will – Llama State Machine & UI & Anything Else

Animation
Colin & Jamie – Non-Procedural
Will – Procedural

Whilst Jamie worked on the narrative of the game, Colin and I started researching office environments. Colin’s research to design the layout for the game, mine to see what examples have been made before and how they turned out. I also researched how to make a cute game character for the llama. Didn’t need to research the llama since I’d done that for my individual idea.

After finishing the narrative, Jamie started working on modelling some equipment for the office environment.

Desk Model

After researching, Colin has worked on designing the items the player can use in the game and writing the proposal document.

more items
Item Designs

The llama padlet has our design portfolio for this game.

Categories
Virtual World Building

Frustration Game

For our final major project we needed to come up with an idea and present it before making groups and creating an idea to then make.

My individual idea was to make a frustration game where you would be… frustrated. I got the idea mainly from watching a YouTube video by Valefisk (Valefisk Crypt) and I thought it would be fun to torture people with a game of my very own making.

I went to jot down my initial thoughts about how to make a torturous game but they were heavily influenced by the video at the time and I didn’t like that.

Frustration Game Notes After Watching Valefisk Video

In case you can’t read my terrible handwriting, the image says:

FRUSTRATION GAME

Key Bindings } Bad/Wrong/Strange

Tooltips } Bad/Wrong/Strange

Fals Advertisement

Lack of Tutorial

Narrator

Companion

Maze

Puzzles

Disappearing/Reappearing Items

Meaningless Clues/Items

Sadistic

Pedantic

Technicalities

Common Phrase Voice Commands

Maze

Dead Ends

Long Corridors

Hidden Areas

Puzzles

Pictures

Items

Randomness

Unrelated Items

Inspiration

Crypt – Valefisk

Animal Crossing (Mr. Resetti) – Nintendo

The Frustration Game – Jeremy Wang (Disguised Toast)

Jump King – Nexile

Getting Over It With Bennett Foddy – Bennett Foddy”

I decided to go for a more frustration based approach than straight up torture as no one wants to play a game that isn’t fun. Torture isn’t fun, but frustration can be, so I researched frustration. Games, characters, mechanics, whatever I could find.

I collected a bunch of game examples that had frustrating elements to them (https://artslondon.padlet.org/whobbs0120191/fmp_inspiration).

I browsed forums and articles to find opinions on game mechanics that are frustrating. The image below is of my notes.

Research Notes On Frustration

During my research I found that Bennett Foddy came up quite a bit, so I looked into him. Turns out he is quite the frustration game master, having made multiple titles, some of which I have played unknowingly. Foddy has a website where he posts about things and games he’s made, and there is an article written by him about frustration (https://www.foddy.net/2017/01/eleven-flavors-of-frustration/). I found this article particularly useful to help decide what kind of frustrations I might like to add to my game.

Moving on from frustration, I needed to figure out what type of game I would make, and the setting of it. Before I’d done the frustration research I had kinda gone towards a puzzle game, so i collected some info about puzzle games (https://artslondon.padlet.org/whobbs0120191/fmp_puzzle_games).

While looking at puzzle games, I remembered about the Tomb Raider series and thought it would be cool to have an ancient setting. Cue me trying to figure out what kind of ancient setting I wanted. One day, a friend and I were talking about movies we liked when we were younger and The Emperor’s New Groove and The Road to El Dorado were mentioned. This began the idea for what setting I wanted – Inca. I researched the Inca and collected a few notes about them (https://artslondon.padlet.org/whobbs0120191/fmp_inca_empire).

The Emperor’s New Groove influenced me quite a bit, to the point I wanted a llama companion for the player in the game. So time to research llamas and how people have made them cute (https://artslondon.padlet.org/whobbs0120191/fmp_little_companion_buddy).

I ended up changing from a puzzle game to a platformer game idea and created the following presentation about it.