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

Concept review: Broadcast Generic Messages for Effects and Sounds #236

Closed
wants to merge 6 commits into from

Conversation

fantoms
Copy link
Contributor

@fantoms fantoms commented Apr 12, 2017

Please comment and discuss the code below -

The code length was getting quite large for landblock action queue broadcasting, so I came up with a generic solution that packs any GameMessage inside of an OutboundMessageArgs object.

This allows for any GameMessage to potentially be sent over the Landblock Broadcast function.

I also implemented changes in landblock to broadcast the effects and sounds, with generic functions.

PLEASE NOTE: One obstacle that this method does not address, is per session sequences. If a Game Message has been extended into another message type (like GameEventPlayerKilled), then the initial sequence for the source session will be used. This does not matter for game messages that do not use sequences, like effects or sounds, but a solution will need to created to address this issue. This also means that the PlayerKilled message is currently bugged in this PR.

The functionality that was worked on to produce the proof of concept, are effects and sounds, so when reviewing you may find it useful to start your breakpoints at ActionApplyVisualEffect.

All discussion is welcome for this PR - Thanks!

@Zegeger
Copy link
Contributor

Zegeger commented Apr 13, 2017

I have a thought on this, but will require some refactor work.
I think we need to move all GameMessage/GameEvents to store inputted data, and then we add a
byte[] GetPayload(Session session)
function which actually writes the content for sending. Then a single event can be used repeatedly to broadcast to many sessions.
I need to take a closer look at this to think out the details.

@fantoms
Copy link
Contributor Author

fantoms commented Apr 18, 2017

Thanks for taking a look!

@fantoms fantoms closed this Apr 18, 2017
@fantoms fantoms deleted the dev-Death2 branch June 28, 2017 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants