Snowiiii / Pumpkin

Empowering everyone to host fast and efficient Minecraft servers.
https://snowiiii.github.io/Pumpkin/
MIT License
3.13k stars 102 forks source link

Evaluate using an ECS for the project #76

Closed Shyrogan closed 3 weeks ago

Shyrogan commented 2 months ago

Hi @Snowiiii, thank you for this awesome project.

By looking through the code, I realized you were not using an ECS for the project.

Not really a issue at first glance but they are a solid foundation to maintain a healthy code base while improving performances at bigger scales. Here a two of them:

I really think one of those two libraries would be highly beneficial for the project, again thank you for your time on this project and have a nice day. If you want to discuss that on Discord, here is mine: shyrogan.

andrewgazelka commented 2 months ago

Hi @Snowiiii, thank you for this awesome project.

By looking through the code, I realized you were not using an ECS for the project.

Not really a issue at first glance but they are a solid foundation to maintain a healthy code base while improving performances at bigger scales. Here a two of them:

  • Bevy recently introduced observers for event-based systems.
  • Flecs has bindings for Rust and is being used by @andrewgazelka to maintain hyperion.

I really think one of those two libraries would be highly beneficial for the project, again thank you for your time on this project and have a nice day. If you want to discuss that on Discord, here is mine: shyrogan.

ECS is most useful if you are going to have extensibility, which was a requirement for my project, and I am not sure if it is for this.

On the other hand, I am somewhat dissapointed I was not reached out to before the creation of this project. I tried tiredlessly to get someone consistent to work on hyperion with me, but it is next to impossible because Rust community all wants to make their own Minecraft servers which will become abandonware in however many months.

Regardless, at the moment I am focusing on other things, and I wish @Snowiiii the best with this project.

Snowiiii commented 2 months ago

Hi @Snowiiii, thank you for this awesome project.

By looking through the code, I realized you were not using an ECS for the project.

Not really a issue at first glance but they are a solid foundation to maintain a healthy code base while improving performances at bigger scales. Here a two of them:

* [Bevy](https://bevyengine.org/) recently introduced [observers](https://bevyengine.org/news/bevy-0-14/#ecs-hooks-and-observers) for event-based systems.

* [Flecs](https://github.com/Indra-db/Flecs-Rust) has bindings for Rust and is being used by @andrewgazelka to maintain [hyperion](https://github.com/andrewgazelka/hyperion).

I really think one of those two libraries would be highly beneficial for the project, again thank you for your time on this project and have a nice day. If you want to discuss that on Discord, here is mine: shyrogan.

Hey, Thank you for the kind words ❤️. Many people already asked. if we want to use an ECS.

I have not much experience with ECS's. And the plan is to first focus on The foundation before implementing such a system.

I also took a look at Flecs and saw that its an C-Library and that the rust crate are just bindings. Which is a deal breaker.

I know that Valence uses Bevy ECS and afaik don't liked it and wanted to move to an own Solution. I have much experience with Game engine development and can imagine that there are may many things we don't need or actually complicate things for this Minecraft project. But this is just theorie, I will take a look at Bevy ECS later.

Shyrogan commented 2 months ago

Hi @Snowiiii, thank you for this awesome project. By looking through the code, I realized you were not using an ECS for the project. Not really a issue at first glance but they are a solid foundation to maintain a healthy code base while improving performances at bigger scales. Here a two of them:

* [Bevy](https://bevyengine.org/) recently introduced [observers](https://bevyengine.org/news/bevy-0-14/#ecs-hooks-and-observers) for event-based systems.

* [Flecs](https://github.com/Indra-db/Flecs-Rust) has bindings for Rust and is being used by @andrewgazelka to maintain [hyperion](https://github.com/andrewgazelka/hyperion).

I really think one of those two libraries would be highly beneficial for the project, again thank you for your time on this project and have a nice day. If you want to discuss that on Discord, here is mine: shyrogan.

Hey, Thank you for the kind words ❤️. Many people already asked. if we want to use an ECS.

I have not much experience with ECS's. And the plan is to first focus on The foundation before implementing such a system.

I also took a look at Flecs and saw that its an C-Library and that the rust crate are just bindings. Which is a deal breaker.

I know that Valence uses Bevy ECS and afaik don't liked it and wanted to move to an own Solution. I have much experience with Game engine development and can imagine that there are may many things we don't need or actually complicate things for this Minecraft project. But this is just theorie, I will take a look at Bevy ECS later.

I think you already have good foundations (at first sight). I will try to look whether I can open a PR and start working on the changes required to move towards an ECS such as Bevy's ECS. Understandable when it comes to Flecs, I would disagree if Bevy didn't introduce observers recently.

@andrewgazelka I really appreciate your efforts, I think they might be a little clumsy. Currently Hyperion is described as "closed-source" and does not describe itself as a collaborative effort to get an implementation of Minecraft server in Rust which might be a little discouraging. I'm hopeful discussing with @Snowiiii will allow you to put your efforts together.

I'll try to join one of the two projects as soon as I get my new PC and I get free time.

andrewgazelka commented 2 months ago

Hi @Snowiiii, thank you for this awesome project. By looking through the code, I realized you were not using an ECS for the project. Not really a issue at first glance but they are a solid foundation to maintain a healthy code base while improving performances at bigger scales. Here a two of them:

* [Bevy](https://bevyengine.org/) recently introduced [observers](https://bevyengine.org/news/bevy-0-14/#ecs-hooks-and-observers) for event-based systems.

* [Flecs](https://github.com/Indra-db/Flecs-Rust) has bindings for Rust and is being used by @andrewgazelka to maintain [hyperion](https://github.com/andrewgazelka/hyperion).

I really think one of those two libraries would be highly beneficial for the project, again thank you for your time on this project and have a nice day. If you want to discuss that on Discord, here is mine: shyrogan.

Hey, Thank you for the kind words ❤️. Many people already asked. if we want to use an ECS. I have not much experience with ECS's. And the plan is to first focus on The foundation before implementing such a system. I also took a look at Flecs and saw that its an C-Library and that the rust crate are just bindings. Which is a deal breaker. I know that Valence uses Bevy ECS and afaik don't liked it and wanted to move to an own Solution. I have much experience with Game engine development and can imagine that there are may many things we don't need or actually complicate things for this Minecraft project. But this is just theorie, I will take a look at Bevy ECS later.

I think you already have good foundations (at first sight). I will try to look whether I can open a PR and start working on the changes required to move towards an ECS such as Bevy's ECS. Understandable when it comes to Flecs, I would disagree if Bevy didn't introduce observers recently.

@andrewgazelka I really appreciate your efforts, I think they might be a little clumsy. Currently Hyperion is described as "closed-source" and does not describe itself as a collaborative effort to get an implementation of Minecraft server in Rust which might be a little discouraging. I'm hopeful discussing with @Snowiiii will allow you to put your efforts together.

I'll try to join one of the two projects as soon as I get my new PC and I get free time.

To be clear, @Snowiiii has expressed he does not want my project discussed in his. I would recommend opening issues on my GitHub/Discord instead of discussing them here. The “clumsiness” is intentional because many people have wanted to make it closed source if I partner with them and it has alternated between closed and open source.