How Many AI Agents can JavaScript Handle?

preview_player
Показать описание
How Many AI Agents can JavaScript Handle?

Inspired by Brackeys's video "How Many AI Agents can Unity Handle?", I decided it'd be fun to try a JavaScript version, with a bunch of work thrown at a* optimization, generation JavaScript optimization, and a little (lot) of cheating.

I walk through the steps of getting this all working, starting with a maze generation implementation, and an a* implementation. I reuse the code from my boids implementation but with a path following behaviour added, and finally we look at a* optimization and general javascript optimization to improve the framerate.

Credits:
Рекомендации по теме
Комментарии
Автор

Like & Subscribe, thanks!


Thanks to Yocto Coding for pointing some problems out with the last upload, editing videos under lockdown and kids running around the house is hard!

simondev
Автор

I am genuinely astonished that a lot of your videos have only a few thousand views. The topics you cover are incredibly interesting and your presentation of them are really well-balanced. Good luck with the channel!

thebigsleepjoe
Автор

You're a badass. The fact you kept optimizing after you hit 4000 agents is inspiring. Great project and video

jamisongriffith
Автор

Wow I had no clue doing your own matrix calcs would improve things so much. Definitely curious on what other performance you can squeeze out

ajlightning
Автор

This is amazing, hoping to make a lot of little ai guys like this in game someday

danesmith
Автор

You've got a new sub ;) keep exploring, experimenting and inventing!

Rssks
Автор

Simon your skills are impressive great work buddy, keep it up 👍🏻

nury
Автор

I just found your channel. I will be watching every video now.

aliphian
Автор

You're awesome, huge thanks for sharing code with us!

DNMNTUR
Автор

God damn you are good. I didn't even know JavaScript could do this

marcusaureliusregulus
Автор

I've been interested in A* for a bit. I might have to take a deeper look.

Chadderbox
Автор

Would be cool to see optimization of all those boids affecting grid so they can't go through each other and avoid collision.

zohichnazirro
Автор

May would be interesting, not only for me:
Place a red army on the left and a blue army on the right. Both have to pass by a maze to get to the middle of the map. There, the agents are trying to kill the other. interesting for me would be, what impact would that have? Finding near enemies and what impact on the performance side would have fired lasers or bullets have. And also implementing particles when an agent gets destroyed would have a massive impact to the framerate?

Would love to see something like that :)
greetings

FredZockt
Автор

I live for JavaScript. I beleive it’s perfect for the kind of games I’ll be making. One day I’ll learn c++ but that’s when I want to tackle giant games

MarkieMark-vyhg
Автор

That's awesome, very interesting thanks.

cmcdonough
Автор

Fellow js dev here, like what you have done

How long does it take to make this ?

Keep up the great work

leoyeung
Автор

60k is a lot for JavaScript. What kind of hardware were you using for this experiment?

WorstDeveloper
Автор

Is there a Table listing the CPUs vs Max Items rendering performance using javascript ? Otherwise you'll get "script it's taking too long "

carlosrvillegaschazaro
Автор

"unity is heavily optimized"
WRONG 😂

xKeray
Автор

this looks like you used 2d a*. so its not really comparable. but nice work

DommageCollateral