notes about new build scripts
parent
20fb9e93c0
commit
a83565c78d
|
@ -13,7 +13,7 @@ Install [LÖVE](https://love2d.org).
|
||||||
Make sure you can run it from the terminal by running:
|
Make sure you can run it from the terminal by running:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
> love
|
love
|
||||||
```
|
```
|
||||||
|
|
||||||
You should see the LÖVE window pop up with the NO GAME screen. If you don't see this, check your terminal environment. On Windows you probably need to manually add the path where you installed LÖVE to your Path Environment Variable and then restart the machine. Thanks Windows!
|
You should see the LÖVE window pop up with the NO GAME screen. If you don't see this, check your terminal environment. On Windows you probably need to manually add the path where you installed LÖVE to your Path Environment Variable and then restart the machine. Thanks Windows!
|
||||||
|
@ -24,7 +24,7 @@ Install Node, which automatically installs npm.
|
||||||
Make sure it is properly installed by running:
|
Make sure it is properly installed by running:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
> npm
|
npm
|
||||||
```
|
```
|
||||||
|
|
||||||
You should see npm print out a bunch of help information. Now we're almost ready to begin.
|
You should see npm print out a bunch of help information. Now we're almost ready to begin.
|
||||||
|
@ -34,31 +34,53 @@ Download the [Encompass/LÖVE starter project](https://github.com/encompass-ecs/
|
||||||
Now we are ready. Enter the project folder in your terminal and do:
|
Now we are ready. Enter the project folder in your terminal and do:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
> npm install
|
npm install
|
||||||
```
|
```
|
||||||
|
|
||||||
This will install everything you need to compile your project to Lua.
|
This will install everything you need to compile your project to Lua.
|
||||||
|
|
||||||
The starter project contains some scripts to automate the build process.
|
The starter project contains some scripts to automate the build process.
|
||||||
|
|
||||||
|
To create a clean build from scratch, do:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
To incrementally build your game as you make changes, do:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run watch
|
||||||
|
```
|
||||||
|
|
||||||
|
This will run continuously and build only files that change. It will reduce your build times significantly, so I recommend using it!
|
||||||
|
|
||||||
|
To copy your assets into the game build, do:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run copyassets
|
||||||
|
```
|
||||||
|
|
||||||
|
Make sure to do this if you are in incremental mode and make changes to assets.
|
||||||
|
|
||||||
To run your game, do:
|
To run your game, do:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
> npm run love
|
npm run love
|
||||||
```
|
```
|
||||||
|
|
||||||
Or, on Windows:
|
Or, on Windows:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
> npm run lovec
|
npm run lovec
|
||||||
```
|
```
|
||||||
|
|
||||||
so that you get proper debug console output.
|
so that you get proper debug console output.
|
||||||
|
|
||||||
If you just want to build the game without running it, do:
|
If you want to completely clean your build folder without making a new build, do:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
> npm run build
|
npm run clean
|
||||||
```
|
```
|
||||||
|
|
||||||
That's everything you need to start making a game with Encompass and LÖVE!
|
That's everything you need to start making a game with Encompass and LÖVE!
|
||||||
|
|
Loading…
Reference in New Issue