Jump to content

dAkshEN3

Members
  • Posts

    4
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • URL
    http://dakshen3.blogspot.com
  • Location
    Lincoln, UK
  • Personal Text
    Code Ninja Extraordinaire

dAkshEN3's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I'm working on a mod which requires extra data for each loaded chunk to be synchronised between players, as well as updated periodically on the server and the players then sent the updated data. However, The huge lack of tutorials and examples of this kind of system makes it incredibly difficult to work out how to implement. I have spend days looking through the code and trying to work out how the hell it all works, but I still cannot understand it. So I here are some questions I need answered: Does the server know where each player is? Does the server know which chunks each player has loaded? In a multiplayer game, which side (client or server) receives ChunkEvents and ChunkDataEvents? In a multiplayer game, which side holds the entities? Are there any existing open-source forge mods which also have to sync additional chunk data that I can use as reference? The only mod I can think of is ThaumCraft, but it's closed-source. Thanks to anyone who can answer any of these questions. I have asked similar questions here previously and gotten no response, despite being unable to find any tutorials on the subject.
  2. So, I am working on a mod which holds a set of shorts for each loaded chunk. When a chunk is saved it saves the data to the NBT in ChunkDataEvent.Save and when one is loaded it loads the data from the NBT in ChunkDataEvent.Load, or if there is none yet generates a new set. My original client/server scheme was for the Server to hold the data for all the loaded chunks, perform updates (the chunks interact and the values change) and periodically send the relevant set of data to each player. The Server would also handle loading and saving the data as players move between chunks. The Client on the other hand would hold a static (i.e. does not update apart from syncing with the server) version of the relevant data, which can be queried by anything clientside just like on the server side. The primary difference here is that all 'writes' to the data are done serverside. However, I then noticed that ChunkDataEvents are only called clientside! This not only messed up my scheme (clients would need to report to the server which chunks to load/save/unload) but also seemed counterintuitive as surely it's the server that handles world loading and saving (which should include ChunkDataEvents). I am now in need of help redesigning my client/server scheme.
  3. Ok, is there any circumstance where a TileEntity would need to send packets to the server?
  4. Hi, I'm dAkshEN3. Some of you might recognise me from the BC forums. I created Advanced Power Systems and am currently in the process of updating it for the new MC and Forge. This also means I need to add multiplayer, which is where my problem arises: I have no idea how the packets and such work to make GUIs and TileEntities and things work in multiplayer. I'm not really looking for a tutorial or an example, I can handle the coding myself, I just need help understanding the theory and the process as I've never ventured into multiplayer game programming before.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.