speaker
Announcement: coherence 1.1 is now released! See what's new with 1.1

Introducing: the Campfire Advanced Tutorial

You might have already taken your first steps in coherence with our - ehm - First Steps tutorial. So what’s next?

Today we’re happy to share with you our latest Unity sample: Campfire.

Campfire_001.jpg

An Advanced Tutorial

Once you have the basics of networking locked in, Campfire is the natural next stop. In this project, several gameplay mechanics come together to bring life to an interactive, cozy campsite where players can hang out, stir up a fire, sit down, and have a chat.

Even if no-one is connected, the campsite Robot, running on the server (aka the Simulator) will tidy things up; all of this while the fire keeps burning - eventually dying out. So don’t worry if you come online and it’s off… just chop some wood and throw it on the fire to rekindle it!

Robot.jpg

What’s in the project?

The Campfire project explores these topics:

  • Object pooling
  • Interacting with remote objects
  • Creating a unique object
  • Syncing complex states
  • Custom instantiation and destruction
  • Server-side NPCs (Simulators)
  • Playing audio and particles over the network
  • Creating a simple chat feature

Documentation

Having many features interacting with each other, exploring Campfire can feel a bit daunting if you are still new to networking. But worry not: the project comes with a lot of documentation, covering all of the above topics. While we always recommend downloading the project and toying with it directly in Unity, you can also just read the docs on their own.

You’ll learn a lot in no time, and then you will be able to apply the learnings to your own project!

Download the project or try the build

Campfire_002.jpg

The whole project is available to download from its Github repository.

You can also quickly try it out directly in the browser as a WebGL build, share the link with a friend, and play it together.

(Note: we recommend Chrome, other browsers can have problems with Unity’s WebGL)

What's to come & feedback

As we are publishing this project, we’re already at work on additional content to cover more cases. Next on our roadmap is to create more videos (which you will find on our YouTube channel), and then cover more the use case of authoritative server behavior, using Simulators.

In the meantime, we hope you enjoy hanging around the Campfire. If you have comments on this tutorial, we would love to hear them. Please drop them in the feedback thread in our community forums or, for a quick chat, come hang out in our Discord server.

Written By

Ciro Continisio

Published in: Tech Demo
August 15, 2023