Jan. 31st, 2019

Work Post

Jan. 31st, 2019 04:04 pm
relee: Picture of Relee Starbreeze, Wizard (Default)
4:04pm - Well, it's another cold one today. That polar vortex is no joke. But though I'm wrapped up in blankets and warm clothes in bed, I have to do something or other. I figure I'll continue my work.

Last time I hit some frustration when I realized that what I was watching Tutorials for on the Unity site wasn't in Unity. I'm not sure where to get them apart from Brackeys' github. I might settle for that, but it's perculiar that it wasn't easier to find.

4:28pm - Oho, it looks like I found it!

https://docs.unity3d.com/2018.3/Documentation/Manual/NavMesh-BuildingComponents.html

I found it by doing a search of the documentation.

4:40pm - Installed it and it works. <3

Now back to following the tutorial, and after that I'll try to figure out some basic AI tricks to teach it.

5:09pm - Hokay, it works! Way to go.

Now I want to make some basic movement methods for a custom NavMeshAgent.

The most basic behavior is Seek, which is a primitive algorithm for heading straight towards a target. A NavMeshAgent doesn't do that kind of seeking though, it does a pathfind to a target and follows the path straight there. So, that would seem to be that, right?

Well the next movement method is Flee, which a NavMeshAgent doesn't do. It has no way of saying to go in the opposite direction of a target.

Hmm... Now that I think of it though, Flee isn't a very smart behavior. A smart AI character should have a destination to flee TO, not just 'away'. Maybe I'm concerning myself too much with low level behaviors?

The next behavior is Arrive, which the NavMeshAgent also does.

Then there's Wander... NavMeshAgent doesn't do that, but that's another one where just selecting a random location would do, wouldn't it?

5:32pm - I'm starting to question the merits of this type of low level implementation. It's great for simple enemies or what have you, but when it comes to what I'm trying to achieve, if that was what I wanted I wouldn't need to use the NavMesh.

NavMeshAgent can Arrive at a destination it's given, using the NavMesh to find a path. It can avoid obstacles and other NavMeshAgents in that process.

Ahh here's one the NavMesh can't do that it should be able to; Align. Let me see...

5:43pm - Yeah like I thought, there's no way to tell a NavMeshAgent to turn on the spot to face a target. Maybe that isn't the domain of the NavMeshAgent, though. If it's not moving in a direction it doesn't make much difference if the mesh is there. And if it is moving a little bit, then it'll turn to face.

Maybe it has to do with the joining of Animations with the NavMeshAgent? I'm not sure.

5:51pm - Alright I think I've convinced myself that I don't need to make an extended version of the NavMeshAgent for my project. At least not yet. So I guess I should get started with that project?


At some point I'll have to make a prototype town for my townies to simulate themselves in, but not today 'cause it's cold and turning to night. I don't want to get out of my bed more than I have to. So for now I'll focus on the concepts and theories.


I should probably start with something simple for my prototype that I can expand later. Ahh but just thinking about this has got me realizing how loose in my head the idea still is. Let's try to fix that.

The core gameplay is mixed. There's interacting with intelligent townsfolk, building a town/colony, and then there's exploring the wilderness and defending the town. Those ones might not be neccesary. Animal Crossing for example doesn't have you leave town except to go into the attached towns and other townlike places. But I kind of want some action-adventure elements. I suppose I can add them later, or put them in the sequel. :P

So let's focus on the AI townies and building the town.

There's a lot of ways to manage town building in video games. You could have a preplanned lot with all the buildings just taken out until you assemble them, and variants on that idea. You could have pre-designed buildings you place wherever you want. You could have something like Minecraft where you build everything in blocks...

I want the player to feel like it's 'Their' town, not a generic one. I also want the NPCs personalities to show through in the buildings they occupy, so I don't want the player to have full design over them. Should I just let the player handle placement of predesigned buildings, or what? Hmm...

It would definately be easier to have the player plop down predesigned buildings than to have to make a tile system for the ground to let it be modifyable for building up. Though I had originally planned a sort of prospecting system for selecting where buildings would go.

I could also do something like what Animal Crossing did with their landscape design and do it as a series of semi-random tiles. That would give me distinct terrain for each town without a lot of hassle.

Alright, so it seems like I'll have a selection of unique buildings the player can plop down in their town. That's how I'll handle building the town. The resources may come from clearing the town or bartering with traders but probably from exploring the wilderness.

The townsfolk will do farming and other jobs as well. You'll build fields to farm and other buildings to work in. You'll actually select which villager is assigned to which job in a schedule. The villagers will fit their job into their own internal schedule with some priority.

6:37pm - It's interesting, this game is already different than what I had planned in my head, where it would be all tile based and you'd design buildings yourself. But when I outlined the core gameplay that didn't seem like a good idea anymore.

The NPCs need to have free time in order to express themselves. I'm not sure if I'll go with a Harvest Moon style day or an Animal Crossing style real-time day. The former has the problem of everybody rushing to do their thing in a short time. The latter has the problem that during the daylight hours most of the townies will be working and the player won't have much to interact with them about.

I should also mention another idea that came into my head while I was designing all this, and that's an Inn simulator, where the player would run a fantasy style Inn and Tavern and the whole game would be about interacting with these complex NPCs that visit you. Of course there's a problem there that you wouldn't be able to see most of the NPCs every day and they wouldn't have homes to decorate with their personalities. On the other hand, they would have a lot more interactions with eachother that way. It would distill this town-building/npc-interacting game down to just npc-interacting.

I'm not so sure which would be more fun, though. Either to play or to make.

7:04pm - I went ahead and asked around about those ideas to see if anybody inspired me with their thoughts. I'll give it some time.

For the purposes of prototyping the AI I'll assume it could be either and use static buildings.


7:18pm - Now I'm getting tired, both my arms and my mind, so I'm going to turn in for now. I'll give it more thought and work out more of what I want to actually prototype for the NPCs next time.

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     

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 26th, 2025 01:36 pm
Powered by Dreamwidth Studios