-
Notifications
You must be signed in to change notification settings - Fork 16
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
Migrate netcode to use Moffat.EndlessOnline.Sdk (eolib-dotnet) #353
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Proper send of chair packets when encountering a chair
- Capitalize player names - Ignore overwriting main character class ID - Ensure other players are added to map state repository
Fixes crash bug when attempting to re-serialize packets with invalid incoming data for logging purposes.
Fixes bug with arrays where only half the array would be loaded. Also fixes generated ToString implementations.
Only clear actors that have a renderer associated with them. Fixes bug where requester would repeatedly request the same actors and erroneously remove them too early.
Fixes issue where interval was not reset, constantly firing requests for the same entities and clearing out of range actors
Hat bitmaps now correctly only clip black pixels if the transparent color is present on the bitmap.
- Don't make fully transparent on up/left direction - Remove some commented code that was erroneously committed
- Instead, debug log their packet id and ignore them. - Example: BU pet code that sends a packet with a 0_0 packet id.
- (255, 255) used when dropping via inventory panel button. - Item drop packet sends double-encoded coordinates, hence the (1, 1) offset. - The official client uses (255, 255) for the inventory panel button. This is now replicated in EndlessClient.
Fixed-window mini map renderer was using incorrect coordinates when drawing entities. Fixes issue where entities would be rendered too far to the side of the screen.
Attempting to animate next frame for an NPC that is not doing the expected action would sometimes put the npc's frame out of bounds, which later caused a crash when attempting to load the texture for that (non-existent) frame.
Use private method and unregister the event when the associated renderer is disposed.
Reduces memory allocations in frequently executed code for temporary hash sets.
- CharacterRenderer: don't reallocate RT color data array unless recreating the target. - MapRenderer: use for loops instead of foreach loops to reduce garbage generated from enumerators. - MainCharacterEntityRenderer: direct comparison instead of call to params method with only one parameter.
Fixes party member HP update not showing in panel
Fixes rendering issues with players walking over spikes. Relies on presence/absence of a character on a spike tile to determine if the spikes should be rendered instead.
Timed spike tiles now correctly show the spike object when a timed spike packet is received.
- Drop warning now prevents drop unless you do it again - Item_Agree handled - Junk/Kick item now doesn't remove gold from inventory
- Client can request songs again - Jukebox shows warning for not enough gold - You don't have to stand right next to jukebox to use it
- Added "click" sound when item offer changes for either player - Fixed issue where the other player agreeing would make the main player agree - Fixed crash in trade dialog when the other player cancelled a trade - Fixed inventory panel not updating until 'trade completed' dialog was closed
I'm tired of maintaining it
Fixes jittery/slow rendering speed when the game is not the focused window.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a MASSIVE change involving a rewrite of all the netcode handling.
Instead of a manual process of using
PacketBuilder
to send packets andPacket
to read data from packets, all data handling for packets is now handled by code generated from eo-protocol. The implementing library for this is eolib-dotnet (i.e.Moffat.EndlessOnline.Sdk
), which generates structures that serialize/deserialize packet data to/from raw streams of bytes.With this new method, manual reading/building of packet data is no longer necessary. Data reading/writing is separated out as a responsibility of the
eolib-dotnet
library, meaning packet data reading/writing is no longer scattered throughout the application code. Packet handlers are solely responsible for taking the already parsed data and handling it accordingly. Packet translators are no longer required since the data is alreadyA design change was necessary for packet handling. A generic type was introduced for packet handlers, and packet objects are constructed via reflection by picking a packet type from the packet id in the raw byte stream. Instead of receiving an
IPacket
interface and requiring a cast, packets are passed to the handlers as strongly-typed objects that are already deserialized and converted from the raw byte stream.A number of bugs and missing packets were implemented as part of this change. Additionally, the
PacketDecoder
project was completely removed, since a complete reference for the packet specs exists ineo-protocol
. For all the details, see the commit history of this PR.There are a couple additional cleanup items that remain:
Moffat.EndlessOnline.Sdk
types for file I/O instead ofEOLib.IO
. Evaluate the necessity of continuing to maintainEOLib.IO
.EOLib.Logging
and necessity of continuing to maintain it.