GithubHelp home page GithubHelp logo

hathora / unity-ngo-2d-space-shooter Goto Github PK

View Code? Open in Web Editor NEW
0.0 5.0 0.0 10.28 MB

2D Space Shooter sample Unity NGO deployed on Hathora Cloud

Home Page: https://hathora.dev/docs

HTML 0.08% C# 99.92%
game-server-hosting hathora multiplayer-game-server unity unity-ngo

unity-ngo-2d-space-shooter's Introduction

2D Space Shooter sample game (Unity NGO + Hathora Cloud)

UnityVersion NetcodeVersion

This sample game was started from Unity's Netcode for GameObjects Bitesize Samples

Overview

The original 2D Space Shooter Sample was a UNet sample that has been converted over to NGO. Check it out to learn more about physics movement and status effects using Netcode NetworkVariables and ObjectPooling. We have made a few modifications to make this game easily deployable with a dedicated server on Hathora Cloud.


Readme Contents and Quick Links

Click to expand/collapse contents


Getting the project

Direct download

  • select Code and select the 'Download Zip' option. Please note that this will download the branch you're currently viewing on Github

Requirements

This sample game is compatible with the latest Unity Long Term Support (LTS) editor version, currently 2021 LTS. Please include Linux Dedicated Server Build Support in your installation, as well as Linux Build Support (Mono).

PLEASE NOTE: You will also need Netcode for Game Objects to use these samples. Complete the Hello World tutorial to prepare your environment.

You will also need to have an account created for Hathora Cloud (sign up at: https://console.hathora.dev)

Steps to deploy and integrate Unity NGO game with Hathora Cloud

Note: steps 1 - 3 have already been completed as part of this sample

  1. Add Hathora Cloud Unity Plugin to your project
  2. You must add a script to enable your dedicated server to automatically start in "Server" mode. See NetworkCommandLine.cs
  3. Then, attach the new script to the NetworkManager game object in the scene. This enable the script to listen for command line arguments configured (-mode server).
  4. Use the Hathora Unity plugin to configure, build, and deploy your server on Hathora Cloud (for more detailed steps, check out this guide).
  5. Once deployed, create a room in Hathora Cloud (via plugin or Hathora Console
  6. Run your game client and enter in the connection information shown (note: you will need to convert the hostname to an IP address (i.e. dig hnzpvf.edge.hathora.dev in your terminal)

Troubleshooting

Bugs

  • Report bugs in the sample game using Github issues

Documentation

For a deep dive into Hathora Cloud, visit our documentation site.

Community

For help, questions, advice, or discussions about Netcode for GameObjects and its samples, please join our Discord Community. We have a growing community of multiplayer developers and our team is very responsive.

Other samples

Photon Fusion BR on Hathora Cloud

Hathora Cloud + Photon Fusion Dedicated Server is a minimal example of getting a dedicated server working with Photon Fusion.

Hathora Unity Plugin

Hathora Unity Plugin (with FishNet and Mirror demos) is our Unity Plugin that comes with FishNet and Mirror networking demos. It allows you to deploy your game on Hathora Cloud directly from our editor plugin.

unity-ngo-2d-space-shooter's People

Contributors

jchu231 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.