Skip to content

ECS Part 3 | Entity loads/unloads components - #2674

Merged
IntegratedQuantum merged 25 commits into
PixelGuys:masterfrom
tillpp:ECS_ServerEntityLoadsComponents
Apr 4, 2026
Merged

IntegratedQuantum merged 25 commits into
PixelGuys:masterfrom
tillpp:ECS_ServerEntityLoadsComponents

Conversation

@tillpp

@tillpp tillpp commented Mar 6, 2026 •

Copy link
Copy Markdown
Contributor

Third step of splittig up the 3000 lines big PR: #2652
(depends on Part 2)

  • Entity loads/unloads components

  • Base64 Class and functionality that is going to be used in the next parts is being used in this part

  • created the beginning of an audience system,
    depending on who you are, you get different information send.
    .Disk = all information
    .playerHimself = everything the player should now about themself (like energy and health)
    .playerNearby = information for players in proximity ( like position )
    .playerFaraway = less information: (no information about position, but name and playerIndex)
    Note: those examples are not implemented in this PR, they only serve as a demostration what could be doing in the future. Only send limit information about enitites #2670

  • Each Component has an ID, just like the protocolIDs, but unlike protocolIDs ComponentIDs get stored, so to ensure compability with mods that add their own components or removing or adding components, the entityComponentPalette is introduced.

@Wunka Wunka moved this to WIP/not ready for review in PRs to review Mar 7, 2026
@Wunka Wunka moved this from WIP/not ready for review to High Priority in PRs to review Mar 11, 2026
@tillpp
tillpp force-pushed the ECS_ServerEntityLoadsComponents branch from f397bbb to dde1d0d Compare March 11, 2026 18:32
@tillpp

tillpp commented Mar 11, 2026

Copy link
Copy Markdown
Contributor Author

Rebasing is actually doable (no raytracing)

@tillpp tillpp left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change this please.

Comment thread src/server/Entity.zig Resolved
Comment thread src/server/Entity.zig Resolved
Comment thread src/server/Entity.zig Resolved
Comment thread src/server/Entity.zig Resolved
@IntegratedQuantum IntegratedQuantum moved this from High Priority to In review in PRs to review Mar 14, 2026
@tillpp

tillpp commented Mar 29, 2026

Copy link
Copy Markdown
Contributor Author

Take your time reviewing it,
I will only return after mid April to Cubyz again.

@@ -1 +1 @@
pub const _template = @import("_template.zig");
pub const @"cubyz:_template" = @import("_template.zig");

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mods might add their own entityComponents here

Comment thread src/server/Entity.zig Resolved
Comment thread src/server/world.zig Resolved
Comment thread src/entity.zig Resolved
Comment thread src/entity.zig Resolved
Comment thread src/entity.zig Resolved
Comment thread src/utils.zig Resolved
Comment thread src/entity.zig Resolved
Comment thread src/entity.zig Resolved
Comment thread src/entity.zig Resolved
Comment thread src/entity.zig Resolved
tillpp and others added 6 commits April 4, 2026 17:01
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
Comment thread src/entity.zig Resolved
Comment thread src/server/server.zig Resolved
Comment thread src/entity.zig Resolved
Comment thread src/entity.zig Resolved
Comment thread src/entity.zig Resolved
Comment thread src/entity.zig Resolved
@IntegratedQuantum
IntegratedQuantum merged commit 628d60c into PixelGuys:master Apr 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants