Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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]
14 changes: 14 additions & 0 deletions docs/Introduction.md
Original file line number Diff line number Diff line change
@@ -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.
24 changes: 24 additions & 0 deletions packages/asset-manager/README.md
Original file line number Diff line number Diff line change
@@ -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
```
24 changes: 24 additions & 0 deletions packages/common/README.md
Original file line number Diff line number Diff line change
@@ -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
```
24 changes: 24 additions & 0 deletions packages/config/README.md
Original file line number Diff line number Diff line change
@@ -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
```
24 changes: 24 additions & 0 deletions packages/core/README.md
Original file line number Diff line number Diff line change
@@ -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
```
49 changes: 48 additions & 1 deletion packages/ecs/README.md
Original file line number Diff line number Diff line change
@@ -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 :

Expand All @@ -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
```
24 changes: 24 additions & 0 deletions packages/graphics-2d/README.md
Original file line number Diff line number Diff line change
@@ -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
```
24 changes: 24 additions & 0 deletions packages/input/README.md
Original file line number Diff line number Diff line change
@@ -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
```
26 changes: 26 additions & 0 deletions packages/music/README.md
Original file line number Diff line number Diff line change
@@ -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
```
26 changes: 25 additions & 1 deletion packages/sound/README.md
Original file line number Diff line number Diff line change
@@ -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
```
Loading