#When/How to use ECS

1 messages · Page 1 of 1 (latest)

steep finch
#

I'm planning on making a simple multiplayer first person shooter using Unity's new Netcode. When I checked the Unity netcode page, it recommended using netcode for entities for competitive games, so here I am. My question is what things can/should be made using ECS? It seems to me like ECS is just somewhat of a replacement for object pooling, making it easier to instantiate things like bullets in large quantities. However, making something like a player seems MORE complicated using ECS, and I'm not entirely sure how that can be done (is there an ECS charactercontroller and rigidbody equivalent?)

I guess what I'm asking is are there any good guides for making something like what I'm trying to accomplish, or any general recommended practices for something like this? Thank you!

hearty monolith
steep finch
hearty monolith
steep finch
#

Gotcha. I'll take a look at that, thanks!

hearty monolith
#

That being said, this make the project way harder to create. I also doubt the capacities of ECS to get everything done at all.

Instead, I would opt for a more Traditionnal approach with GameObject if I were in your place.

#

Game can still be optimize with Burst and Jobs System for critical feature.

small meadow
#

Never went into OOP land, straight into ECS. Feels good

hearty monolith
#

This is not even something to agree or not. This is simply a fact. There is more resources on how to make things in GameObject. GameObject is way easier to understand and use.

If, personally, you had no issue , then I am happy for you. However, this is not how most people will experience ECS.

steep finch
#

I did see that they have a Netcode for GameObjects package, but the Netcode for entities package seems more appealing because it includes lag compensation, interpolation, etc. out of the box and would make it better for a competitive FPS. If the Netcode for gameobjects package works for competitive games though, I'd use that

west otter
#

i've never tried to teach somebody using ecs from scratch when they've never made a game before, so i don't know how it would go, but i would say that you have to unlearn a lot of things when you switch to ecs from oop, and you could skip that at least if you went straight to ecs.

i think in a vacuum, if both ways of doing things were equally mature, i would definitely 100% teach ecs to a new person, because i believe it's way better. but as it stands, it's true that oop land is wildly more popular because among other things it's been out for 19 years and ecs has been out for a few months, and so there will indeed be more resources for learning it, and more asset store packages compatible with it etc.

#

i do not think netcode for gameobjects can reasonably work for a competitive fps.

steep finch
west otter
#

there is an ecs character controller, though; com.unity.charactercontroller (still in preview but works great)

#

i'd say it's only in preview due to internal process shenanigans

#

and it's completely hip to netcode

small meadow
west otter
#

you also are more interested in how things work than the average game dev; most game devs (including very successful ones) want to know exactly the minimum about how things work in order to make what they want to make, if not less

steep finch