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

MapInfo requests not implemented #154

Closed
sorokya opened this issue Mar 26, 2022 · 7 comments
Closed

MapInfo requests not implemented #154

sorokya opened this issue Mar 26, 2022 · 7 comments

Comments

@sorokya
Copy link
Contributor

sorokya commented Mar 26, 2022

Noticed while testing with reoserv that the client keeps characters loaded when they walk out of view.

The original game client will unload NPCs, and Characters data when they go out of view of the player.

This creates the buggy effect where players always get stuck at the edge of the screen when walking out of view.
This also means that players walking into view will be invisible until you refresh the game.

Should be fixable by

  • Unloading/Removing characters/npcs when they go out of view
  • Implementing the MapInfo Request and MapInfo Reply handler
"Requesting MapInfo about nearby characters and/or npcs"
client_packet(MapInfo, Request)
{
	short player_ids[] // can ommit if only requesting npcs
	break              // can ommit if only requesting players
	char npc_indexes[] // can ommit if only requesting players
}

"Requesting MapInfo about a character"
client_packet(CharacterMapInfo, Request)
{
	short player_ids[] // reads to end
}

"Requesting MapInfo about a npc"
client_packet(NPCMapInfo, Request)
{
	char num_npcs // game server ignores this
	break
	char npc_indexes[] // reads to end
}

"MapInfo for characters and/or npcs"
server_packet(MapInfo, Reply)
{
	char num_entities
	break // omitted if not sending back characters
	struct CharacterMapInfo characters[num_entities] // omitted if not sending back characters
	struct NPCMapInfo npcs[] // reads to end
}

The original client

  • sends a MapInfo_Request when the walk_reply packet contains player_ids or npc_indexes it doesn't know about.
  • sends either a CharacterMapInfo_Request or NPCMapInfo_Request when a character or npc walks into view and it doesn't know about it
@ethanmoffat
Copy link
Owner

I thought these packets contained redundant data, so I wasn't entirely sure why they were needed. In eoserv, when another player walks into or out of view, the server sends that data in PLAYERS_AGREE/AVATAR_REMOVE. NPCs are also handled in walk packets via APPEAR_REPLY/NPC_PLAYER. EndlessClient has a caching mechanism for character/npc renderers that removes stale renderers for objects that aren't there anymore, so I don't think things that are out of view continue doing work to be rendered.

Are these MapInfo packets implemented in vanilla eoserv? Also remind me what you renamed to MapInfo, iirc it was the _AUTOREFRESH packets

@sorokya
Copy link
Contributor Author

sorokya commented Mar 26, 2022

I thought these packets contained redundant data, so I wasn't entirely sure why they were needed. In eoserv, when another player walks into or out of view, the server sends that data in PLAYERS_AGREE/AVATAR_REMOVE. NPCs are also handled in walk packets via APPEAR_REPLY/NPC_PLAYER.

ah yes I renamed the “appear” family to MapInfo. I think the players_agree/avatar_remove being used for players walking in and out is only an eoserv behavior. GameServer does not do this.

EndlessClient has a caching mechanism for character/npc renderers that removes stale renderers for objects that aren't there anymore, so I don't think things that are out of view continue doing work to be rendered.

the behavior I observed is they stay on the outer edge of the players view because reoserv doesn’t send avatar_remove packets (unless it’s a warp or someone logging out)

Are these MapInfo packets implemented in vanilla eoserv? Also remind me what you renamed to MapInfo, iirc it was the _AUTOREFRESH packets

no eoserv doesn’t implement them. It’s the ones labeled as auto refresh in eoserv.

@ethanmoffat
Copy link
Owner

Hmm ok. I'll have to look into implementing those families then. I haven't tested against GameServer for a lot of the in-game stuff yet, I think the client gets disconnected pretty quickly once you get past the welcome packets.

@ethanmoffat
Copy link
Owner

This still needs to be implemented in etheos, but is handled/tested client-side. Thanks @sorokya!

@sorokya
Copy link
Contributor Author

sorokya commented Mar 28, 2022

The client still doesn't clear out players/npcs on the edge of the screen. Can track in this issue or raise a separate one.

From PR description:

This still doesn't fix the issue of removing out of view characters/npcs from the map. I'm not exactly sure what triggers it in the official client but it seems like if something is on the very edge of the screen (12 tiles away) it will be dropped from view when the map re-renders.

I wasn't sure where the best place to implement this behavior was though. Up for suggestions if you have any. This of course can be handled in a separate PR.

@sorokya
Copy link
Contributor Author

sorokya commented Mar 28, 2022

The client still doesn't clear out players/npcs on the edge of the screen. Can track in this issue or raise a separate one.

From PR description:

This still doesn't fix the issue of removing out of view characters/npcs from the map. I'm not exactly sure what triggers it in the official client but it seems like if something is on the very edge of the screen (12 tiles away) it will be dropped from view when the map re-renders.

I wasn't sure where the best place to implement this behavior was though. Up for suggestions if you have any. This of course can be handled in a separate PR.

Raised separate issue #157

@ethanmoffat
Copy link
Owner

Yeah, separate issue IMO. This one was specifically "MapInfo requests not implemented" - which is done now

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