-
Notifications
You must be signed in to change notification settings - Fork 44
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
see-other-players with Proper movement packets and File logging #155
Conversation
@@ -45,6 +55,12 @@ async fn handle_player_move( | |||
let mut position = conn_id.get_mut::<Position>(&state)?; | |||
trace!("Got position 1 for player move"); | |||
|
|||
delta_pos = Some(( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SIMD might help here? would suggest benchmarking first tho
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it should matter that much, and maybe a micro-optimization? SIMD, as far as I know, has overhead, so maybe not worth it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it should matter that much, and maybe a micro-optimization? SIMD, as far as I know, has overhead, so maybe not worth it.
Yeah I think SIMD only helps when you have a lot of elements
} | ||
}; | ||
|
||
broadcast(&packet, state, BroadcastOptions::default().all()).await?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should limit this to only players that can see them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should limit this to only players that can see them
Imo probably should be done in a different pr the previous one that used teleport didn't only send it in range either iirc although probably wouldn't be hard to fix here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm waiting for chunks shit to be more stable to add a regional entity system. So we can have lookup for entities in a radius with the ECS. Right now, we don't have much choice, other than literally looping through every living entity and finding the closest one.
@@ -11,10 +13,33 @@ pub fn init_logging(trace_level: Level) { | |||
//let console = console_subscriber::spawn(); | |||
let env_filter = EnvFilter::from_default_env().add_directive(trace_level.into()); | |||
|
|||
let is_verbose = trace_level > Level::INFO; | |||
|
|||
let file_layer = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we also have a latest.txt that is overwritten every time the server boots up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah definitely possible. I'm using tracing-appender library right now, with builtin shit. I'll figure it out by tomorrow hopefully.
Proper movement packets (change pos, change pos & rot, change rot, teleport) and File logging.
Description
^
Motivation and Context
It's required cuz I didn't implement the additional less bandwith taking packets before. And file logging is needed because why wouldn't we need file logging?
How has this been tested?
uh
Screenshots (if appropriate):
👍
Types of changes
Checklist: