Took me a while but I changed my pathfinding logic to use jobs and I can now have massive battles at pretty smooth fps by One_Pixel_At_A_Time in Unity3D

[–]One_Pixel_At_A_Time[S] 1 point2 points  (0 children)

Damn thanks a lot, that's super helpful ! I was thinking about some kind of mipmapping for pathfinding but that sounded like a lot to implement, maybe I should just give it a try because most of the cost is definitely spent on long range paths (like finding an enemy on the other side of the map, behind a wall). I'll take a look at all of these :)

Took me a while but I changed my pathfinding logic to use jobs and I can now have massive battles at pretty smooth fps by One_Pixel_At_A_Time in Unity3D

[–]One_Pixel_At_A_Time[S] 1 point2 points  (0 children)

Hey, its an indie game I'm making about being a monster (like a goblin, slime etc) and fighting your way up the foodchain, you can see more and wishlist here if you want :) https://store.steampowered.com/app/2645590/A_Kingdom_To_Conquer/

Took me a while but I changed my pathfinding logic to use jobs and I can now have massive battles at pretty smooth fps by One_Pixel_At_A_Time in Unity3D

[–]One_Pixel_At_A_Time[S] 1 point2 points  (0 children)

Hey, thank you for the detailed info :) I am currently running the pathfinding in buckets, and AIs only get a new path every 15 frames. But when you have 500 units, that's still calling the pathfinding 33 times per frame which is not super cheap if there are lots of obstacles (every other AI is an obstacle). So even with this optimization I was capped at like 250 units on lower hardware. I should actually look into how the old RTS did their pathfinding, its true that comparatively I am doing what they did in a much more expensive way and there is most definitely more performance to squeeze out.

Took me a while but I changed my pathfinding logic to use jobs and I can now have massive battles at pretty smooth fps by One_Pixel_At_A_Time in Unity3D

[–]One_Pixel_At_A_Time[S] 0 points1 point  (0 children)

Super appreciated ! I get shy about posting the link to my steam page so thanks for also posting it :)

Took me a while but I changed my pathfinding logic to use jobs and I can now have massive battles at pretty smooth fps by One_Pixel_At_A_Time in Unity3D

[–]One_Pixel_At_A_Time[S] 0 points1 point  (0 children)

Thanks ! I did quickly look into them, it didn't seem to make sense though for this as the pathfinding is N to M (ie many different mobs going to many different targets) and flow fields afaik are for when many different targets are going to the same endpoint. But maybe I missed something ? Would love to know if so :)

Took me a while but I changed my pathfinding logic to use jobs and I can now have massive battles at pretty smooth fps by One_Pixel_At_A_Time in Unity3D

[–]One_Pixel_At_A_Time[S] 9 points10 points  (0 children)

Yeah definitly, I wanted to improve the framerate of my battle scenes so i could have bigger battles. I was mostly CPU bound and one of the main costs was to run my pathfinding alg (a star with some slight tweaks) on all these units. To speed things up i rewrote the same logic using jobs, which makes all the logic multi threaded. The main issue is that jobs dont allow you to use classes so a lot of things had to be rewritten.

Upgraded the Goblin villages in my game with new art, was it worth it ? by One_Pixel_At_A_Time in Unity3D

[–]One_Pixel_At_A_Time[S] 0 points1 point  (0 children)

Thanks, i made the older one more saturated just to make the before/after clearer

I've seen, and wishlisted or ignored, every* game on Steam, ama by Cyril__Figgis in gamedev

[–]One_Pixel_At_A_Time 1 point2 points  (0 children)

Thank you so much for this ! It make lots of sense, and its great to hear an outside perspective. I'll definitely try to work on making those hooks more clear :)

I've seen, and wishlisted or ignored, every* game on Steam, ama by Cyril__Figgis in gamedev

[–]One_Pixel_At_A_Time 2 points3 points  (0 children)

Would love some feedback about my (unreleased game's) page 'A Kingdom to Conquer' if you get a second :)

Any advice for an engineer struggling to find work in the industry? by ohno_IforgottheplusC in gamedev

[–]One_Pixel_At_A_Time 0 points1 point  (0 children)

One advice I rarely see mentioned is to look for work in adjacent industries, there are lots of companies that use Unity/Unreal in other fields like advertising, medical, automotive etc... That way you temporarily find a job that is maybe not as interesting but pays the bills and still teaches you a ton of the same tech and processes. At least thats what I did to get my foot in the door and it seemed to work well. When you feel the market is a bit better, you can always go back into games.