Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blinker POC. Possible framework for constantly-updating entities. #406

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

blockmath
Copy link

@blockmath blockmath commented Jun 22, 2024

Also divorced the ID generation code from server::sim::Sim. Nevermind; that has been entirely reverted

Still todo for a full feature: making a generic system for entities to sync back to the client.

Future: TickerEntity should be the component associated with any constantly-updating entity, and the actual ticker-specific Ticker struct should be moved to be its own component, with the ticker field in TickerEntity denoting which Component the ticker is held in. Nope, I realize now that that was a short-sighted, C++-pilled idea

common/src/id_generator.rs Outdated Show resolved Hide resolved
server/src/sim.rs Outdated Show resolved Hide resolved
common/src/ticker.rs Outdated Show resolved Hide resolved
common/src/ticker.rs Outdated Show resolved Hide resolved
common/src/ticker.rs Outdated Show resolved Hide resolved
common/src/ticker.rs Outdated Show resolved Hide resolved
server/src/sim.rs Outdated Show resolved Hide resolved
server/src/sim.rs Outdated Show resolved Hide resolved
server/src/sim.rs Outdated Show resolved Hide resolved
@blockmath
Copy link
Author

Yeah, most of the weird pub stuff probably got that way from the revert.

Copy link
Collaborator

@patowen patowen left a comment

Choose a reason for hiding this comment

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

This is looking pretty good! I'm optimistic that this will be able to be merged relatively soon, although, especially since I'm not that confident in this part of the codebase, it will need a review from @Ralith before it's ready to merge.

@blockmath
Copy link
Author

All right, the blinker now actually syncs back to the client. I have no idea how I would go about actually rendering it, though...

@blockmath blockmath marked this pull request as ready for review June 24, 2024 00:41
Copy link
Collaborator

@patowen patowen left a comment

Choose a reason for hiding this comment

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

All that's left from me are minor nits.

common/src/ticker.rs Outdated Show resolved Hide resolved
server/src/sim.rs Outdated Show resolved Hide resolved
@patowen
Copy link
Collaborator

patowen commented Jun 24, 2024

All right, the blinker now actually syncs back to the client. I have no idea how I would go about actually rendering it, though...

Yeah, that's going to be rather tricky. The rendering code doesn't have many examples of things being rendered besides the world grid and other players. It's possible that will need to be a separate PR.

@blockmath
Copy link
Author

I agree, that's why I'm deciding to finish now rather than waiting to do that.

server/src/sim.rs Outdated Show resolved Hide resolved
common/src/blinker.rs Outdated Show resolved Hide resolved
client/src/sim.rs Outdated Show resolved Hide resolved
@patowen patowen requested a review from Ralith June 24, 2024 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants