Ant Patrol

Community Forums/Showcase/Ant Patrol

Flanker(Posted March) [#1]
Marching cubes + pathfinding

https://youtu.be/-6wY2t5etkE

Hello, months ago I've been implementing pathfinding on marching cubes using A* algorithm in Blitz3D. Recently I tried to make it multi-threaded using Blitzmax and OpenB3D. Here is the result so far :

It still doesn't work perfectly with multi-threads, I have a lot of stuttering (not visible in the video), probably because of mutex or shared ressources but i'm working on it.

Anyway, I'm wondering if there would be a better algorithm than A* for that ? The pathfinding data is based on terrain vertices, however it is similar to a grid (with a complex shape). There is no obstacle so maybe there is something faster than A* ?

I plan to make an ant colony game from this base if I manage to get a robust pathfinding system.


skidracer(Posted March) [#2]
Looks awesome, well done so far!

I wouldn't get too hung up on performance, if it puts restrictions on the size of your levels then that can be a good thing.


grindalf(Posted March) [#3]
looks awesome


Blitzplotter(Posted March) [#4]
Gobsmackingly good stuff, great work!


Trinosis(Posted March) [#5]
Yeh, that's really interesting.

Don't think i've seen anything quite like it before.

Looks like you have the makings there for a unique screensaver.

Thumbs up.

Great work.


Flanker(Posted March) [#6]
Thanks for the feedbacks. Here is another video, creating some sort of roots and digging a nest : https://youtu.be/rJMEpLXszCI

@skidracer Yes the level size is the major thing that can slow down everything, and an ant nest with dead ends is the worst case for A*... :D

@Trinosis I hope it will become more than just a screensaver !


Rick Nasher(Posted March) [#7]
Great stuff! Blast-off those alien ants hiding on our neighboring asteroids..
Could also be a really nice multi-player environment. (hint-hint ;-)


Flanker(Posted March) [#8]
@Rick Nasher
This could be an idea :) but I'd prefer to make something like the game "empire of the ants" (I spent days and nights on this game when I was a teen), or "empires of the undergrowth" wich looks promising, but with a real 3D nest.

Multiplayer... with host switching ? :D

Anyway, I've been able to boost the pathfinding performances so I can run 1000 ants smoothly with pathfinding, 2000 is still ok for pathfinding but not for the graphics... I'll have to learn how to render so much entities.


FBEpyon(Posted March) [#9]
@Flanker

Would you mind sharing where you got the information on doing marching cubes. I know the basics, but I'm stuck on the vert formatting.

I have been reading this for the last few days :
Tutorial

This is looking great BTW!!


Flanker(Posted March) [#10]
@FBEpyon

I learned from the same source, Paul Bourke has a lot of interesting algorithms on his website. But I modified it a lot to suit my needs. Tell me exactly where you are stuck and i'll try to help you.


FBEpyon(Posted March) [#11]
@Flanker

I trying to work through the code still, I will let you know... Trying to simplify it is all.


Rick Nasher(Posted March) [#12]

Multiplayer... with host switching ? :D


;-)
Would be good for Blitz's future though..

I found Unity's Multi-player host switching apparently isn't free of bugs(=being worked at) but is open source, whereas Photon's is bug-free but of course not open.

Anyway good luck with your quest. Just watched some vids for never heard of "empires of the ants/undergrowth" before. Interesting idea, should be great fun to play/see.


RemiD(Posted March) [#13]
@Flanker>>impressive terrains/caves you have made here, and with the pathcalculation pathfollowing ! Really good ! Congrats.


Grisu(Posted March) [#14]
Can you add fire ants? Normal ants might be too cute. :)


Flanker(Posted April) [#15]
@RemiD Thank you :)

@Grisu There are no cute ants I think, all species actually on earth survived millions of years with different behaviours. But yes, fire ants would be one of the main species for a game.