Work Post

Jun. 21st, 2017 04:13 pm
relee: Picture of Relee Starbreeze, Wizard (Default)
4:16pm - Well I'm down at the McDonalds again and their internet is fixed. I'm going to try and work again, since there's nothing for me if I give up. ^.^;;

I'll admit to some anxiety in dipping my toe in again. Just thinking about what I have to do in little bites is hurting, but I'll try to put it together.

The last major thing I did was add sensory cones to the tag player I'm building. So I need to test those cones. To that end, I need to create a sensory script on the cone that outputs to the debug log when it detects a test object in its volume.

4:32pm - Blarg! The Unity Manual just chastized my use of meshcolliders on moving objects and shot down my confidence in this method before I've even fully tried it. I suppose I'm only doing it this way because I'm not sure how to do it the other way, though. :/

4:38pm - I'm really frustrated now. I had an idea to use a rotated cube but then I realized that wouldn't work. I was thinking of a different shape in my head and it merely looked cubelike. Actually I think it's the shape of a d8.

4:43pm - I'm looking for information that might help.

5:25pm - I spent a while goofing off and now I'm watching a video on the basic idea of what I want to do and it's making me feel ill. Bleh.

On the other hand it's inspired a third method of doing a sight cone; making a sphere around the player and then culling targets outside of the cone area.

5:33pm - Okay yeah this tutorial on YouTube I just watch perfectly encapsulates what I want to do, I just have to implement it in my own game. But, I'm still feeling pretty wibbly dealing with it. I'm really wanting to just play a game. So, I think even though I've only been here 75 minutes, I'm going to head out. Take a bit more of a walk maybe than usual to walk off all this McDonalds food. Think about the revalation of this new method of sight simulation. It's superior in every way to the previous two methods, so I'm definately going to go with it.

Work Post

Jun. 1st, 2017 03:09 am
relee: Picture of Relee Starbreeze, Wizard (Default)
3:16am - I've been really sick for about a week, and I'm still not feeling great, but I was energetic enough to get myself out of bed under the premise of coming out and doing work.

I had specifically planned to do some AI research, and the first thing I did, before I even started writing this, was watch the newest Game Makers Toolkit ep about Good AI in Games. After that I planned to read some of the articles by Richard Evans and Emily Short (or vice versa) about their developments in AI. But, I kind of balked at the idea when I actually went to their website, so that'll have to wait for another time.

I suppose that means I should work on my little AI project of my own now, my game of tag. Things kind of blew up when I realized how complicated my options are for sight cones in Unity. The simple option would be to use a cone shaped meshcollider to first determine if any targets are in the sight cone, then use a raycast to determine if there aren't any obstacles in the way, since the cone would overlap obstacles without detecting them.

The second way is similar but a little more complicated in code, and probably quicker to process. I'd use a cube shaped trigger instead of a cone, and then use a perspective matrix along with a raycast to determine if the ray is within the sight cone before testing for obstacles.

I'm honestly not sure which of these would be more efficient, computationally. I'm wary of using meshcolliders and I'm wary of using raycasts, they're both supposed to be expensive, but I've got no yardstick to compare them. I'd have to do a lot of math or do both and measure them against eachother to find out which was better. I'm not really willing to do either of those right now.

I think I'm going to try the second option. The Cube and Frustum option. It's less of a cone and more of a pyramid but that's what the player sees too, isn't it? Anyways I'm not sure how to actually do it, so I have to figure that out first.

3:49am - @.@;; Well that was a lot of complex math. It's been too long since I've worked with this sort of thing, I don't remember how matricies work. ^.^;;

Let me try to simplify it for myself here.

What I have is a ray, and what I want is to determine if that ray is within the perspective of the character. The ray goes from the character to another character that is penetrating the cube. How do I use a perspective projection matrix to determine if a ray is within or outside the frustum? When this was suggested to me I nodded my head like I understood and I thought I understood but now it doesn't make any sense to me. A perspective projection matrix is used in 3D engines.

Hmm... The more I think about it, the more I think I should try the other option with the vision cones. It'll give a 'rounder' shape and I won't have to deal with this stuff. I feel bad though, like I'm missing something important. :/

4:34am - Well I've got my cone shaped meshcollider now. I've jammed the cone into my mobile's head and made it huge. Now I just need to test it to see if it works. That'll take some coding. Unfortunately my tank is running dry after all this, so I'll have to put this down for now and do something else. I'm still sick after all.

Work Post

May. 26th, 2017 06:53 pm
relee: Picture of Relee Starbreeze, Wizard (Default)
6:53pm - Well I had a crappy afternoon, couldn't get myself out of bed to go to my doctor's appointment, had to reschedule it. :/

Since I fell apart so badly I decided to do something productive, so I came out to the McDonalds to work, and picked up some Cepacol and Chicken Soup on the way.

