From a118b1415da0cf7de9f8517bd66fcd868dbd3323 Mon Sep 17 00:00:00 2001 From: MartinFillon Date: Tue, 2 Sep 2025 13:17:43 +0200 Subject: [PATCH 1/3] docs(ecs): add information on building the ecs --- README.md | 12 ++++++++++++ packages/ecs/README.md | 27 +++++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index eaa55b0c..8bcf73b2 100644 --- a/README.md +++ b/README.md @@ -1 +1,13 @@ # 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) + diff --git a/packages/ecs/README.md b/packages/ecs/README.md index 8b72baf8..4861a08f 100644 --- a/packages/ecs/README.md +++ b/packages/ecs/README.md @@ -1,6 +1,18 @@ -# Engine Core +# ECS -To install emsdk the WASM compiler we are using run : +## 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` + +### How to install the emsdk compiler: + +To install emsdk the WASM compiler we are using: ```sh git clone https://github.com/emscripten-core/emsdk.git @@ -11,3 +23,14 @@ 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 From 8dc6ea01d4c2174bdc7dd350d036d76c7a32a95c Mon Sep 17 00:00:00 2001 From: MartinFillon Date: Mon, 6 Oct 2025 21:19:51 +0200 Subject: [PATCH 2/3] docs: add building and dependency docs to every readme --- README.md | 42 +++++++++++++++++++++++++++----- packages/asset-manager/README.md | 24 ++++++++++++++++++ packages/common/README.md | 25 +++++++++++++++++++ packages/config/README.md | 25 +++++++++++++++++++ packages/core/README.md | 25 +++++++++++++++++++ packages/ecs/README.md | 28 +++++++++++++++++++-- packages/graphics-2d/README.md | 25 +++++++++++++++++++ packages/input/README.md | 25 +++++++++++++++++++ packages/music/README.md | 27 ++++++++++++++++++++ packages/sound/README.md | 27 +++++++++++++++++++- 10 files changed, 264 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 8bcf73b2..4ae1081b 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,40 @@ 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) +- [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 +``` 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..488df89f 100644 --- a/packages/common/README.md +++ b/packages/common/README.md @@ -1 +1,26 @@ # 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..103c03dc 100644 --- a/packages/config/README.md +++ b/packages/config/README.md @@ -1 +1,26 @@ # 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..728569f2 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -1 +1,26 @@ # 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 4861a08f..25a376df 100644 --- a/packages/ecs/README.md +++ b/packages/ecs/README.md @@ -10,9 +10,17 @@ 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` -### How to install the emsdk compiler: +### Installing dependencies -To install emsdk the WASM compiler we are using: +To install dependencies run: + +```sh +pnpm i +``` + +#### How to install the emsdk compiler: + +To install emsdk the WASM compiler we are using run : ```sh git clone https://github.com/emscripten-core/emsdk.git @@ -27,6 +35,7 @@ cd .. ### Building Now that you have the dependencies you can build by running: + ```sh pnpm build ``` @@ -34,3 +43,18 @@ 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..cfffca44 100644 --- a/packages/graphics-2d/README.md +++ b/packages/graphics-2d/README.md @@ -1 +1,26 @@ # 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..16b22ff2 100644 --- a/packages/input/README.md +++ b/packages/input/README.md @@ -1 +1,26 @@ # 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..9c998249 100644 --- a/packages/music/README.md +++ b/packages/music/README.md @@ -1 +1,28 @@ # 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..6406a429 100644 --- a/packages/sound/README.md +++ b/packages/sound/README.md @@ -1 +1,26 @@ -# 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 +``` + From 15c1d9c33ae9b941ee75de5baac564e7019dea27 Mon Sep 17 00:00:00 2001 From: MartinFillon Date: Thu, 9 Oct 2025 14:31:58 +0200 Subject: [PATCH 3/3] docs: add a basic introduction readme --- README.md | 4 ++++ docs/Introduction.md | 14 ++++++++++++++ packages/common/README.md | 1 - packages/config/README.md | 1 - packages/core/README.md | 1 - packages/ecs/README.md | 2 +- packages/graphics-2d/README.md | 1 - packages/input/README.md | 1 - packages/music/README.md | 1 - packages/sound/README.md | 1 - 10 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 docs/Introduction.md diff --git a/README.md b/README.md index 4ae1081b..6d0a9712 100644 --- a/README.md +++ b/README.md @@ -41,3 +41,7 @@ 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/common/README.md b/packages/common/README.md index 488df89f..7fe8c72d 100644 --- a/packages/common/README.md +++ b/packages/common/README.md @@ -23,4 +23,3 @@ To run tests use: ```sh pnpm test ``` - diff --git a/packages/config/README.md b/packages/config/README.md index 103c03dc..41aa4db6 100644 --- a/packages/config/README.md +++ b/packages/config/README.md @@ -23,4 +23,3 @@ To run tests use: ```sh pnpm test ``` - diff --git a/packages/core/README.md b/packages/core/README.md index 728569f2..bbb92155 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -23,4 +23,3 @@ To run tests use: ```sh pnpm test ``` - diff --git a/packages/ecs/README.md b/packages/ecs/README.md index 25a376df..e1d7175b 100644 --- a/packages/ecs/README.md +++ b/packages/ecs/README.md @@ -41,6 +41,7 @@ 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 @@ -57,4 +58,3 @@ To run tests use: ```sh pnpm test ``` - diff --git a/packages/graphics-2d/README.md b/packages/graphics-2d/README.md index cfffca44..63af5c08 100644 --- a/packages/graphics-2d/README.md +++ b/packages/graphics-2d/README.md @@ -23,4 +23,3 @@ To run tests use: ```sh pnpm test ``` - diff --git a/packages/input/README.md b/packages/input/README.md index 16b22ff2..978bd3e8 100644 --- a/packages/input/README.md +++ b/packages/input/README.md @@ -23,4 +23,3 @@ To run tests use: ```sh pnpm test ``` - diff --git a/packages/music/README.md b/packages/music/README.md index 9c998249..85a8e5bb 100644 --- a/packages/music/README.md +++ b/packages/music/README.md @@ -25,4 +25,3 @@ To run tests use: ```sh pnpm test ``` - diff --git a/packages/sound/README.md b/packages/sound/README.md index 6406a429..62a97dbe 100644 --- a/packages/sound/README.md +++ b/packages/sound/README.md @@ -23,4 +23,3 @@ To run tests use: ```sh pnpm test ``` -