Starting Template
Learn more about using the StartingTemplate
Introduction
The starting template provide the easiest way to dive in the Atlas World. This template provide the ability for docker and vanilla. Choose what ever you want.
We don't teach you the installation about docker. Please read the Docker Docs specific for your environment.
Step 1
Install the template with degit. This tool helps you to clone the starter template
Step 2
Install the dependencies
Step 2.1
We love mysql <3, thats why our Docker Template shipped out with a mysql service. You can change this to what ever you want but for fast startup you can use as it is.
If you want using mysql please install the mysql dependency as well.
Step 3
Set up the required environment variables
Change retail/server.example.cfg folder to retail/server.cfg and .env.example to .env as well.
Step 4
Start the watcher or build and boot up docker. Keep in mind that your terminals need to point to the root directory.
Keep in mind retail folder is only copied at build command. You must be run this command initial.
For docker user
There is no need to stop the docker process everytime. You can stop the server inside the container and restart it at any time you make changes in your script.
Congratulation, you have successfully set up your environment. Now it's time to create your awesome gamemode.
Explain Folder Structure
To help you understand how the whole system works, we will explain the structure and configuration options here. The template contains a good starting point to teach yourself.
There are two folders for your gamemode creation.
Resources
This folder will be bundled by Rollup to ES6 on Server/Client side. Inside the directory you can create folders as many as you want. Your builded resources lives inside ATLAS_BUILD_OUTPUT.
package.json
You can create a package.json file inside your folder. This is only needed one time to tell rollup which folder is a resource and which not.
You're done! In most cases there is no need to create multiple gamemode resources. You can create multiple folders inside resources and use them as shared scripts. You can import the scripts at any place inside the resource folder.
Keep in mind, if you set up a package.json, you need the assets folder as well to set up the resource.cfg
Retail
This folder contains all your ready to use resources like maps, cars, weapons and so on. The build process will copy all this files inside your ATLAS_BUILD_OUTPUT and respects your created folder structure inside.
You can prevent some resources for copying by adding an underscore prefix.
Using Database
If you want to use the DatabaseService, keep in mind that we don't ship the needed driver. Only TypeORM is shipped. Please install your needed driver as self like mysql
.
You can read more about it on TypeORM Documentation inside the Installation section of his docs.
Last updated