Now then, last time I was working on setting up the Utility-AI system. ... Oh yes, I was more specifically working on the senses for my tag players. I had just discovered that there was no cone collider in Unity when I had to stop last time. Also of note, there's no way to turn the cylinder collider into a cone; in fact, the cylinder collider is just a capsule collider with the caps turned down!

So, I'm going to use something else for my tests. In the AI book I got from Packt, they used Raycasts for a cone.

8:15pm - Well I'm going to head out early, but I made some good progress I think. The only frustrating bit is that the method used in the Packt book would only work with one player in the game. So, I'm probably going to use a cone shaped meshcollider to do what I need to do. Hopefully that works out.

Work Post

May. 23rd, 2017 06:52 pm
relee: Picture of Relee Starbreeze, Wizard (Default)
7:18pm - Oops, I forgot to start my Work Post log. I'm at the library today working on my Tag game. I'm currently importing and setting up the Utility-AI that will drive the behavior of my tag players.

8:00pm - I'm working through understanding how the Utility-AI works. Some of it seems to not be covered by the Wiki, so I'm going to look for the documentation.

8:12pm - I couldn't find any documentation so I'm pouring over the code itself. It's not as complicated as I was worried about, so hopefully I can figure out what I need to do.

8:27pm - Well it's already time to go. Gotta pick up a couple groceries for my sick roommate. Also of note, there's no cone collider in Unity, so I'll have to work out a different way of handling the sense of sight when I work next time.

Work Post

May. 22nd, 2017 12:23 pm
relee: Picture of Relee Starbreeze, Wizard (Default)
12:24pm - Despite it being Victoria Day, a traditional vacation day in Canada, I felt like working, so I'm down at the McDonalds again. I guess I'll pay myself double time and a half today. XD

So after studying all that AI stuff and Utility AI in particular, I want to make some kind of demo for my portfolio, to demonstrate my mastery of these subjects.

I thought about it and I decided that I would make a simple game of Tag. It'll have the basic steering behaviors of seek, chase, and flee, and I'll manage them using a Utility AI implementation. I'll be doing it in 3D with the Unity NavMesh system, and I'll mix things up by giving the players different running and turning speeds, a stamina meter and the ability to sprint. As a rule to keep things moving, there'll be no tagbacks. The characters will be blue, except for the character who is 'it' who will be red. The previous person who was it will be green. I also want to include a 'debug' switch that shows the sensors for all the characters.

1:03pm - So, let's break this into tasks.

Create a 3D playground for the game to take place in.

Set up the NavMesh.

Create the tag characters.

Set up the Utility-AI implementation so that it's ready to start calling actions.

Develop the gameplay actions for the tag characters.


That'll give me a good start.

I also decided to update Unity while I'm out here, before I begin. That's running in the background right now, and it says it's got about four minutes left, so while I wait for that I'll research the NavMesh a little more.

1:35pm - The Unity update is taking longer than I expected. I probably should've updated it at home, but here I am. Anyways I've gone through the NavMesh tutorials to refresh myself on how NavMesh works in Unity, and now I'm just waiting for Unity to finish downloading again. The segment that was four minutes was actually just a smaller part of the whole, and the whole doesn't seem to be even half way done yet, so I might have a while to wait.

2:36pm - Finally got Unity down and installed. Looks like they changed the default skybox. It's kind of smoggy looking now. I'm not sure I like it. Alas.

2:48pm - Ahh, my mistake, it's just that they nolonger automatically put a camera and light in the scene for whatever reason.

4:10pm - Oh geez I lost track of the time, I should've taken a break by now. I'll do that now. I just put a concrete texture on the playground and it's easier to see what/where everything is. It's a little dark, but I can deal with it.

5:53pm - Well I've finished my break and I've finished the playground for my game of tag. It's got a navmesh. Next step is to make the characters.

6:07pm - I have a simple capsule character for now.

6:29pm - I realized I wouldn't know what direction they were facing so I put a simple body inside the capsule and made the capsule invisible. Next I'm going to test the NavMesh with a simple script, before I start putting the Utility-AI code in.

6:46pm - Okay the navmesh works. I had my little dude wander around and go up one of the ramps in the scene.

Next I need to get the Utility-AI set up. But for now I'm feeling spacey and bored with my work, so I'm going to pack up and go home, maybe play with Rob.

Work Post

May. 20th, 2017 10:26 pm
relee: Picture of Relee Starbreeze, Wizard (Default)
10:26pm - I'm down at the McDonalds late at night tonight. I was feeling restless at home and wanted to work, but I couldn't find the right spot, so I came out to the McDonalds to work. The guys will probably miss my company but I really want to get some work progress made.

Right now I'm in the middle of the Flocking chapter in that Unity AI book I got. So! Into that again...

11:41pm - Okay, I read Chapter 5 and examined the examples. The crowd simulation was much more sparse than I was expecting. Basically they just let Unity's NavMesh implementation handle it all.

Chapter 6 is on Behavior Trees. Hopefully this'll be more interesting, since I'm starting to get bored with this book. ^.^;;

12:40am - Well I guess I finished the book. I had a hard time following along with Chapter 6, I finished it and I didn't feel like I understood how behavior trees work, which is kind of disappointing... The remaining chapters went by in a blur, and I didn't see any point in examining them more closely.

Overall I learned some things from this book, but it was a bit of a disappointment. Still, it's made me hungry for more AI learnings, so I'm going to see what kind of info I can find on my own for Behavior Trees in general and in Unity, and then come up with some things to make for my Portfolio.

12:45am - Oh wow, it didn't take long with a google search to find a couple gamasutra articles on Behavior Trees, but the second suggests they're an old pattern falling out of use, and reccomends another AI pattern I haven't even heard of! So I guess I'll have to investigate that too...

1:50am - It's an interesting point that at the end of the article on how Behavior Trees are being eclipsed by Utility AI it turns out the author is the owner of a Utility AI company. XD

Still I can't argue with his reasoning, so I'm going to research Utility AI more, and maybe try to implement it myself.

2:08am - Alright I found an Open Source Utility AI for Unity here: https://github.com/Bartvanderkruys/utility-ai

I'll check it out later and give it a proper investimagation. For now I've been here about four hours, I think I'm well past due for a real break.

3:12am - Boy it's late/early, and I'm still at it. I've got the UtilityAI downloaded and I checked out their example and it's really quite nice. I think I'll be able to use it myself.

I'm getting kind of spacey though. I think it's time to head home. I'll play some video games then try to go to bed.

Work Post

May. 18th, 2017 08:03 pm
relee: Picture of Relee Starbreeze, Wizard (Default)
8:03pm - Wow I've been at the McDonalds a long time without actually working. I fell down the twitter hole a long ways and had to pull myself back out.

Anyways I'm pretty split on if I want to work on my big game project now or work on more of that AI Book but I think it's best for me to do the book right now.

I'm up to Chapter 3: Implementing Sensors, and that's pretty neat. I think I already have a good idea of how to implement sensors in Unity but this might have info on making them more efficient, since there's so many ways to implement them and some might be better.

8:51pm - Chapter 3: Implementing Sensors was disappointingly quick and light, but at least it was straight to the point. It showed how to implement two kinds of sensors and also a design pattern to encompass senses. I think it's pretty cool, and I'll probably use it in a demo I write myself when I've got more book read.

For now I guess it's time for Chapter 4: Finding Your Way, the chapter about pathfinding. This one should be meatier I expect!

10:09pm - Well I've read through the A* implementation for Unity they did. It's pretty complex but I think I understood it well enough. Unfortunately, for whatever reason, the example code I downloaded from PacktPub doesn't include the A* example, just the NavMesh examples.

Well, I think I have a good idea of how to implement A* pathfinding in Unity, so let's read about how the NavMesh works.

10:21pm - Oh yeah I forgot to mention, the first NavMesh example that IS included with the book's downloads is the first example that doesn't work. ^.^;;

11:14pm - Well I've finished Chapter 4: Finding Your Way, and while I'm not terribly impressed it does give me some material to think upon.

It's getting late now and I'm considering going home, but I could also stick around a little longer and read some of Chapter 5: Flocks and Crowds. I'm thinking I'll just give it a skim for now and then go home...

11:17pm - Skim complete. It looks like this is the meaty chapter on a subject I don't know well that I've been looking for. <3

I'll still have to save it for next time, but it's nice to know things get better. I'd say so far this book is pretty good for beginners, but I have an intermediate knowledge of AI that makes a lot of this a rehash of old knowledge.

Anyways it's time to go home. <3

Work Post

May. 15th, 2017 07:13 pm
relee: Picture of Relee Starbreeze, Wizard (Default)
7:13pm - Well I'm down at the McDonald's again for another work session. I had to come out to get my medicine and the library was closed so here I am.

Today I'm taking a break from my project to read a book and work along with it. I got the book Unity AI Game Programming free from Packt and I'm eager to try it out, maybe pad my portfolio with a few simple projects.

7:22pm - Well that's a good start. I knew this book was written barely at the start of Unity 5 but when I opened the first example it said that some of the code uses obsolete APIs and that it would try to bring them up to code. I have no idea if this will even still work, but maybe I can learn something by fixing it!

9:20pm - I'm getting sleepy, very sleepy, and I just finished chapter 2 of the book. I think I'll pack up a bit early and head home. Maybe make it an early night.

Profile

relee: Picture of Relee Starbreeze, Wizard (Default)
Relee Squirrel

July 2023

S M T W T F S
      1
23456 78
9101112131415
16171819202122
23242526272829
3031     

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 23rd, 2025 04:41 am
Powered by Dreamwidth Studios