Unity project progressions: 50% completion towards first roadmap item!

You may recall (well, likely not) that the last time that I wrote in detail (February this year was not in detail) about my Unity project was here: https://confusedgremlin.wordpress.com/2016/11/19/further-thoughts-regarding-unity-project/ (wow, 2016! has it really been that long?) and further back I wrote about roadmap items here: https://confusedgremlin.wordpress.com/2015/02/28/dungeons-and-dragons-video-and-alpha-brainstorming/ (in the dark depths of 2015 …).

In the 2015 post I mentioned:

Hence, it now becomes possible to start working towards a first version of my dungeons and dragons dungeon master style multiplayer game.  In particular, I think there are a number of things that I’d now like to do:

  • Plumb in the multiplayer functionality from my previous project.
  • Introduce a simple and straightforward database model for players and dungeon masters.
  • Allow players to spawn in a world in an appropriate way (without falling forever).
  • Allow the dungeon master to move players around.
  • Allow the dungeon master to switch their camera to a creature under their control and move it around.

I realised pretty quickly that this was an ambitious task, and could take years to progress on.  Fortunately, due to the relatively recent acquisition of some code masterfully written by another developer, and due to the continued reworking of the Bolt multiplayer framework by Photon, I have finally made a small breakthrough.

You can see it in its full glory here:

Basically, I have succeeded in synchronising certain assets between different clients running an instance of a runtime level editor.  So pretty cool! (at least I think so).  Essentially very little done here on my behalf, merely mashing together two codebases (the bolt network library and some code I purchased from somewhere in the internet) until something fell into true.

I also found the BoltEngine cheatsheet extremely useful in this: https://docs.google.com/document/d/1CvN1E2GOvd_AHnkFOSMSJTR96EBGhPRDPgPMiOuJoSg/view#.

So in terms of the above objectives for the first milestone:

  • Plumb in the multiplayer functionality from my previous project.
  • Introduce a simple and straightforward database model for players and dungeon masters.
  • Allow players to spawn in a world in an appropriate way (without falling forever).
  • Allow the dungeon master to move players around.
  • Allow the dungeon master to switch their camera to a creature under their control and move it around.

I suppose I could say that I’ve mostly met the first and second of these.  There is a little bit more work to do in synchronising textures and working on the client UI, as well as determining how much control a client should have over editing, and whether the host/server should determine privileges, but that is well on its way now – I’d say at least 50%, and maybe 75% done.

Next steps would be to provide the ability for clients to drag and drop avatar tokens (first person controller prefabs), and then provide them the option to select one of their avatars and ‘avatar in’ to first person perspective, then allow them to ‘avatar out’.

After that, more segregation of privilege work, in terms of:

  • first figuring out how to allow client A to move certain entities around, which client B (which might be the same as A) has placed.
  • then figuring out how to isolate this power to a particular client (which would likely be the server) iff A is not equal to B

But as you can see, this work is finally on its way!  Very exciting!  It only took three years =P

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: