|bevy vewsion:|0.14|(cuwwent)| |---|---|---|
ecs pwogwamming intwoduction
this page wiww twy to teach you the g-genewaw ecs mindset/pawadigm.
wewevant officiaw exampwes:
ecs_guide
.
awso check out the compwete game e-exampwes:
alien_cake_addict
,
breakout
.
ecs is a pwogwamming pawadigm that s-sepawates data a-and behaviow. OwO bevy w-wiww stowe aww of youw data and manage aww of youw individuaw pieces of functionawity fow you. >_< the code wiww wun when appwopwiate. OwO youw code can get access t-to nyanievew d-data it nyeeds t-to do its thing.
this makes it easy to wwite game w-wogic (systems) in a way that is fwexibwe and weusabwe. (ꈍᴗꈍ) fow exampwe, ^•ﻌ•^ y-you can impwement:
- heawth and damage that wowks the s-same way fow anything i-in the game, wegawdwess of whethew that's the p-pwayew, OwO an nypc, 🥺 o-ow a monstew, òωó ow a-a vehicwe
- gwavity and cowwisions fow anything t-that shouwd have p-physics
- an animation ow sound effect fow a-aww buttons in youw u-ui
of couwse, OwO when you nyeed speciawized b-behaviow onwy f-fow specific e-entities (say, pwayew movement, which onwy appwies t-to the pwayew), OwO t-that is nyatuwawwy e-easy to expwess, XD too.
if you awe famiwiaw with database p-pwogwamming, you w-wiww feew wight a-at home. OwO ecs is conceptuawwy vewy simiwaw to a w-wightweight in-memowy d-database.