Getting Started Guide - NULL-HDU/Barrage_Frontend GitHub Wiki
Contents
- Part 1 - Introduction
- Part 2 - Installation
- Part 3 - Choose an Editor
- Part 4 - Architecture Design
- Part 5 - API Documentation
- Part 6 - Contributors Guide
Part 1 - Introduction
By Arthury on 30th December 2016 @NULL TEAM
In this tutorial we're going to cover setting-up a development environment with which you can build Barrage game. This will include running a local web server, picking an IDE, getting the latest version of Barrage and checking it all works together.
If you trust us that you do need a local web server for development, then you can skip the explanation below and head directly to part 2.
If you'd like to know the reasoning why, please read on ...
Part 2 - Installation
Frontend
Move to Building-by-Webpack-tutorial
Backend Deploy
git clone https://github.com/NULL-HDU/barrage-server.git
cd barrage-server/docker
docker build -t goself .
cd ..
docker-comopse up -d
if you want to change the port of barrage-server, you should modify barrage-server/docker-compose.yml.(for more details, see docker-compose)
Part 3 - Choose an Editor
You're going to need an editor in which to prepare your JavaScript code. There are many available, each with their own strengths and weaknesses. If you're an experienced developer you will probably already have your own preferred editor, in which case carry on to Part 5 of this guide. Otherwise here are some options for you:
Sublime Text
This is the editor the Phaser team use for building the framework and all projects. It's even the editor this guide is being written in. Sublime should be considered as an extremely powerful text editor rather than an IDE.
Features such as the ability to "Goto" anything, Split Editing, Multiple cursors, Distraction Free mode and loads of powerful Plugins make this the fastest and most versatile editor we've ever used in literally decades of development.
Using its comprehensive Package system you can enhance it in multiple ways. Here is an excellent guide to features and packages for Sublime.
The full version costs $70 but is worth every penny and is available for Windows, OS X and Linux.
Visit the Sublime Text web site.
WebStorm
JetBrains WebStorm is an extremely advanced full development environment. It goes well beyond simple code editing and offers all of the high-level features you'd expect from a proper IDE. Including code insight, npm built-in, code style and syntax reports, source control and a wealth of other features. Lots of the features are designed for web developers rather than game developers, but are still handy to have around.
It's based on IntelliJ IDEA, a heavily Java based editor, which is both a good and bad thing. For a start the actual code editing experience is nothing like as smooth and freeform as with Sublime, and the non-standard OS integration is weak. But the power features can often make up for that. Having errors with your code spotted for you, before you've even tested your game can be really useful. And code-completion is great too, although obviously somewhat limited by the myriad ways JavaScript can be written.
The full version starts from $49 and is available for Windows and OS X. There are often deals to be found on the JetBrains site too.
Visit the JetBrains WebStorm web site.
Brackets
Although primarily developed for building web site code, Brackets has really come into its own lately. It's a free open-source code editor and runs across Windows, OS X and Linux. It's actually written in JavaScript and is incredibly hackable, with new versions and extensions released every couple of weeks. It has a modern and dark UI, probably familiar to anyone who uses Adobe Creative Suite. Well worth considering, especially if you're after a free editor.
Visit the Brackets web site.