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

API to create entities with Id and to retrieve them via Id #338

Closed
0nkery opened this issue Jan 24, 2018 · 2 comments
Closed

API to create entities with Id and to retrieve them via Id #338

0nkery opened this issue Jan 24, 2018 · 2 comments
Assignees

Comments

@0nkery
Copy link

0nkery commented Jan 24, 2018

Hi, thanks for awesome library!

I'm working on multiplayer client/server game. Would be awesome to have an API to create entities with specific Id (since all entities managed by server and server assigns Ids to them) and retrieve them via specific Id (e.g. to apply updates coming from server).

Currently I'm using NetworkId component and sending updates from server in map<Id, Update>. For player character entity I created Controllable flag-component which helps to find the entity I need.

But it doesn't feel right. Maybe there is a better way to design such system using tools already provided? Or maybe you'll consider to add APIs I described?

@torkleyy
Copy link
Member

What you're doing sounds pretty good already! Networking is a common thing, so I do want to have this in Specs. And the good news is that there already is something: the saveload module created by @omni-viral. It's a really great start for this, but lacks some docs and has some limitations currently, thus I started working on an overhaul in this PR. I think I can finish it tomorrow if I don't forget it.

@0nkery
Copy link
Author

0nkery commented Jan 24, 2018

Thanks for reply. I suppose it's unreleased so I'll wait til release. :)

@0nkery 0nkery closed this as completed Jan 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants