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.

24 评论

订阅评论

留下评论

您可以使用这些HTML标签和属性: <a href=""> <b> <code> <pre>

  1. Does I’m allowed to copy the assets (not the character and the weapons)?

  2. 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.

    1. Thomas Krogh-Jacobsen

      十月 30, 2018 11:50 上午 回复

      Thanks for your feedback. Please join us in our dedicated forum where you can find more info and help on how to get started with the project. If you post the specific error message you are getting in the forum someone might be able to help you get it up and running: https://forum.unity.com/forums/fps-sample-game.184/

  3. 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?

    1. Might have to clone again

    2. Clone again but make absolutely sure you have https://git-lfs.github.com/ installed.

      1. Thanks that helped me

  4. 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

    1. LWRP and HDRP will never be 100% compatible.

  5. Will you have a sample project for the lightweight render pipeline??

  6. Very Cool, I’ll test it out.

  7. There’s a rogue linkedin link on the above blog.

  8. Hey, is it using some unity networking service or is self hosted?

  9. 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).

    1. I am getting this as well!

    2. Thomas Krogh-Jacobsen

      十月 30, 2018 11:48 上午 回复

      Thanks for your input. From the error message, it sounds like you may not have completed the actual build process? Please join us in our dedicated forum where you can find more info and help on how to get started with the project.
      https://forum.unity.com/forums/fps-sample-game.184/

  10. 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.

  11. 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.
    Cheers.

  12. 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.

  13. Awesome.

    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.

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

  14. 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.

  15. 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!