Setting Up Our Development Environment

In this chapter we shall focus on getting set up and make sure we cover all that is needed for developing our game smoothly. The following are instructions to get you up and running with Node and Git.

  • PDF / 156,452 Bytes
  • 7 Pages / 439.37 x 666.142 pts Page_size
  • 6 Downloads / 217 Views

DOWNLOAD

REPORT


Setting Up Our Development Environment In this chapter we shall focus on getting set up and make sure we cover all that is needed for developing our game smoothly. The following are instructions to get you up and running with Node and Git.

Setting up Our Development Environment Even though the game seems very simple and easy to code, there are a lot of moving parts, and it’s good to digest them bit by bit instead of everything at once. Let’s start with the tail of the dragon, which is the project setup. If you already have node and git installed on your computer, skip the installing Node and Git section. Install a decent code editor that will assist you at developing your game along the way. I recommend anything from JetBrains or Visual Studio Code from Microsoft. The good part is that Visual Studio Code is completely free and works really well out of the box with the technologies we shall be wielding. Let’s dive into some explanation about Node.js and Git.

© Oscar Lodriguez 2019 O. Lodriguez, Let’s Build a Multiplayer Phaser Game, https://doi.org/10.1007/978-1-4842-4249-0_2

5

Chapter 2

Setting Up Our Development Environment

Node.js The authors describe Node as an asynchronous event-driven JavaScript runtime, perfect for network applications that need to scale.

Git The popularity of git has skyrocketed in the recent years as the de facto distributed version control system, focusing on speed, ease of use, and efficiency. Prerequisites for starting this book: •

Install Node.js and Git. •

Mac, Linux, or Windows users:



Install the latest for your system at https:// nodejs.org/en/download/. Or, if you are tech savvy, I suggest you download NVM, which is a Node version manager. This makes it easier for you to switch between Node versions if you have a different project that will not allow you to install another Node version on your system.



To browse on the online repo, you can use Git to manage your code versioning. This can be downloaded at Git’s official website (https://gitscm.com/downloads).

Note  If you are blocked on the where to start section, it means that you either need to upgrade your Node version or install Git. Installing Node and Git are some manual steps you will need to perform to get up and running with this project.

6

Chapter 2

Setting Up Our Development Environment

The Main Ingredient For ease, I have created a getting started folder branch that includes the much-needed package.json manifest with all of the dependencies inside. This also includes an index.html file. When served via our server, this will request the correct libraries and resources. You can access this branch if you have checked out the project on Github by running git checkout start in your terminal while in your project folder.

Editors Code editors are also software created by other developers that help developers to create software. You will need an editor to develop this game as it allows you to be more efficient at refactoring and getting type hints on your code. Ultimately, without going into too m