Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411275 Posts in 69323 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 04:44:14 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsAo
Pages: 1 ... 11 12 [13] 14 15 ... 41
Print
Author Topic: Ao  (Read 94859 times)
oahda
Level 10
*****



View Profile
« Reply #240 on: September 07, 2020, 10:50:42 AM »

Cool! Do you maybe have some gifs of the effects of tweaking the variables? Like the FOV settings for example? Grin

Sure thing! Coffee

FOV, now that projection properties have been added too:



And I got those material inputs in place, altho no way to remove them or add new ones yet!

« Last Edit: September 07, 2020, 10:59:24 AM by Prinsessa » Logged

JobLeonard
Level 10
*****



View Profile
« Reply #241 on: September 08, 2020, 03:08:57 AM »

Oh yeah, that's the stuff! Hand Thumbs Up Left Smiley
Logged
oahda
Level 10
*****



View Profile
« Reply #242 on: September 27, 2020, 10:29:23 AM »

21

Getting out of a navmess

Hello again! We moved, so got busy for a while, but finding some time to work on the game again.

Until now the navigation mesh would be recalculated every time I started the game, which was slow, and the geometry to build the mesh from was added in a hardcoded way. Now the geometry is selected in the editor, the navmesh precalculated once and stored in a file, and then just loaded quickly by the game on startup. Smiley



A quick and easy solution for now was to just have a button to add the geometry of the colliders of the entities selected in the scene hierarchy. The area (walkable, swimmable, jumpable...) is selected from the dropdown. This includes unwalkable areas that essentially cut holes (which the cyan walls above do, so an NPC can't walk through them).

Improved turnaround

Here's an issue I had up until now, with gaps in the navmesh going up this staircase. I never bothered to try and fix it because I didn't need any NPC to go up there yet, and it was so time-consuming to try and guess at a good number for the slope settings and restart the game until I got it right. Now that I was able to just do it in the editor without restarting, it was a quick fix!



And here I am trying it out in the game with the little debug feature I threw in to add the start and end points of a navmesh path where the character is standing and then draw the path calculated between the points:



Also fixed some navmesh issues and added support for tiled navmeshes but am not yet using tiles and have not yet added a way to work with them in the editor.

That's it for now! Coffee

« Last Edit: September 27, 2020, 12:58:24 PM by Prinsessa » Logged

RealScaniX
Level 6
*


Scanix (ignore the "Real", Scanix was taken)


View Profile WWW
« Reply #243 on: September 27, 2020, 02:12:26 PM »

That's a nice technical update. Those things are fun to do, especially the tools for testing them in play mode. I bet you had fun with it, too.
Those improvements can fall in two categories: Wasting lots of hours to basically end up where you've been before or improving the game or your workflow so much that you wonder why you didn't do it much earlier.
Yours seem to fall into the latter category. At least I hope so. Smiley
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #244 on: September 27, 2020, 02:46:14 PM »

Cool stuff!

I've been meaning to ask (not sure if you mentioned it somewhere) but kept forgetting: is this going to be an information game?
Logged

kevin andersson
Level 1
*


Producer/ Designer by day and Programmer by night


View Profile WWW
« Reply #245 on: September 27, 2020, 09:05:31 PM »

This looks interesting! Is this a custom engine? I don't recognize it!
Logged

oahda
Level 10
*****



View Profile
« Reply #246 on: September 28, 2020, 12:56:04 AM »

Thanks, everyone! c:

Yours seem to fall into the latter category. At least I hope so. Smiley

I think so! Much better way of updating the navmesh. A few more things to fix, but almost there~

is this going to be an information game?

Had to look that term up, and don't feel as bad for being unaware of it given how recent it is, but I do know the games apparently in this category, and some of them are very similar to what I have in mind, so maybe, yes? Grin Thanks for bringing it to my attention!

Is this a custom engine?

Yep! There's some info scattered throughout the thread. Unity and Unreal have solutions for this and the latter even uses the same navigation libraries so I've been ending up in the Unreal docs a lot over the last few days as they show up earlier in search results than the official docs. Cheesy
Logged

ChrisLSound
Level 1
*



View Profile WWW
« Reply #247 on: September 28, 2020, 10:26:07 AM »

...The area (walkable, swimmable, jumpable...) is selected...

Swimmable, you say?  Blink Blink

Everything looks great!
Logged

I make video/tabletop games and music!
oahda
Level 10
*****



View Profile
« Reply #248 on: September 28, 2020, 10:31:31 AM »

Thanks! Well, not necessarily any such plans, just an example to explain the concept of navmesh areas. Tongue
Logged

oahda
Level 10
*****



View Profile
« Reply #249 on: September 28, 2020, 11:16:18 AM »

22

Getting into a navmass

A mass of people, that is. Simulated people.

Doing something unusual and posting another update just one day after the last one, but I got a lot done today!

Navmesh tiles

This means instead of one big mesh, the navmesh is built up of submeshes that can be updated individually but still connect and allow me to find paths across them. Shown here by making every other tile darker:



Shadow rectangle will hopefully get fixed once I fix shadow cascades properly...

Navmesh agents

Currently an NPC finds its way around without awareness of any other NPC. I finally started looking into the crowd control functionality of the pathfinding library and here is a first test of agents on a collision course adjusting their trajectories to avoid each other!



Still getting a bit closer than real people might but I'll tinker with the values~

« Last Edit: September 28, 2020, 11:32:20 AM by Prinsessa » Logged

Ishi
Pixelhead
Level 10
******


coffee&coding


View Profile WWW
« Reply #250 on: September 29, 2020, 11:02:11 AM »

Great updates with the Navmesh stuff! Coffee

This means instead of one big mesh, the navmesh is built up of submeshes that can be updated individually but still connect and allow me to find paths across them. Shown here by making every other tile darker:

What's the benefit of splitting it into tiles like this? You mentioned updating; is it to allow the navmesh to dynamically change but limiting the areas of the mesh that have to be rebuilt?
Logged

oahda
Level 10
*****



View Profile
« Reply #251 on: September 29, 2020, 11:39:47 PM »

Thanks! Grin

What's the benefit of splitting it into tiles like this? You mentioned updating; is it to allow the navmesh to dynamically change but limiting the areas of the mesh that have to be rebuilt?

Yeah, I'm still looking into it, but that seems to be the way to work with dynamic obstacles, by actually rebuilding the navmesh with the negative geometry added, so that's faster if you only have to update a smaller section of it.

I'm not sure I'll implement it right away since I don't need it yet (but getting tiles in at all was a quick modification so I did it out of interest haha) as the main obstacle ATM (other NPC's) is dealt with by the crowd system.

