Army Formations in Unity

  Рет қаралды 41,519

Tarodev

Tarodev

Күн бұрын

Пікірлер: 114
@Tarodev
@Tarodev 3 жыл бұрын
Did you enjoy this video? *Let me know* so I can continue to make awesome content for you :)
@VMEcycle6
@VMEcycle6 3 жыл бұрын
Great tutorial.👍👍 Well I was working on something very similar six month ago. And I started with a similar approach. But then I realize that when some soldiers got killed in combat. Having other soldiers fill in the gap may trigger all the soldiers to swap their locations, thus will mess up your formation during combat. So I studied flocking algorithm. I let all the soldiers repelling each other, also having the formation "box" attracts all the soldiers. Then calculate a combined vector for each soldier which will determine where a soldier should move. It's kinda hard to have a perfect formation with this method, but it also came with some realism... sort of. Also if a soldier got killed, all you need is just shrink the formation box size to make a tighter formation.
@Tarodev
@Tarodev 3 жыл бұрын
@@VMEcycle6 you could also just cheat. When a unit dies, the positions are recalculated and the remaining units find the closest new position to them and walk to it.
@xanaramus
@xanaramus 3 жыл бұрын
Looks like phyllotaxis, that could be usefull too
@Tarodev
@Tarodev 3 жыл бұрын
@@xanaramus I had to google that. You're right, it does! You can find nature in everything :)
@gralcio
@gralcio 2 жыл бұрын
It's amazing. Add such a mini-thing to your game lobby and no one will be bored waiting for challengers.
@sima19995
@sima19995 2 жыл бұрын
The attention to detail at 1:09 with the beat is just mind blowing.
@Tarodev
@Tarodev 2 жыл бұрын
I'm glad somebody finally appreciated that 😜
@arkobanerjee5166
@arkobanerjee5166 Жыл бұрын
Yeah bro that is so cool
@libberator5891
@libberator5891 3 жыл бұрын
I'm getting some slight Sebastian Lague vibes. I like it
@Tarodev
@Tarodev 3 жыл бұрын
Compliment of the highest calibur ♥️
@omega_dip_wod
@omega_dip_wod 3 жыл бұрын
Wow this man puts out banger after banger
@Tarodev
@Tarodev 3 жыл бұрын
Thanks my guy
@jugibur2117
@jugibur2117 3 жыл бұрын
Wow, good job, so much in the way of settings. I don't need something like that right now, but it was interesting to see how you implemented it. Thanks for that!
@Tarodev
@Tarodev 3 жыл бұрын
😊
@makoto4541
@makoto4541 Жыл бұрын
Looking for radial instantiation and your video was quite low on the recommended list, but as soon as I saw it was from you, I ignored all other videos and went straight to this one. Your content is reliable, the code is generic, the possibilities are extensive and the explanation is concrete. I find myself often checking first if you have covered the topic before looking elsewhere. Thank you
@Tarodev
@Tarodev Жыл бұрын
High praise 🙏 thanks for being a supporter
@cyqry
@cyqry 3 жыл бұрын
Looks good as far as function goes and the presentation really nice too. I'm working on a squad-based game and I got to say procedural formations are damned hard so kudos for this. Only thing that comes to mind for improvements is cleaning up how the formation reforms when characters are added or removed. I could never figure out how to improve it and it always felt weird seeing characters sprint from one end of the line to the other instead of just bolting onto the closest end.
@Tarodev
@Tarodev 3 жыл бұрын
So true. Ideally it should detect if any units are close to a new position and re index them to save long walks. Or at the very least give the unit a speed boost when reforming...
@cyqry
@cyqry 3 жыл бұрын
@@Tarodev For sure. Reindexing sounds like the way to go in this case, I will give that a go on my project when I get some spare time and see how well it works.
@TheDarkranium
@TheDarkranium 3 жыл бұрын
You can try the Hungarian Algorithm to assign positions so they don't cross over each other's path.
@cyqry
@cyqry 3 жыл бұрын
@@TheDarkranium I'll look into it, thanks.
@makra42069
@makra42069 3 жыл бұрын
your videos are ASMR to the ears
@TREXYT
@TREXYT Жыл бұрын
you cant imagine how helpfull you are! thanks friend!
@sherazali3414
@sherazali3414 4 ай бұрын
Awesome Man!!!!!!!!! Watched it when you released it, and today watching again when I need it :D Thank You!
@Tarodev
@Tarodev 4 ай бұрын
@@sherazali3414 been around all this time, aye? 😊
@honokiii
@honokiii 2 жыл бұрын
I am looking for a crowd formation method for my current project and saw this. It is not what I am looking for but it is so interesting! Thank you for the idea!
@tomkc516
@tomkc516 2 жыл бұрын
This video was extremely visually appealing.
@Tarodev
@Tarodev 2 жыл бұрын
Thanks Thomasssssssss
@_dr_crusher
@_dr_crusher Жыл бұрын
Awesome video - was hoping to see more about the Uniform functionality and the movement you have in the video. Not seeing it in the scripts though. Thanks for your time!
@lonebeaver9535
@lonebeaver9535 2 жыл бұрын
Woah I just came here from your reddit post. I just got done implementing box formations in my game and your algorithm is so much more elegant than mine and I was wondering how to achieve radial formations thank you very much!
@youcancallmedoggie
@youcancallmedoggie 3 жыл бұрын
this is awesome! Please keep doing what you doing. Your content is simply amazing.
@basicdogtrainings9389
@basicdogtrainings9389 3 жыл бұрын
Hey bro thanks for creating this video because i am a solo developer and i need this things so far,thanks TaroDev 😀
@Tarodev
@Tarodev 3 жыл бұрын
Glad you enjoyed it! ❤️
@basicdogtrainings9389
@basicdogtrainings9389 3 жыл бұрын
@@Tarodev Thanks
@zZLibikiZz
@zZLibikiZz Жыл бұрын
this is simply amazing!
@NekomGiorgio
@NekomGiorgio 3 жыл бұрын
Really great, thank you!
@_dr_crusher
@_dr_crusher Жыл бұрын
Or alternatively, maybe a little insight as to the best way to move around the whole group the same way that you went about it. Super appreciated! Thank you
@shenshaw5345
@shenshaw5345 7 ай бұрын
did you ever figure this out?
@TREXYT
@TREXYT 7 ай бұрын
hi, there is an annoying bug where when there is around 17 players or more and you set up _rings to 2 in the inspector then _amount value change every +2, why that ? radial formation is not centred, please fix bro, thanks!
@rhow9724
@rhow9724 3 жыл бұрын
Fun video, thanks!
@itzmrjerry7067
@itzmrjerry7067 2 жыл бұрын
Great video! and thanks alot for this amazing script but i do have one problem in your video you talk about the toggle for uniform armys but i can't seem to find it. Could you help me with this?
@castlecodersltd
@castlecodersltd Жыл бұрын
Brilliant video. Thanks for sharing ☺
@bluzenkk
@bluzenkk 2 жыл бұрын
you are awesome... i was trying to archeive the same thing a year ago but failed.. Thanks~~
@germiyanbey1
@germiyanbey1 2 жыл бұрын
How to rotate the Formation, any ideas? When I rotate transformY of ExampleArmy (or UnitParent), the formation is overridden to stay same.
@germiyanbey1
@germiyanbey1 2 жыл бұрын
Okay, I found out, change each transform.position to transform.localPosition in Line 44 (that starts with "_spawnedUnits[i].transform.position") in ExampleArmy.cs. The formation will rotate properly by rotating Y of Example Army gameObj.
@am-apps-games
@am-apps-games 3 жыл бұрын
Many thanks for this one! Really usefull!
@Tarodev
@Tarodev 3 жыл бұрын
Glad it was helpful!
@YuriNoirProductions
@YuriNoirProductions 2 жыл бұрын
Do you have any video where you explain how you actually made the individual units wobbly? i only know the concept of having a animated unit and a physical unit that tries to mimic the first one but i have little to know idea how to execute it
@spark-games-uk
@spark-games-uk 2 жыл бұрын
I love the reference to the I'm a legend zombies gathering in the dark scene haha! ps. you're a Legend ;)
@TheKr0ckeR
@TheKr0ckeR 2 жыл бұрын
Wow... thats... incredible... i mean..the presentation is UBER-SUPER MEGA COOL.
@Tarodev
@Tarodev 2 жыл бұрын
Thanks pal :)
@manji2023
@manji2023 3 жыл бұрын
Pretty interesting.
@talha5930
@talha5930 Жыл бұрын
Amazing tutorial thumbs up for this 😊
@Malryni
@Malryni Жыл бұрын
OMG man, I love u So awesome script
@hakankosebas2085
@hakankosebas2085 Ай бұрын
awsome, this can be improved like mobile game tactile wars formation where you draw by hand and army shaped by drawed lines, also path drawing can be added where you draw a path and unit rotate and walk according to that path like in total war games, please do these suggestions, I need tutorial of them
@awsbasim8240
@awsbasim8240 2 жыл бұрын
How do you make the whole formation move How do u add pathfinding to it
@LeviAckerman-xt7dx
@LeviAckerman-xt7dx 3 жыл бұрын
This actually looks fun. Can I use this for my commercial mobile game?
@Tarodev
@Tarodev 3 жыл бұрын
Yup, use any code I release :) Let me know if you make anything cool!
@vaibhavjaiswal799
@vaibhavjaiswal799 3 жыл бұрын
Can you give a step by step tutorial of this
@171694
@171694 6 ай бұрын
Amazing!
@denis4096
@denis4096 Жыл бұрын
The character asset/model is great. Where can I get that?
@hyperv4758
@hyperv4758 11 ай бұрын
great video how you are avoiding collision between them? or this is not there?
@JitendraKumar-xv4kt
@JitendraKumar-xv4kt 2 жыл бұрын
Die-hard fan of you 🙌
@fortnitegiftcard8541
@fortnitegiftcard8541 2 жыл бұрын
I’m trying to make a flying game, how could I change the height of the ai plane in formation to make it look realistic and not a massive straight line
@shirosurfer8864
@shirosurfer8864 3 жыл бұрын
What's the animation style name of the wiggly guys
@rikii7237
@rikii7237 2 ай бұрын
how did you achieve uniform ?
@aweramu7107
@aweramu7107 3 жыл бұрын
Your Fonts is very cool? What is name your text fonts bro.
@Tarodev
@Tarodev 3 жыл бұрын
The thin font is simply called 'Blueprint'. The chunky boi is called "Bluprint", without the e. Very imaginative names :P
@kukisj2752
@kukisj2752 3 жыл бұрын
Sorry, but these little guys and their sacrifices have stolen the show ;) I just miss to see them dancing in circles at the end. Great content!
@Tarodev
@Tarodev 3 жыл бұрын
They blow themselves up for your entertainment
@adil0028
@adil0028 2 жыл бұрын
Tarodev, could you provide the shader you used? Or atleast make a tutorial on it? I've been trying to make a game using an art style similar to that, but haven't figured it out yet.
@ТестТест-в3ъ
@ТестТест-в3ъ 6 ай бұрын
Now we can make own Total War)))
@tubephega
@tubephega 3 жыл бұрын
go lil chibby go!
@MSI2k
@MSI2k 2 жыл бұрын
What's the music 2:50 and onwards?
@LinhNguyen-zt3mg
@LinhNguyen-zt3mg 2 жыл бұрын
so great (heart)!
@mayhem5036
@mayhem5036 2 жыл бұрын
Great vid, I'm wondering if you could add a flocking componet and would that be ideal to stop clipping between models?
@eminalgul1678
@eminalgul1678 3 жыл бұрын
Hello!! Thanks for video ,really useful . How should we write a code to add 1 object to the army?
@Tarodev
@Tarodev 3 жыл бұрын
Do you mean add more units? The code I provided should do that for you right out of the box :)
@prietinho6690
@prietinho6690 2 жыл бұрын
Do you know where I can download these types of materials to prepare your playtesting scene? I mean the blue boxes ty
@kamolovfintch8341
@kamolovfintch8341 Жыл бұрын
Great video! and thanks alot for this amazing script but i do have one problem in your video you talk about the toggle for uniform armys but i can't seem to find it. ❤❤❤❤❤❤❤❤
@SykerElRulas
@SykerElRulas 10 ай бұрын
Hii , i would so cool if one unit dies, the formation reorganizes to fill the gap , im trying it but so far im not geting it
@braindead2813
@braindead2813 7 ай бұрын
I am not following where is the instantiate() function?
@lemuelapperson853
@lemuelapperson853 3 жыл бұрын
They're not wear pants? JK This is very cool. Part of the radial patterns you were seeing is a known math phenomenon. It gives rise to such things as Moiré patterns.
@Tarodev
@Tarodev 3 жыл бұрын
They need to run free 😉 Just googled Moiré patterns, very interesting!
@archamondearchenwold8084
@archamondearchenwold8084 3 жыл бұрын
feels like u could turn these into RTS unit formations
@Tarodev
@Tarodev 3 жыл бұрын
It would be fun commanding these floppy little guys
@Conquership
@Conquership 2 жыл бұрын
thats what im trying to do!
@bio17
@bio17 3 жыл бұрын
I like your concise implemetation. Can I ask you why it's better to return an IEnumerable instead of a List in the script BoxFormation?
@Tarodev
@Tarodev 3 жыл бұрын
It simply gives you more performance options. For example you may only want to grab 3 positions, or just loop the first 5. Keeping it an ienumerable means you can simply grab 5 and stop the loop without it grabbing every position. I have a video coming out about ienumerable if that is a little bit confusing.
@bio17
@bio17 3 жыл бұрын
@@Tarodev thanks. I'm eagerly waiting for your video about this!
@lanzheng0728
@lanzheng0728 Жыл бұрын
do you mind share the source code in patreon?
@Tarodev
@Tarodev Жыл бұрын
I have the formation source code in the description my man. Or are you after something else?
@lanzheng0728
@lanzheng0728 Жыл бұрын
@@Tarodev yes,i'm pretty interesting the chalk mark style UI, how did u with that ?
@Tarodev
@Tarodev Жыл бұрын
@@lanzheng0728 that's as simple as a textmeshpro laid flat on the ground 😊
@lanzheng0728
@lanzheng0728 Жыл бұрын
@@Tarodev 😂sure
@moetsi7122
@moetsi7122 2 жыл бұрын
Awesome video! where is the link to the source code?
@whidzee
@whidzee 2 жыл бұрын
How hard would it be to take this and make it into a basic sporting game? I'm thinking something like rugby where the defensive team always retreats back 10m and stands in a line and then moves forwards roughly together
@Abdulwahab-vb6he
@Abdulwahab-vb6he 2 жыл бұрын
cool!
@Tarodev
@Tarodev 2 жыл бұрын
You're cool :)
@mtouseef1821
@mtouseef1821 3 жыл бұрын
Hey do you know you are awsome :)
@Tarodev
@Tarodev 3 жыл бұрын
I do now 😊
@DrHeinzDoofenshmirtz
@DrHeinzDoofenshmirtz 2 жыл бұрын
Is this using the NavMesh system? Please tag me if someone answers :)
@asinzhang8791
@asinzhang8791 3 жыл бұрын
i‘m more intrested on transtion that parameter changed
@Tarodev
@Tarodev 3 жыл бұрын
Sorry, what do you mean?
@romazriaz5141
@romazriaz5141 2 жыл бұрын
Damn🔥
@devlasutriv
@devlasutriv 2 жыл бұрын
Someone send this to AOE IV devs.
@bluzenkk
@bluzenkk 2 жыл бұрын
oh, you forgot to make a triangle formation.
@Tarodev
@Tarodev 2 жыл бұрын
Ohhh, that would have been fun
@publicalias8172
@publicalias8172 9 ай бұрын
The only problem is this just scales with rows and columns, not individual units added/removed.
@Tarodev
@Tarodev 9 ай бұрын
There are more problems than that, I can assure you. This is just a nice little starting point 😊
@guru-gamess
@guru-gamess 3 жыл бұрын
I done something like this 1 month ago...worse and less powerful
How to make a menu in Unity - UI Tutorial
26:27
Tarodev
Рет қаралды 192 М.
10 Things You NEED to Be Doing in Unity
11:40
Tarodev
Рет қаралды 137 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 53 МЛН
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 22 МЛН
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 16 МЛН
How many AI Agents can Unity handle?
6:18
Brackeys
Рет қаралды 1,7 МЛН
Unity Code Optimization - Do you know them all?
15:49
Tarodev
Рет қаралды 199 М.
Unity Architecture for Noobs - Game Structure
16:24
Tarodev
Рет қаралды 207 М.
How To Render 2 Million Objects At 120 FPS
14:57
Tarodev
Рет қаралды 150 М.
Victim - Animator vs. Animation 11
20:24
Alan Becker
Рет қаралды 4,6 МЛН
Pathfinding - Understanding A* (A star)
12:52
Tarodev
Рет қаралды 139 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,3 МЛН
I built a QR code with redstone to find out how it works
23:25
mattbatwings
Рет қаралды 117 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 53 МЛН