Search Unity

At Unite LA yesterday, we announced the first release of the FPS Sample project,  a multiplayer First-Person Shooter game. You can now download the full project including both source code and assets.

The project is for you to use as a source of inspiration. You can also use it to learn from how we applied some of the latest features in Unity. It demonstrates one of the many approaches to using Unity to develop shooter-based game mechanics.

Yours to use as you please

The project includes everything from source code and artwork assets to sounds effects. However, none of these are Asset Store packages. This enables you to extract, pick apart and use the specific parts you need.

You are, of course, also welcome to use the full project as a framework or starting point for your own game and, as all the assets are available under the Unity Companion License, you can even use it for Unity-based commercial projects as well. We hope the game becomes a platform that can help you bootstrap your project.

This first release is available for PC, and the plan is to expand the support for Mac and both PS4 and Xbox One later.

Vanilla Unity

The project runs on the latest beta version of Unity (at the time of writing 2018.3b6). It’s been a core principle for the team to run on what is often referred to as vanilla Unity, in other words, it doesn’t require custom builds. Similarly, the project requires no Asset Store packages.

A unique position to improve Unity as a whole

The plan is to continuously update the project to the most recent versions and to adopt the latest features. However, we are also taking advantage of the fact that the very nature of the project puts us in a good position to gather feedback. First, we are an internal team sitting in the heart of the R&D department and using the latest bleeding-edge features. Next, we are simulating your real working conditions by building a full working project.  

The big picture

These favorable conditions will help us improve both the new features and Unity as a whole. While we look at and review every single bug report we receive, working on a pre-release release version also offers an opportunity to improve Unity from a more holistic perspective. As projects get larger and more complex, maintaining scalability is key to maintaining an efficient workflow. In order to address this issue, supporting the team’s productivity is another focus area.

The project is designed by a team of just 6 experienced game developers in our demo team based in Copenhagen.

Details and efficiency

The result is that we’re solving a lot of pain points related to working with content. We have optimized performance and refined technical solutions in order to achieve the desired game mechanics. One of our other goals has been to help bring new features — such as the HDRP, which is in preview until sometime in 2019 — to a production-ready state faster. But our focus is also on the small things and helping to keep our R&D teams well-informed regarding future development.

Inherent benefits to quality

Having a simulated real-world production makes the sample team act as a kind of extension of QA, driving quality and stability. There are already numerous examples of how features have been optimized and improved due to sample-team involvement.

The project contains a fully populated level and two fully rigged character classes.

Creating highly stylized graphics using HDRP

The new HDRP is a modern, physically-based rendering pipeline, which has already contributed to amazing demos like Adam and Book of the Dead. But a physically-based renderer can also be used to create a stylized look. In the FPS Sample, we show how that can be done.

For example, you will be able to explore how subsurface scattering has been implemented in the project. In the plants in the main level, you can see how we have simulated how light penetrates a translucent surface like a leaf.

In the FPS Sample we are using a highly stylized style using the HDRP.

Other examples include decals and some of the new lighting features of HDRP, including the rectangular lights that allow you to define rectilinear geometry, which emits light. Other examples include the new line light feature, which allows emission from a line shape.

The lightmapping in FPS Sample is achieved through Unity’s Progressive Lightmapper, our fast path-tracing-based light mapper system that provides baked Lightmaps and Light Probes with progressive updates in the Unity Editor.

Building performant netcode for multiplayer shooters

Creating performant netcode for smooth and fair shooter gameplay that feels just right can be daunting. For example, it can be challenging to properly manage the world-state, or in other words, the positions each character populates in the game world. The solution is — rather than using the actual positions you get from the server —  to interpolate between them. Similarly, the problem of sluggish movement is addressed by a technique called client-prediction, which allows the player/character to move without approval from the server.

You also want to have a solution for lag-compensation and authorization, while at the same time hosting the game with effective compression and servers with a small memory footprint in terms of being cost-efficient.

In the FPS Sample, you can find inspiration for solving problems by looking at how we approached the issues above. The netcode in FPS Sample offers a good starting point for tackling these problems. The netcode is using Unity’s new transport layer, which was just released in preview.

What to expect in 2019

We will continue to maintain and further develop the FPS Sample in the upcoming Unity versions.

That also means that you can expect the project to adopt new features, such as the VFX Graph, in future updates. You can also look forward to a tutorial and a making-of blog series in 2019.

How do I get started?

To get the project, make sure you are running the latest beta version of Unity. You can also download it from the Unity Hub. Next download the project from our Github repository. Find instructions on how to get started in our forum and in the readme file in the project. We would also love to hear from you in our forum if you have suggestions on how to improve the project in general, or if you are experiencing problems.

27 replies on “Introducing the FPS Sample”

I looked at the Networking scripts in the sample FPS project and there are hundreds of them. I thought the whole point was to simplify networking, it looks like it blew up in your face. Is there any readme file that explains what each networking script is doing? Without an explanation/tutorial, this is rather useless. I’m not trying to be rude, but I am new to multiplayer games, and this is not going to go over very well with new developers. I imagine you would like to attract new developers to your platform, I’m not sure this is the right way to do it. But what the hell do I know…Look, I’m just making an online racing game, so all I need is real-time position and rotation of each player. Is there a tutorial somewhere where I can get this information? Preferably, one that doesn’t have hundreds of networking scripts.

A lot more details about the netcode can be found in this talk. … Or perhaps rather details about the particular network architecture used by the FPS Sample. The purpose of the sample is to show how to implement that type of networking. This is what most multiplayer shooters end up doing, but you are right it is not a simple solution. It has client side prediction, lag compensation and so on. If you just want to test something small or do a game of a different nature, you may be better served rolling your own netcode on top of the transport layer.

hello instructor. Can you help me ?. I download full source code and asset into my computer, I use git bash to clone it. Then I run unity and open this project. But this project doesn’t run and it report fix error. You can help me. Thank you very much. I like this game, but I download it that don’t run.

I got an error on git while cloning, is there a way to force a sync with my local files or I’ll need to start the download from the beginning again?

I hope that soon LWRP and HDRP will be 100% compatible (shaders etc.) because if you have a HDRP project for desktop and try build a movil version simply this doesnt work. The best way is that you cant change RP in any moment like change from Forward Rendering to Deferred

I get en error
Win32Exception: ApplicationName=’C:/Users/MichalLeszczynski/Downloads/FPSSample-master/Assets/../AutoBuild/AutoBuild.exe’, CommandLine=”, CurrentDirectory=’AutoBuild’, Native error= Nie można odnaleźć określonego pliku (file not found).

Does the new transport layer support WebGL websockets and/or WebRTC? Would like to consider replacing unet with this on our web game if even possible.

Installing on my PC. But really interested in seeing this running on Mac and how it performs under Metal. ETA on Mac version? Great work.

I checked it out. The incredible design and extremely useful. Was taken seriously all that most multiplayer games need. The company made a huge leap. Thanks for all that.


For source control, is the internal team using Collaborate. I think it’d be great to have internal experience working with large projects day-to-day — which can be sluggish. So maybe that’d fuel improvements there too.

Yes, they said they rework the collab system for large projects in 2019.1…
no more “Checking for updates” for hours.

Love every single thing. I hope people don’t asset flip too hard, and keep up the good work. I am proud to delete spam for you guys.

I used to moan excessively about the teams use of special builds for demos, so I am VERY happy to see you have used vanilla unity for this!

Also, please thank the team involved for what is probably the most useful release I have ever seen!

Comments are closed.