Beginning COOP multiplayer project

Discuss coding questions, pull requests, and implementation details.
User avatar
papasmurf
Posts: 4
Joined: Wed Jan 20, 2021 5:33 pm

Beginning COOP multiplayer project

Post by papasmurf »

Hey guys,

My buddy and I are attempting to create a multiplayer coop mod for DF unity. So far we have followed quills Unity MP tutorial here: https://www.youtube.com/watch?v=afz2An4X0vw. We currently have the server being ran inside Daggerfall, and a client can connect to the server. We are currently stuck with getting two separate cameras operating simultaneously for each player, and re positioning the second player as he spawns under the ground (possibly where privateers hold would spawn him).

We are new to modding Unity and Daggerfall, but I have extensive experience programming in Java and several other languages which seems to translate well to C#. My friend has extensive experience in QuakeC and modding in general. Any input on how to accomplish this task is appreciated!

User avatar
Interkarma
Posts: 7234
Joined: Sun Mar 22, 2015 1:51 am

Re: Beginning COOP multiplayer project

Post by Interkarma »

Welcome to the forums! :)

I hope you're able to generate some interest and help on your coop fork. Good luck!

User avatar
papasmurf
Posts: 4
Joined: Wed Jan 20, 2021 5:33 pm

Re: Beginning COOP multiplayer project

Post by papasmurf »

Interkarma wrote: Wed Jan 20, 2021 11:41 pm Welcome to the forums! :)

I hope you're able to generate some interest and help on your coop fork. Good luck!
Thank you! As soon as notable progress is made I will be updating here. Hopefully once we get some steam behind us more people will take interest.

User avatar
InconsolableCellist
Posts: 100
Joined: Mon Mar 23, 2015 6:00 am

Re: Beginning COOP multiplayer project

Post by InconsolableCellist »

I'd love to see this!

FrancoStrider
Posts: 17
Joined: Thu Jan 14, 2021 7:33 pm

Re: Beginning COOP multiplayer project

Post by FrancoStrider »

Best of luck. I've been really wanting this.

Some logistics to keep in mind (you've probably thought of these, but just good to keep in mind):

Representing the character. Maybe just make it based off of the weapon and highest armor type they are wearing. You'll save yourself a lot spriting work that way. A lot of NPC enemy sprites should cover a lot of these. Also, the mount the player is riding on. Villager Immersion Overhaul mod actually has sets of wagon and horseback rider sprites you could probably take advantage of. Actually, that mod also covers every race, so it's a good one to look into in general.

What is the other player doing during a conversation?

Fast travel. You probably want just keep both players using it at the same time (due to, well, in game time).

Edit: Come to think of it, think of all the times you pause the game. Picking a spell, travel method (fast or mount), gear, etc.

User avatar
InconsolableCellist
Posts: 100
Joined: Mon Mar 23, 2015 6:00 am

Re: Beginning COOP multiplayer project

Post by InconsolableCellist »

Would one of the big hurdles be turning the game into a Server/Client architecture? AFAIK it's not running a local client that connects to a server already, so the entire architecture would need to be forked and maintained in parallel to the core game.

User avatar
Kamer
Posts: 583
Joined: Mon Mar 05, 2018 9:26 pm

Re: Beginning COOP multiplayer project

Post by Kamer »

FrancoStrider wrote: Fri Jan 22, 2021 1:43 pmVillager Immersion Overhaul mod actually has sets of wagon and horseback rider sprites you could probably take advantage of. Actually, that mod also covers every race, so it's a good one to look into in general.
If you want to use any of my work go ahead, I also have lots of unused sprites as well and would be willing to make new sprites as well for this.

Example of some unreleased work:
Show.png
Show.png (294.27 KiB) Viewed 12449 times

bloodshot
Posts: 4
Joined: Sat Jan 23, 2021 2:02 am

Re: Beginning COOP multiplayer project

Post by bloodshot »

Hey guys, i'm the other dev on the project

Some things to note about the scope of this project -

We are starting small, our immediate goal right now is to get player locations synced and to sync monsters so when one player kills a monster it dies for the other.

We are currently testing player sync

In the future we may look into syncing the more complex systems of daggerfall but for now we want to keep it small as to avoid feature creep and create something tangible

As for players, for testing purposes we will be using stock unity models but once we get to a phase focused on polishing we are considering using human sprites to represent different tiers of armor (barbarian sprites > naked player,. thief sprites > leather armor > etc.)

Thank you guys for your interest and offers, ever since we saw the old multiplayer mod it's been something we've wanted too

User avatar
papasmurf
Posts: 4
Joined: Wed Jan 20, 2021 5:33 pm

Re: Beginning COOP multiplayer project

Post by papasmurf »



As bloodshot described we have players syncing across server and clients. This works both locally (ParrelSync) and over Hamachi as in the video. We are achieving this by creating a capsule which has a NetworkIdentity and NetworkTransform. A script we created is attached to this gameobject and the object is moved to each clients respective PlayerAdvanced position on each frame. We used Mirror for the networking components.

We need to figure out how to sync the world between clients, or at least monsters that spawn in a given area. Each player is running their own Daggerfall client, so this may need to change.

Thank you for your support and interest thus far. You guys have much more experience working in DF Unity so any input is appreciated!

Features we are beginning working on now:
  • Syncing monsters across clients
  • Syncing doors in dungeons
  • Testing client syncing after fast traveling
  • NPC syncing

User avatar
King of Worms
Posts: 4747
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Beginning COOP multiplayer project

Post by King of Worms »

Good luck, this will be epic :ugeek:
Also, Ive already written at the utube vid but just to be sure:
If you wondering what DFU sprite set to use instead of that capsule, use:
490 for male
489 for female
These humanoids both have Casting, Archery and Sword attack animations

Post Reply