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

[FEAT] Support for Namespaces #29

Open
sasial-dev opened this issue Dec 28, 2023 · 2 comments
Open

[FEAT] Support for Namespaces #29

sasial-dev opened this issue Dec 28, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@sasial-dev
Copy link
Collaborator

Describe your feature

In a large complex game, the remotes used can generally be grouped into categories. Zap should support a namespace under the event struct, and when a namespace is specified, you should be able to access it through remotes.namespace.remote_name.

Alternatives

  • Do not organise the events
  • Use mutiple zap config files

Implementation Details

This should be implimented under the event struct with an optional namespace field.

@sasial-dev sasial-dev added the enhancement New feature or request label Dec 28, 2023
@jackdotink
Copy link
Member

jackdotink commented Dec 28, 2023

An alternative syntax for this rather an an event namespace field could be this:

namespace n = {
	type t = u8
	event e = {
		from: Server,
		type: Reliable,
		call: SingleAsync,
		data: t
	}
}

-- this also allows us to use types from namespaces
type t_from_n = n.t

@sasial-dev sasial-dev added this to the 0.7 Release milestone Jan 2, 2024
@sasial-dev
Copy link
Collaborator Author

I do like that alternative syntax better!

@sasial-dev sasial-dev modified the milestones: 0.7 Release, 0.8 Release Jan 20, 2024
@sasial-dev sasial-dev removed this from the 0.8 Release milestone Mar 23, 2024
@sasial-dev sasial-dev added this to the 0.7 Release milestone Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants