Skip to content
Open
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
Binary file added .github/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

102 changes: 64 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,75 @@
# Engine
<div align="center">
<br />
<p>
<a href="https://github.com/NanoForge-dev"><img src="https://github.com/NanoForge-dev/blob/main/.github/logo.png" width="546" alt="NanoForge" /></a>
</p>
<br />
<p>
<a href="https://github.com/NanoForge-dev/Engine/actions"><img src="https://github.com/NanoForge-dev/Engine/actions/workflows/tests.yml/badge.svg" alt="Tests status" /></a>
<a href="https://github.com/NanoForge-dev/Engine/commits/main"><img src="https://img.shields.io/github/last-commit/NanoForge-dev/Engine.svg?logo=github&logoColor=ffffff" alt="Last commit." /></a>
<a href="https://github.com/NanoForge-dev/Engine/graphs/contributors"><img src="https://img.shields.io/github/contributors/NanoForge-dev/Engine.svg?maxAge=3600&logo=github&logoColor=fff&color=00c7be" alt="contributors" /></a>
</p>
</div>

This repository contains the full engine for NanoForge.
It can be used by itself.
## About

The engine is made of multiple components:
This repository contains multiple packages with separate [releases][github-releases]. Nanoforge is a powerful game engine for web browser.

- [ecs-client](packages/ecs-client)
- [ecs-server](packages/ecs-server)
- [ecs-lib](packages/ecs-lib)
- [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)
## Usage

This is the full nanoforge engine including all the default libraries.
To use Nanoforge Engine, please refer to the [CLI documentation][cli-source] !

In order to manage this project we use (pnpm)[https://pnpm.io/]
First, install the CLI :

## Installing dependencies

To install dependencies run:

```sh
pnpm i
```

## Building

To build the project run:

```sh
pnpm build
```bash
npm install -g @nanoforge-dev/cli
```

## Tests
And then create a new project :

To run tests use:

```sh
pnpm test
```bash
nf new
```

## Setting up a test project

In order to setup a test project see (this)[https://github.com/NanoForge-dev/Engine/docs/Introduction.md]
## Packages

- `@nanoforge-dev/common` ([source][common-source]) - Common interfaces and utilities used by Nanoforge Engine
- `@nanoforge-dev/core` ([source][core-source]) - A core package that contains game main loop
- `@nanoforge-dev/ecs-lib` ([source][ecs-lib-source]) - A powerful data structure for managing game entities (_do not use this in your projects_)
- `@nanoforge-dev/ecs-client` ([source][ecs-client-source]) - A wrapper of `@nanoforge-dev/ecs-lib` for client-side usage
- `@nanoforge-dev/ecs-server` ([source][ecs-server-source]) - A wrapper of `@nanoforge-dev/ecs-lib` for server-side usage
- `@nanoforge-dev/config` ([source][config-source]) - A wrapper of `class-validator` and `class-transformer` to imports validation and transformation decorators
- `@nanoforge-dev/graphics-2d` ([source][graphics-2d-source]) - A base 2D graphics library
- `@nanoforge-dev/asset-manager` ([source][asset-manager-source]) - A manager for loading assets to uniform workwith between client and server
- `@nanoforge-dev/network-client` ([source][network-client-source]) - A network lib with tcp and udp support for client-side usage
- `@nanoforge-dev/network-server` ([source][network-server-source]) - A network lib with tcp and udp support for server-side usage
- `@nanoforge-dev/input` ([source][input-source]) - An input manager for handling keyboard and mouse events
- `@nanoforge-dev/music` ([source][music-source]) - A music player for your game
- `@nanoforge-dev/sound` ([source][sound-source]) - A sound manager for your game

## Contributing

Please read through our [contribution guidelines][contributing] before starting a pull request. We welcome contributions of all kinds, not just code! If you're stuck for ideas, look for the [good first issue][good-first-issue] label on issues in the repository. If you have any questions about the project, feel free to ask them on [Discussions][discussions]. Before creating your own issue or pull request, always check to see if one already exists! Don't rush contributions, take your time and ensure you're doing it correctly.

## Help

If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please ask on [Discussions][discussions].

[contributing]: https://github.com/NanoForge-dev/Engine/blob/main/.github/CONTRIBUTING.md
[discussions]: https://github.com/NanoForge-dev/Engine/discussions
[cli-source]: https://github.com/NanoForge-dev/CLI
[github-releases]: https://github.com/NanoForge-dev/Engine/releases
[asset-manager-source]: https://github.com/NanoForge-dev/Engine/tree/main/packages/asset-manager
[common-source]: https://github.com/NanoForge-dev/Engine/tree/main/packages/common
[config-source]: https://github.com/NanoForge-dev/Engine/tree/main/packages/config
[core-source]: https://github.com/NanoForge-dev/Engine/tree/main/packages/core
[ecs-client-source]: https://github.com/NanoForge-dev/Engine/tree/main/packages/ecs-client
[ecs-lib-source]: https://github.com/NanoForge-dev/Engine/tree/main/packages/ecs-lib
[ecs-server-source]: https://github.com/NanoForge-dev/Engine/tree/main/packages/ecs-server
[graphics-2d-source]: https://github.com/NanoForge-dev/Engine/tree/main/packages/graphics-2d
[input-source]: https://github.com/NanoForge-dev/Engine/tree/main/packages/input
[music-source]: https://github.com/NanoForge-dev/Engine/tree/main/packages/music
[network-client-source]: https://github.com/NanoForge-dev/Engine/tree/main/packages/network-client
[network-server-source]: https://github.com/NanoForge-dev/Engine/tree/main/packages/network-server
[sound-source]: https://github.com/NanoForge-dev/Engine/tree/main/packages/sound
[good-first-issue]: https://github.com/NanoForge-dev/Engine/contribute
229 changes: 229 additions & 0 deletions example/pong-network/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
### VisualStudioCode template
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Node template
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

### Private

# Nanoforge
.nanoforge/
1 change: 1 addition & 0 deletions example/pong-network/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# pong-network
Loading
Loading