That OTOH I felt was important to get in before I do too much since I'm going to have to rewrite the code that handles NPC paths for rewinding and so on, now that they can change along the way. I'll probably keep the non-crowd pathing too, for when I care more about timing than avoidance and can control it manually anyway, like in a cutscene. c:
Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #252 on: September 30, 2020, 04:48:31 AM »

Nice progress, and I like the tile-based approach for rebuilding the navmesh!

Also, I was wondering; since navmesh-based pathfinding is basically A* with vertices instead of tiles, could you change the heuristics it uses to, for instance, make characters always walk to the right of pathways and keep them off grassy areas in most circumstances?

I imagine you could do it by giving a slightly higher heuristic cost to moving on a path's left side, that way the algorithm would almost always chose to be courteous with other characters and give them some space! If checking a character's direction as pathfinding happens is impossible though, then I guess that wouldn't be feasible since you'd need that information to decide what the concept of "path side" even means.
Logged

oahda
Level 10
*****



View Profile
« Reply #253 on: September 30, 2020, 08:20:50 AM »

Thank you! C:

You can definitely do that, and I actually did it in my old 2D prototype so they'd prefer to walk along roads~



Would probably be best to make the actual navmesh narrower than the visual road so the character doesn't hug the edge, but yeah!

Left versus right side sounds trickier, yeah. Did you mean that you'd tag each side differently and temporarily change the heuristic for the side tagged with the undesired side, depending on what direction the NPC is headed, before calculating a path? Determining the side (especially as it can change if you cross the road) sounds a bit fiddly, but I'm sure it could be done somehow! And maybe a solution that works half the time is still better than none? Blink

There are no defined paths on the town square tho but sounds like a good idea elsewhere and I hadn't thought of it, so thanks! Grin
Logged

marcgfx
Level 8
***


if you don't comment, who will?


View Profile WWW
« Reply #254 on: September 30, 2020, 05:42:19 PM »

Waiting for the nav-masses Cheesy
Cool project and interesting devblog!
Logged

oahda
Level 10
*****



View Profile
« Reply #255 on: October 01, 2020, 01:05:31 AM »

Thank you! Kiss
Logged

Vidak
Level 0
**



View Profile WWW
« Reply #256 on: October 02, 2020, 02:35:37 AM »

This looks pretty cool, good luck with the project! Grin
Logged

oahda
Level 10
*****



View Profile
« Reply #257 on: October 02, 2020, 11:57:07 PM »

Thank you too! Gomez
Logged

RealScaniX
Level 6
*


Scanix (ignore the "Real", Scanix was taken)


View Profile WWW
« Reply #258 on: October 03, 2020, 01:23:25 AM »

This navigation thing is really interesting. I like the "stay on the road" thing, too.
Maybe you could add a "cost" to regions in different directions (maybe too much?), so the NPC would prefer a path that's a little longer instead of going up a very steep stairway.
As for the road side... Are you postprocessing the paths already? I guess you could move pathpoints towards the right side of the road, like you do with the cut corners etc. in the old A*?
 
Either way: Looking forward to see your next step on the path... finding. Wink
Logged

oahda
Level 10
*****



View Profile
« Reply #259 on: October 13, 2020, 11:35:05 AM »

Yeah, lots to play with wrt costs~ Gomez

I'm not doing anything with the paths myself, I'm using the Detour library which calculates a path for me and I just use that, and the crowd management is a sort of black box built-in feature. c:
Logged

Pages: 1 ... 11 12 [13] 14 15 ... 41
Print
Jump to:  

Theme orange-lt created by panic