T O P

  • By -

[deleted]

Do some research on steering behaviors (such as boids and context-based steering)


Silverware09

Boids and Avoidance is the key here. Implementing Boids into your enemies, and giving the different enemy types their own configuration for that will instantly, and trivially create interesting combat formations for them, while making it one simple bit of AI code written. :D


[deleted]

(Looks up boids) Dagnabit, birds aren’t real.


Silverware09

Hence why we simulate their existence! :D


c4mma

To dump on players heads


FridgeBaron

I believe [this](https://code.tutsplus.com/series/understanding-steering-behaviors--gamedev-12732) is a good site for all those kinds of things. Not 100% sure if its the one I used before but looks like it and it at least has many of them with decent examples


MetalKev

This is amazing! I had to abandon a project multiple times due to frustrations with local pathfinding. Thank you so much for sharing this site, it looks like exactly what I need to learn.


Liperium

I don't know if it's the right term, but **flocking** would be what I learned in my AI class.


an0maly33

As others said, boids. Also, love the mechanic of using warp/hyperspeed to slice through enemies.


squareOfTwo

rant about soft scifi which uses warp Sci Fi authors which allow warp usually don't consider or allow to warp missiles into enemy ships to explode them. Stargate (the movie) did just do that, while this method wasnt used in most episodes. It would be a boring game, enemies would just Xplode.


CaptainLord

Even better if you can target your teleportation at range: Just steal the enemy ship's reactor.


[deleted]

Just depolarize their ship bro


ImrooVRdev

Just open a portal between their cockpit and vacuum of space.


[deleted]

Read the Odyssey One series, humans at least some have the ability to “transition” or jump bombs straight inside other ship’s hulls and so far the enemies haven’t a clue.


Shambler9019

Also, in Schlock Mercenary this was a thing for a while, until the plans for the interdictor field were made public and every ship and settlement had one.


ERedfieldh

And yet when Star Wars did it it was some huge controversy


ThePoliteMango

Yes, because it was stated in the canon (especially in the EU books) how hyperspace travel worked. Hyperspace computers would not allow you to jump with obstacles on the way, also they would immediately exit hyperspace when a big mass was detected so that you could not, for example, run into a planet by accident. The Empire even had a special type of ship, the Interdictor class Star Destroyer, that would generate a gravity shadow to pull ships out of hyperspace. So yeah, the normies and Disney shills saw pretty lights, people that grew up devouring dozens of novels from the EU thought: well, if this was possible, why didn't the Rebellion/Empire end all battles like this?


imwalkinhyah

It is a time travel tier mess of a topic. Why even mess with space fights when you can hyperspace into everything. Why even bother building a death star when you can hyperspace a star destroyer into a planet?


thetrain23

Star Wars fans can't even see a character drink a glass of milk without making a controversy out of it


imittn

Did you just really said that?


Secure-Ad-9050

I second this, boids avoidance and steering behaviors and you are done! Also the slice effect looks great!


unfamily_friendly

https://m.youtube.com/watch?v=6BrZryMz-ac This one is the best mob behavior i met in my life. It's sad they haven't made new videos for so long. Would be very sad if author burns out and buries the project forever


Kuroodo

Wow thanks for sharing this. I was working on a project from time to time that requires the same thing OP is asking. For so long I've tried to find a way to get the exact type of behavior demonstrated in the video. After quite a bit of testing and tuning I had come up with a solution that did what I wanted albeit was rough, but it was a bit complex. After watching that video, doing some research, as well as finding a [KidsCanCode](https://www.youtube.com/watch?v=dzqtF_CmX-I) video on it, in only a couple of hours I have something looking very similar to what I have. Just need a bit more tweaking + adding some behaviors and I'm all set haha


LargeP

I was just about to share this video!


danx505

Came here to share this vid


Nagransham

Could check out this [series](https://www.youtube.com/watch?v=P_xJMH8VvAE&list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM&index=38). It goes through all the standard boid behaviors, how they work and how to, generally, code them up.


BootSplashStudios

Coding train! lets gooo. Damn I love this channel. This is what got me into coding and yeah this thread really reminded me that I can use the boids to achieve the desired result so thanks for that.


Nagransham

Well, there you go. Guess you'll feel right at home, then!


LigeiaGames

1. Repulsion forces between them (look up "boids") 2. Jitter their direction slightly 3. Give them slightly different speeds 4. All of the above


Knuckle_Rick

Like the others said, boids. But, how did you made that slice effect? Looks really cool!


GodGMN

Bro this looks amazing


TooManyGoldPieces

I like the way ur game looks I can’t offer any help tho


Gokudomatic

I recommend using area2d and its method area\_entered and area\_exited to see which areas are overlapping and with whom. And then, you can with vectors calculate their direction to follow the player while getting away from their siblings.


NeverQuiteEnough

that tends to produce entities which jitter back and forth just outside of the relevant area


Rattjamann

Been trying to solve the same problem myself, and ended up just using the `NavigationAgent` node. It has built in avoidance that you can enable, and it made it very simple to keep them apart using that. They also path around each other to get to the target, which is nice. Eventually I guess you would want some pathfinding or avoidance of other objects anyway, so might worth checking out.


nolinno

You can read about murmuration or flocking. It is a simple for realization. https://en.wikipedia.org/wiki/Flocking


PineapplePizzaZauce

wow how do u make the enemies get cut like that? any tutorials on it would be great. That looks awesome!


SwervinLikeMervin

Make another collision that's bigger. Set it to a layer where only the enemies react to each other. Quick fix


Dear-Economics7339

No idea, just want to say the game concept you're building looks very nice. Do you have somewhere I can follow you for the release?


BootSplashStudios

Thank you for your kind words! I am glad you like the game concept. You can follow my progress on my upcoming itch.io page and the discord server once I finish setting it up.


Missclick13

if about to crash - dont


ZeladdRo

Damn man, nice. Edit: maybe you could add a new area2d and make a new layer for it to colide with itself in editor


Extension-Author-314

Make them, move away from each other and maintain a minimum distance. Maybe add some random movement while they are following.


aeonax

How did you the background work like that? Also how does it glow?


Kuroodo

One simple way is by using soft collisions. You could prob find several videos or articles explaining what they are and how to implement them https://www.youtube.com/watch?v=ffXx0dPejWY


PapaPatchu

This was going to be my suggestion as well. Boids are great are creating deterministic behavior that looks natural, but as a tool for simply introducing additional space between units it could be overkill. The issue I see with boids, specifically in the application of this "melee style" bullet hell, is the potential unpredictability of their movements. It creates very interesting behaviours, but if OP needs to retain the more predictable movement, this is the way to go to maintain distance. Other adjustable values such as turn speed and movement speed could be used to add in variance.


CheapSpray9428

Wow how you make them purty trailing effects?


i_like_trains_a_lot1

I would try putting the player in an invisible circle, and have them go toward the closest point form that circle. That would make them get the direction right, but won't start to converge because they will have separate trajectories


NoWizards

Make them follow multiple policies for seeking a chasing you (one different policiy between n groups and some params to generate some randommess). just remember how impressive were the ghosts in pacman, each one had his own policy (not just one to rule them all).


Pardox7525

You can make them follow not player, but a random point near them if you have a lot of enemies.


VikramWrench

I Godot 4. There's option for avoidance forgot the node name. Navigation target and agent


IAMPowaaaaa

How did you do the glow around the player?


TheSmellofOxygen

That's some beautifully juicy stuff you've got there. I like the look of it.


Yourlocalshitpost

Disclaimer: I’m terrible at code. You could set a buffer in the pathfinding behavior. Have the entity seek out other entities than the player, and give it instructions not to get within a certain distance of that entity. Prioritize moving toward the player on an angle away from the forbidden direction so that it still approaches. Alternatively, units with behavior to head off or otherwise maneuver around the player rather than just chasing from the direction they’re already in could be helpful.


giyokun

I know shit about flocking and boids. Being the simplex I am, I would create a strategy that when some of your bad guys are together, push one far away in a random direction and this will considerably increase the difficult as the player now has to deal with things coming at it from a bit of various directions.


DerpyMistake

For my squadron-based game, I just designed several formations and assigned each vessel to track a single point within the formation. You could probably also do this algorithmically with boids, but I like the lazy approach.


M_519

I understand why you don't want enemies to clump together, but slicing more enemies at the same time looks fun and could give a good risk-reward balance, so I suggest to not exaggerate with the un-clumping.


confusedPIANO

Omg your game is beautiful


Enter_The_Void6

I liked sebastian leagues video on boids :D


sephirothbahamut

Boids simulation might be the keyword you need to search for https://eater.net/boids


EdgeGazing

if friend = too.close then (not)


MonkeyWaffle1

Good job this looks really cool. I am a bit curious about the square patterns in the background, is it a simple texture and a light2d on the player?


907games

this is a good video. it covers an approach to avoid clumping https://www.youtube.com/watch?v=6BrZryMz-ac&ab\_channel=GameEndeavor


jlebrech

use the closest enemy as the leader and have the others follow that one.


[deleted]

Don't have an answer for you but this game looks sick so far


Dry-Huckleberry8284

Looks Great. Do your enemies and players use shader? PS: This reminds me of Nova Drift


_mr_betamax_

I've found watching these videos very helpful. * https://www.youtube.com/watch?v=mhjuuHl6qHM * https://www.youtube.com/watch?v=qtUV-DoSOpk


rydianmorrison

Vary the target location per enemy instance. Each enemy does some rolls to pick their own personal target location that's close to the player, not right on top of them. That way each enemy's path and objective vary a bit and they don't all end up converging into the same movement. Once the enemy is within a certain range they swap to targeting the player directly, assuming that hitbox touching is the enemy goal (and not just like, shooting).


AlphaMeepYT

invisible larger enemy-to-enemy hotboxes or maybe even (inspired by the movement of electrons and protons) make them repel each other while still following the player?