diff --git a/README.md b/README.md index eaa55b0c..6d0a9712 100644 --- a/README.md +++ b/README.md @@ -1 +1,47 @@ # Engine + +This repository contains the full engine for NanoForge. +It can be used by itself. + +The engine is made of multiple components: + +- [ecs](packages/ecs) +- [input](packages/input) +- [core](packages/core) +- [common](packages/common) +- [graphics-2d](packages/graphics-2d) +- [asset-manager](packages/asset-manager) +- [sound](packages/sound) +- [music](packages/music) + +This is the full nanoforge engine including all the default libraries. + +In order to manage this project we use (pnpm)[https://pnpm.io/] + +## Installing dependencies + +To install dependencies run: + +```sh +pnpm i +``` + +## Building + +To build the project run: + +```sh +pnpm build +``` + +## Tests + +To run tests use: + +```sh +pnpm test +``` + +## Setting up a test project + +In order to setup a test project see (this)[https://github.com/NanoForge-dev/Engine/docs/Introduction.md] diff --git a/docs/Introduction.md b/docs/Introduction.md new file mode 100644 index 00000000..aa34ac77 --- /dev/null +++ b/docs/Introduction.md @@ -0,0 +1,14 @@ +# Introduction to using the Engine + +Whether you work on this engine as a devlopper or you wanna use this engine you gonna want to have a test project. +This is a walkthrough on how to setup a basic project + +## As a devlopper on the engine + +As a devlopper you want to be able to use your changes in your project. +Therefore it is recommended to use the provided template in the [example](https://github.com/NanoForge-dev/Engine/tree/main/example/template) + +## As a user + +As a user you can either use the template and change the dependencies location. +Or you can create a project and add the nanoforge dependencies. Note that it is recommended to use bun as a package manager. diff --git a/packages/asset-manager/README.md b/packages/asset-manager/README.md index 82cb3ecf..48c39b4e 100644 --- a/packages/asset-manager/README.md +++ b/packages/asset-manager/README.md @@ -1 +1,25 @@ # Engine Asset Manager + +## Installing dependencies + +To install dependencies run: + +```sh +pnpm i +``` + +## Building + +To build the project run: + +```sh +pnpm build +``` + +## Tests + +To run tests use: + +```sh +pnpm test +``` diff --git a/packages/common/README.md b/packages/common/README.md index fa598370..7fe8c72d 100644 --- a/packages/common/README.md +++ b/packages/common/README.md @@ -1 +1,25 @@ # Engine Common + +## Installing dependencies + +To install dependencies run: + +```sh +pnpm i +``` + +## Building + +To build the project run: + +```sh +pnpm build +``` + +## Tests + +To run tests use: + +```sh +pnpm test +``` diff --git a/packages/config/README.md b/packages/config/README.md index cd5ac6e9..41aa4db6 100644 --- a/packages/config/README.md +++ b/packages/config/README.md @@ -1 +1,25 @@ # Engine Config + +## Installing dependencies + +To install dependencies run: + +```sh +pnpm i +``` + +## Building + +To build the project run: + +```sh +pnpm build +``` + +## Tests + +To run tests use: + +```sh +pnpm test +``` diff --git a/packages/core/README.md b/packages/core/README.md index 8680ad6a..bbb92155 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -1 +1,25 @@ # Engine Core + +## Installing dependencies + +To install dependencies run: + +```sh +pnpm i +``` + +## Building + +To build the project run: + +```sh +pnpm build +``` + +## Tests + +To run tests use: + +```sh +pnpm test +``` diff --git a/packages/ecs/README.md b/packages/ecs/README.md index 8b72baf8..e1d7175b 100644 --- a/packages/ecs/README.md +++ b/packages/ecs/README.md @@ -1,4 +1,24 @@ -# Engine Core +# ECS + +## What is an ECS + +"Entity–component–system (ECS) is a software architectural pattern mostly used in video game development for the representation of game world objects. An ECS comprises entities composed from components of data, with systems which operate on the components." +[Wikipedia](https://en.wikipedia.org/wiki/Entity_component_system) + +## How to build + +In order to build this ECS we need to first install a wasm compiler. For this project we gonna use `emsdk`. +You will also need `make` and `pnpm` + +### Installing dependencies + +To install dependencies run: + +```sh +pnpm i +``` + +#### How to install the emsdk compiler: To install emsdk the WASM compiler we are using run : @@ -11,3 +31,30 @@ source "$PWD/emsdk_env.sh" echo -ne "export EMSDK_QUIET=1\nsource \"$PWD/emsdk_env.sh\"\n" >> ~/.bashrc cd .. ``` + +### Building + +Now that you have the dependencies you can build by running: + +```sh +pnpm build +``` + +This will produce 2 files in the `lib/` directory. + +- `libecs.js`, which is the file containg the javascript binding permitting the javascript to interract with the wasm. +- `libecs.wasm`, the compile code library + +If you only wanna build the c++ part just use: + +```sh +make +``` + +## Tests + +To run tests use: + +```sh +pnpm test +``` diff --git a/packages/graphics-2d/README.md b/packages/graphics-2d/README.md index 5d16e806..63af5c08 100644 --- a/packages/graphics-2d/README.md +++ b/packages/graphics-2d/README.md @@ -1 +1,25 @@ # Engine Graphics 2D + +## Installing dependencies + +To install dependencies run: + +```sh +pnpm i +``` + +## Building + +To build the project run: + +```sh +pnpm build +``` + +## Tests + +To run tests use: + +```sh +pnpm test +``` diff --git a/packages/input/README.md b/packages/input/README.md index 33e4d472..978bd3e8 100644 --- a/packages/input/README.md +++ b/packages/input/README.md @@ -1 +1,25 @@ # Engine Input + +## Installing dependencies + +To install dependencies run: + +```sh +pnpm i +``` + +## Building + +To build the project run: + +```sh +pnpm build +``` + +## Tests + +To run tests use: + +```sh +pnpm test +``` diff --git a/packages/music/README.md b/packages/music/README.md index ed41a35b..85a8e5bb 100644 --- a/packages/music/README.md +++ b/packages/music/README.md @@ -1 +1,27 @@ # Music + +This is a basic music management library provided with nanoforge. + +## Installing dependencies + +To install dependencies run: + +```sh +pnpm i +``` + +## Building + +To build the project run: + +```sh +pnpm build +``` + +## Tests + +To run tests use: + +```sh +pnpm test +``` diff --git a/packages/sound/README.md b/packages/sound/README.md index 33e4d472..62a97dbe 100644 --- a/packages/sound/README.md +++ b/packages/sound/README.md @@ -1 +1,25 @@ -# Engine Input +# Sound + +## Installing dependencies + +To install dependencies run: + +```sh +pnpm i +``` + +## Building + +To build the project run: + +```sh +pnpm build +``` + +## Tests + +To run tests use: + +```sh +pnpm test +```