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

Multiplayer? #17

Closed
iUltimateLP opened this issue Jan 18, 2016 · 7 comments
Closed

Multiplayer? #17

iUltimateLP opened this issue Jan 18, 2016 · 7 comments

Comments

@iUltimateLP
Copy link
Contributor

Hey, I thought how Multiplayer support works with the BrickGrid. I mean, what parts need to be replicated in order to get a multiplayer result, where both server and client can place / destroy blocks, use flashlight, sky updates, etc.?

@AndrewScheidecker
Copy link
Owner

I'm not sure how to replicate the flashlight and sky light updates, since I've never done blueprint replication. That should be relatively easy, though.

Replicating the bricks is more complicated:

  • You'd likely want to compress the data before replication, as it's currently quite large. Simple run-length-encoding would get you a lot, as well as only sending as many bits as are needed for the number of materials. Using Morton order for the bricks would probably give the RLE more leverage, though it might be more complexity than it's worth.
  • You'd need to have some logic similar to how the BrickGridComponent shows BrickRenderComponents within some radius, but instead of showing BrickRenderComponents, it would be replicating nearby regions to clients.
  • You'd also want to distinguish between replicating a whole region when a client first sees it, and replicating a smaller chunk when it's modified by some other player.
  • Finally, you need a way to simulate brick changes locally, so that when a player places/destroys bricks it doesn't have to wait for a round trip to the server before displaying the result.

@iUltimateLP
Copy link
Contributor Author

I already did flashlight and sun, but the brick stuff is too complicated for me I think, as it uses C++ (at least I think so) and I'm not really familiar with this topic. I thought so:
Every client has its own brick grid, and if somebody places a block, that will be replicated to all clients and there will be a block placed aswell, but I don't know how this will work.. If that's much C++ stuff, could you help me a bit with those compressing / decompressing?

@DefinitlyEvil
Copy link

For networking, you may wanna use Raknet(just a suggestion xD).

@iUltimateLP
Copy link
Contributor Author

I had a look in RakNet and it's a nice library, but in which points is this better than the standard Unreal networking features it alrwady has?

@DefinitlyEvil
Copy link

I prefer 3rd-party libraries because they are more customizable. xD

@iUltimateLP
Copy link
Contributor Author

I see they have replication of actors.. Is it hard to make it compatible to UE4? They have a link in their Readme.md about Unreal, but I can't access UDN..

@DefinitlyEvil
Copy link

@iUltimateLP Since UE is using C++ so technically you can integrate anything into it. xD

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

No branches or pull requests

3 participants