Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 00:34
    chengts95 commented #462
  • Apr 13 22:37
    skypjack commented #462
  • Apr 13 22:32
    skypjack commented #462
  • Apr 13 22:14
    chengts95 commented #462
  • Apr 13 20:13
    skypjack commented #462
  • Apr 13 20:13
    skypjack commented #462
  • Apr 13 19:52
    chengts95 commented #462
  • Apr 13 19:23
    skypjack commented #462
  • Apr 13 18:23
    chengts95 commented #462
  • Apr 13 10:09
    skypjack commented #462
  • Apr 13 07:03

    skypjack on view

    view: support for repeated types (compare)

  • Apr 13 07:02

    skypjack on experimental

    now working on v3.8.0 config: added error messages to… process: dead -> finished (compare)

  • Apr 13 07:01

    skypjack on build_system

    build system: icc workflow family: make it works with icc (compare)

  • Apr 13 07:01

    skypjack on master

    type traits: removed is_std_has… ready to cut v3.7.1 (general qu… updated single include file (compare)

  • Apr 13 06:16
    chengts95 commented #462
  • Apr 13 06:16
    chengts95 commented #462
  • Apr 12 15:00

    skypjack on any

    (compare)

  • Apr 12 14:47

    skypjack on build_system

    build system: icc workflow family: make it works with icc (compare)

  • Apr 12 14:47

    skypjack on view

    view: support for repeated types (compare)

  • Apr 12 14:46

    skypjack on experimental

    now working on v3.8.0 config: added error messages to… process: dead -> finished (compare)

Erik Scholz
@Green-Sky
haha, until c++20
Michele Caini
@skypjack
Mmm... I remember I did some changes to entt::any to make it closer to std::any. Probably this behavior is among the other things I changed in this sense. I'll give it a try later or tomorrow and confirm it @Green-Sky :+1:
Michele Caini
@skypjack
I'm glad to say that... EnTT v3.7 is here. Enjoy. :slight_smile:
Press release : https://www.reddit.com/r/gamedev/comments/miguwr/entt_v370_is_out_gaming_meets_modern_c/
And that's it, I'm not very social, you know. Feel free to share if you like though, I'd be very happy. :+1:
Erik Scholz
@Green-Sky
ok so you did not change the any construction.
but nice, new release :D
also, i have seen this somewhere else, but, you could add the single header include to the assets of the github release
Michele Caini
@skypjack

ok so you did not change the any construction.

I haven't, but only for a matter of time. :smile: I'm having some days out and I wanted to cut a release before leaving. The idea is to make the constructor support both aggregates and non-aggregates as it happens for the pools.

So, well, soon upstream :slight_smile:

also, i have seen this somewhere else, but, you could add the single header include to the assets of the github release

Uhm, this is interesting actually, I could remove it from the repo and make it part of the assets actually. Do you remember where you've seen it?

Erik Scholz
@Green-Sky
https://github.com/nlohmann/json/releases
this one, but he keeps the single include in the repo
but he also has a lot of parsing test data in the repo, which makes submodul-ing unfeasible, and so also includes the src only as zip as a "asset"
bfeldpw
@bfeldpw
Hello everyone: I have a question concerning "entt::exclude". If I use a dummy-component to mark all objects (entities) that are outside of the viewport, is it better to use an "outside_component" that is added (and excluded) for objects outside of the viewport or an "inside_component" for those objects inside? Guess that is a question that relates to the internals, if it is faster to have an additional (inside) component or to exclude a component...
bfeldpw
@bfeldpw
Fyi: In this case, it's about actual graphical objects and testing against the camera viewport. But the main question might be related to the internals as stated above: Is it expected to be faster to have a (dummy) component excluded or the inverse included?
Michele Caini
@skypjack
I would probably assign the component to the set of things I want to draw, since they are likely much less than the total count
bfeldpw
@bfeldpw
Thank you, sounds reasonable! So given that, I guess in general there shouldn't be that much of a difference in adding a component vs excluding another (in theory, of course depending on size, content, etc.)?!
Michele Caini
@skypjack
In theory, if adding shrinks your set by a lot, it's worth doing it. Like, you've a set that is 100k entities and adding would only identify 100 entities.
Because EnTT picks the shortest pool internally, so...
bfeldpw
@bfeldpw
Ah, right, that makes sense, thanks again.
Michele Caini
@skypjack
You're welcome
DNKpp
@DNKpp
Hey, as already told in my issue on github, I'm quite new to enTT (and ECS in general) and try to understand how to solve some simple tasks. Currently I'm writing a simple program which involves a production and a storage. A production is an entity, which contains a duration which in fact expires after a while and then should add some goods to the storage (which has multiple slot entities, each either empty or with an assigned good and fill amount).
First I stepped into the duration system, which updates all non-expired durations and if the progress exceeds the actual duration, this entity gets an "DurationExpired" component attached, which I'm reacting on in my Production system via observer (collector.group). Because a production generates goods, but the storage entity (and it's slots) may be full, so the production system has to query the storage entity. If its full, the production should halt until enough space is freed. Now I wonder, what would be the best approach to achieve this. I may add a new component like "StorageFull" but that seems odd. I wonder if its ok to simply erase all handled productions from the observer list and keep the not handled in it. But that seems like an ugly hack.
Does anyone have any suggestions on that topic?
DNKpp
@DNKpp
Another question: Is it wise to generally alter component values via patch function or should that be avoid unless explicitly needed?
Michele Caini
@skypjack
@DNKpp since you logged on discord and said you like it more, I'll answer there. :slight_smile:
Btw patch is perfectly fine. The only difference with getting a reference and updating it is that patch also triggers the update event.
Michele Caini
@skypjack
I plan to cut a minor release next week, with a couple of quality-of-life improvements and nothing more.
Briefly, the any review for perf improvements and aggregate support, plus some changes to the iterable view.
If someone has anything else to point out that is suitable for entering a minor release, please reach out. Thanks.
Erik Scholz
@Green-Sky
:+1:
Michele Caini
@skypjack
To all those interested, master contains a ready-to-go v3.7.1 with some small changes to improve quality of life:
  • Less instantiations due to meta props
  • Iterable views/groups (eg the objects returned by view.each()) work with <algorithm> also on VS
  • any support for both aggregates and non-aggregates
  • No more copies/moves (and therefore better perf) when emplacing, resetting or assigning to an any or meta_any
  • Removed a dependency on std::array from meta (just because)
    That's all. I'll cut it tomorrow. If you can think of anything else, raise your hand, please. :slight_smile:
Michele Caini
@skypjack
Side note: the next changes will force me to get rid of entt::to_entity, that is, the function used to get the entity from an instance of a component.
There is no way I can make it work in the near future. If you're using it, this is a good time to discuss a valid alternative. :slight_smile:
Erik Scholz
@Green-Sky
are you sure you will remove to_entity? bc i would deprecate it then ^^
Erik Scholz
@Green-Sky
core/type_traits.hpp:576:96: error: ‘hash’ is not a member of ‘std’
  576 | struct is_std_hashable<Type, std::enable_if_t<std::is_convertible_v<decltype(std::declval<std::hash<Type>>()(std::declval<Type>())), std::size_t>>>
my gcc says you need to add a #include <functional>
yesfish
@huwpascoe
question: I notice that the destroy function loops through every pool. Does that mean if you were to have lots of different component types in use that it'd start slowing down every time destroy is called?
Erik Scholz
@Green-Sky
if the pools are created, i guess.
theoretically you only pay for what you use...
Erik Scholz
@Green-Sky
@skypjack just ported over my code to master. looking good. love how aggregates work again. I actually waited for them to be back before is port over the projects.
edit: except the missing include mentioned above :arrow_up:
Michele Caini
@skypjack
@Green-Sky what gcc is that? Mine doesn't say it! :rage:
@huwpascoe if you really need it, you can optimize it by pooling the bucket but there are tons of better solutions to destroy things in a way that has no impact on your framerate
@Green-Sky btw hash isn't in functional, I don't get this working.
Michele Caini
@skypjack
Oh, nevermind, hash is in <functional>, dunno why I was convinced of the opposite
Damn, I don't want to add functional to that file
Erik Scholz
@Green-Sky
haha, its gcc9
well, you have either to move that code section or just run with it. now functional has to be included somewhere...
Michele Caini
@skypjack
Or I can remove that traits, since it's useless :)
bfeldpw
@bfeldpw
Hello @skypjack: I just realised for which purposes EnTT can be utilised. I have a small pet project, some server-client-based galaxy simulation engine ( Planeworld NG ) and was thinking of howto handle subscriptions from clients on certain data. My idea: Each connection has a unique ID, why not use an entity for this. Each kind of subscription is represented by a component, so entities (connections = clients) get the relevant components (subscriptions). This is not very cache-relevant as the things I was using EnTT for before, but it's just so comfortable.
So, thank you for this great ECS!
Michele Caini
@skypjack
It doesn't have to be cache-relevant to sounds good :slight_smile: if ti works for you, that's enough.
And thank you for using EnTT!
bfeldpw
@bfeldpw
For such great middlewares as EnTT and Magnum, I will put some dedicated credits in. For the moment, apart from the GitHub-Tags, I just wrote some experiences and a short explanation, what I use EnTT for.
Michele Caini
@skypjack
Wanna share? I think others would be interested
bfeldpw
@bfeldpw
Definetely, but at the moment it's only two aspects, on the one hand physical objects like stars with their metadata and/or kinematics/kinetics/dynamics, on the other hand the idea about connections and subscriptions. I wrote a very brief section on Planeworld NG. I made the first experiences with another project called BattleSub. Its purpose was to learn fluid dynamics on the GPU, EnTT, and Magnum. I used EnTT mainly for physics components referring to Box2D and visual components encapsulating Magnum data. Projectiles were entities too, but I will eventually convert the submarines to entities in the future. I guess that will be some approach following your hierarchy blogs.
bfeldpw
@bfeldpw
Planeworld NG is a very young (about two months) restart of my passion project Planeworld. I will definitely share more information as the project evolves. But a minor disclaimer: Although I've been a hobby coder for a long time, I'm nowhere near that professional level of yours and others.
Michele Caini
@skypjack
No worries, I'm nowhere near the professional level of literally anyone on this channel