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

Improve first map server connect #214

Merged
merged 1 commit into from
Dec 29, 2024

Conversation

hasenbanck
Copy link
Collaborator

On first login the map server will send a command to change the map regardless, so we don't need to handle the map loading in the network event when we disconnect from the character server. We only initialize the player entity and interface in this case. We also now properly turn the screen black until we fully finished loading the map. Later we should also do the loading asynchronously on map change and turn the screen black while loading.

@hasenbanck hasenbanck force-pushed the improve_first_connect branch 5 times, most recently from c0a5166 to d200526 Compare December 29, 2024 09:42
On first login the map server will send a command to change the map regardless, so we don't need to handle the map loading in the network event when we disconnect from the character server. We only initialize the player entity and interface in this case. We also don't use the position that the map server sends us in the MapServerLoginSuccessPacket. The ChangeMapPacket is our only signal that we use to first load the new map and then set the correct position. The three positions that we used before this PR lead to some desync in the first few seconds, since it seems, only the final position of the map change network event is the correct one.

We also now properly turn the screen black until we fully finished loading the map.

Later we should also do the loading asynchronously on map change and turn the screen black while loading.
@hasenbanck hasenbanck force-pushed the improve_first_connect branch from d200526 to db0e668 Compare December 29, 2024 10:13
@hasenbanck hasenbanck merged commit 72fca1d into vE5li:main Dec 29, 2024
3 checks passed
@hasenbanck hasenbanck deleted the improve_first_connect branch December 29, 2024 17:21
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