Competitive Action Multiplayer Template now released! [Netcode for Entities]

Are you saying that we may see NetcodeForEntity support for browsers in the foreseeable future?

2 Likes

A GitHub Repo would be preferred. Kind of a pain creating an entire project when all I need are code snippets to merge with my existing project.

Hello, is there a particular reason for using UNITY_PHYSICS_CUSTOM in the template ?

Can we remove it and reinstall physics package ( Im asking as Unity.Physics.Authoring is missing in the Assemblies and I need it for another package)

Also I was wondering, if we want to have a seperate build for the client and the server, if you could give some guidance for what should be tagged as #UNITY_CLIENT and UNITY_SERVER. Its obvious for the systems in specifics world but Im not sure for others.

Thanks a bunch

Hi, when selecting the DGS-Linux-Build, we get an infinite loop on the asset import. This is with 6000.0.32f1. Had to delete the profile asset to get back into the project.

There is jitter when coming to a stop. I’m guessing this is because of client prediction reconcilliation doing it’s thing.

I noticed that no smoothing actions are being registered in this project (via GhostPredictionSmoothing.RegisterSmoothingAction(…))

I made a post where it looks like theres a bug with prediction smoothing: Netcode for Entities Prediction Smoothing Bugged? - #4 by robert_val1

Or maybe i don’t understand how it is meant to work.

Hi @Atilli,
Could you please report a bug for this using the “Help” > “Report a Bug…” option in the toolbar menu? Having the logs would be helpful in determining what’s happening here.
Thanks for flagging!

It leads to architectural simplicity, but we agree with your points that it adds its own costs. We are considering a ‘Single Host World’ option in Netcode for Entities to do exactly this as part of the unification efforts.

Re Q2, I’ve poked the relevant folk - they’ll have better answers :grin:

Disclaimer: Opinions my own - I love this topic.
Firstly, I’d distinguish here between ‘Relay’ as a network architecture, versus ‘Join Codes’ (and ‘Lobby Browsers’) as ‘Player Matchmaking’ solutions.

From the P2P tech stack perspective
I agree that there are valid anti-cheat, gameplay quality, and hardware feasibility concerns with Relay. That said, I think;

(1) You may be undercounting the number of games - across all genres - which do support relay hosted P2P, simply because many (arguably most?) competitive games already support casual game modes within them, separated from any SBMM and/or party matchmaker (and often without providing any meta-game progression). Rocket League (and older Call of Duty games) are shining examples here.

(2) The disruption caused by not having host migration is often very difficult to actually quantify. I.e. While match disruption is a loud & common cause of frustration from players, ultimately having matches interrupted is something we know players are willing to stomach up to a given frequency (particularly as internet service reliability is arguably in their domain of control/responsibility - via ISP & home ownership choices). FWIW; I’ve personally never seen concrete data-driven analysis re the impact of (loss of host) match disruption on KPIs like long-term player retention, nor have I seen data on how the introduction of host migration impacted KPIs. My gut says other things (e.g. lack of content, griefing, long matchmaking times, high-frequency game-breaking bugs etc) are substantially bigger drivers of player churn.

TL:DR - I view host migration the same way I view server authoritative anti-cheat; if you truly need to implement either of them, you’ve already ‘made it’. I.e. It’s a very nice problem to have! :face_with_tongue:

From the Player Matchmaking Perspective
Relay solutions (inc. Lobby Browsers) solve a set of player retention problems that a traditional matchmaker can’t, by virtue of two features:

1) Relay solutions enable ‘Community-Driven Player Matchmaking’
I.e. Players organizing matches outside of the in-game UI, via socials, word of mouth etc.

  • This enables player engagement during ‘off-peak’ (i.e. low CCU) hours, which are common even for mature/AAA games. E.g. Early access, relative popularity by region, during ‘long tail’ etc. Indies & AA’s often rely on organic (and/or viral) growth, thus the multiplayer content must be playable from as low as double digit CCU (see: Among Us, Starcraft 2 etc).

  • Relay is a good substitution for a Friends & Parties backend (arguably better, see below), and also often a substitution for a SBMM.

  • E.g. Most eSports had community tournaments long before they had official, in-game Tournament features.

2) Enabling Player Agency / ‘Finding the Fun’ via Gameplay Tuning
One often overlooked feature of Relays is that they (almost accidentally) lead to the development of feature-rich in-game “Create Private Match/Room” screens.

  • I.e. Developing these UI’s essentially demands that match customization gets built in, which has an enormous benefit of giving players the agency to fine-tune their own experience, over; preferred map rotations & game modes, friends & opponents (and team distributions & handicaps etc), additional content (like now-removed playlists in games like Halo), mod support etc (see; Baldur’s Gate, Factorio). This feature fundamentally makes your game better. It can be done via DGS, of course, but it’s substantially harder.

  • Also: Your communities private-match shenanigans often inform your “official” matchmaking playlists, which is gold dust for many studios.

  • A game supporting Relay can therefore get very close to the 'best possible multiplayer experience a.k.a. a LAN setup. I.e. Not only having friends to party up with, but choosing friends to play against is easily the best time you can have in a competitive game. While a well-tuned SBMM can typically give fairer matches (and rapport between opponents for the top echelon of your ranked players, as they’ll encounter each other more reliably), I think many people would prefer to play unfairer, jankier games with the people they know, if it were possible. The explosion of co-op & MilSim shooters is evidence of that IMHO.

4 Likes

Hi @ankofl_dev,

As far as I can tell, NetcodeForEntities have some sort of support for WebGL in the code, but I couldn’t spend enough time on it to make something usable.
However, it is important to note that a lot of the Unity dots packages are not working on WebGL (com.unity.entities.graphics for example…), so it would be fair to say that if you’re working on a project that should target WebGL in the near future, it would be better to not use NetcodeForEntities but NetcodeForGameObject instead.

1 Like

Thank you for your questions!

  1. On the use of UNITY_PHYSICS_CUSTOM:
    You can remove it, as it’s not actively used. It will be removed in future releases to prevent confusion. Thanks for pointing that out!

  2. On separating the build for client and server:
    You can safely tag systems related to the UI and connection flow as #UNITY_CLIENT (except for the creation of the server world, which should be stripped out). For other systems, as you mentioned, it’s usually clear by checking the WorldSystemFilterFlags, but feel free to reach out if you’re uncertain about specific systems.

Be cautious with asset baking though—ensure that the client and server share the exact same code and references for entities that need synchronisation and are required to be in both builds. Any discrepancies will prevent the server from spawning ghost instances.

Hope that helps! Let me know if you need further clarification.

I cant find it :C

Are you referring to the template? To access it, you’ll need to install Unity 6. Afterward, when creating a new project, you can download the “Competitive Action Multiplayer” template by either scrolling down or using the search bar in the template section, then proceed to create your project with that template. I hope this helps!

1 Like

Thank yooooouuuuu

1 Like

We are pleased to announce a new release of the Competitive Action Multiplayer template! (Version 1.1.0 for Unity 6.1 and Version 1.0.5 for the latest Unity 6.0 version)

Utilizing the Netcode for Entities package and Unity Gaming Services (Matchmaking, Multiplay game server hosting, Relay), this template allows you to quickstart your development. It includes a Bootstrapper, in-Editor tutorials, and a basic shooter gameplay flow. If you’re looking for a starting point to build competitive action games (I.E: Battle Royale, Competitive shooter) that needs client-side prediction and to handle a lot of entities in real-time, you’ve come to the right place.

Version 1.0.5

Documentation: Competitive Action Multiplayer template | Competitive Action Multiplayer | 1.0.5
Compatibility: This template supports the most recent version of the Unity editor 6.0.
Changed:

  • Updated packages to their latest version
  • Removed UNITY_PHYSICS_CUSTOM from the Scripting Define Symbols (Project Settings > Player > Other Settings) across all platforms

Version 1.1.0

Documentation: Competitive Action Multiplayer template | Competitive Action Multiplayer | 1.1.0
Compatibility: This template supports the most recent version of the Unity editor 6.1.
Changed:

  • Template upgraded to Unity 6.1
  • Updated packages to their latest version
5 Likes

Hello @everyone!

We’re excited to announce Version 1.2.0 of the Competitive Action Multiplayer Template, now compatible with Unity 6.2!

Built with the Netcode for Entities package and using Unity Gaming Services (Matchmaking, Multiplay hosting, Relay), this template helps you jumpstart development for competitive action games. It includes a Bootstrapper, in-Editor tutorials, and a basic shooter gameplay loop.

If you’re looking to build games like Battle Royale or competitive shooters—with support for client-side prediction and the ability to handle a large number of entities in real-time—this is for you.

:package: Version 1.2.0 Highlights

:page_facing_up: Docs:
Competitive Action Multiplayer template | Competitive Action Multiplayer | 1.2.1
:white_check_mark: Unity 6.2 Supported

:wrench: Changes

  • Upgraded to Unity 6.2
  • Updated packages
  • Removed unused TextMeshPro from the project
  • Updated name tag prefab to use new World Space UI pivot options
  • Set default fleet min/max to 0 in DedicatedGameServer.gsh to prevent unintended service usage
  • Renamed IsPauseMenuOpen and TogglePauseMenu to OpenPauseMenu

:rocket: Improvements

  • Fixed pow(f,e) shader warning
  • Added NetcodeConfig with Max Simulation Step Batch Size = 1
  • Removed EventSystem (using UIToolkit.Focus() instead)
  • Added recommended UI bindings
  • Added gameplay bindings for Look, Aim, and Shoot
1 Like

:tada: Competitive Action Multiplayer template version 1.3.0 is now available for Unity 6.3!

:page_facing_up: Docs:

:package: Changes

  • Editor and packages update
  • Warnings fixes:
    • Removed obsolete GetRefRWOption usage
    • Ignored the ‘IAspect’ is obsolete warning until an Aspect-less version of the character controller is available

:rocket: Competitive Action Multiplayer template 1.0.6 and 1.1.1 versions are also now available for Unity 6.0 and Unity 6.1!

:package: Changes

  • Editor and packages updated
  • Backported warnings fixes from 1.3.0

Need help? Reach out in Templates or Multiplayer Discussions.

1 Like

I ran into something similar while syncing state between clients, and switching to a more distributed approach helped. Using nextcloud hosting for sharing test builds and logs with team members also saved us time since everyone could check updates or errors right away. Having that shared space made debugging tricky desyncs a lot smoother without relying on bulky email threads or separate tools.