Rewrite readme

This commit is contained in:
Lynix 2022-02-12 10:29:57 +01:00
parent b8e017aa25
commit a54049494e
7 changed files with 113 additions and 162 deletions

View File

@ -1,5 +0,0 @@
Nazara Engine was originally created in early 2012.
It follows a complete overhaul of a previous project in order to offer more features and modularity.
Jérôme "Lynix" Leclercq - main developper (lynix680@gmail.com)
Full Cycle Games - sponsor and contributor since January 2017.

View File

@ -1,4 +1,14 @@
# Upcoming version: # Nazara-Next (master)
- Switched from premake to [xmake](https://xmake.io) to build the engine or generate project files
- Remade the renderer and graphics modules with modern techniques and API
- Added Shader module, bringing a custom shader language to the engine
- Removed libsndfile dependency (minimp3, dr_wav and libflac are now used instead)
- Removed NazaraSDK, ECS are now part of regular libraries
- Removed thirdparty library codes, [xmake](https://xmake.io) is now used to handle them.
- Way too many changes to list here
# 0.5 (last legacy version, unreleased due to next version):
Miscellaneous: Miscellaneous:
- Add possibility to excludes with one commande all tests/examples/tools/etc. - Add possibility to excludes with one commande all tests/examples/tools/etc.

View File

@ -1,53 +1,40 @@
# Installation # Install
> **Notice**: For french speakers, a more detailed explanation of the instructions is provided here: [Instructions pour compiler](wiki/(FR)-Compiler-le-moteur). ## Build
The first step to using the engine is to recover it. This can currently be done in two ways: First, clone or download the project sources as a .zip
1) This can be don either from the original github (only the development is continuously evolving):
```git clone https://github.com/DigitalPulseSoftware/NazaraEngine.git```
2) Or by downloading a [zip file](https://github.com/DigitalPulseSoftware/NazaraEngine/archive/master.zip) containing the entire source code of the engine.
All you have to do is go to the "build/" folder. The compilation system uses [premake](https://premake.github.io/) to generate build systems. Nazara is based on [XMake](https://xmake.io), a new amazing build system which will download and compile all dependencies it won't find on your computer, even [Qt](https://www.qt.io) if you wish to build the shader nodes editor.
## Windows Once XMake is installed (note that you can also download a [portable version](https://github.com/xmake-io/xmake/releases) of XMake if you wish not to install it), you'll need to run `xmake config --mode=releasedbg` in the project folder (you can also use `--mode=debug` if you wish to build a debug version of the game).
For Windows users, they can directly use ".bat" files such as: "Build_VS2017.bat". It will generate a solution "NazaraEngine.sln" ready to use that you can directly build to produce the libs or execute the samples. If you wish to include unit tests or the shader nodes editor, you'll need to add `--tests=y` and `--shadernodes=y` respectively to `xmake config` parameters.
## Linux XMake will try to find all the project dependencies on your computer and ask you to install the missing ones.
Linux users, can type: "./premake5-linux64 gmake" or with the additional argument "--cc=clang" to configure the C++ compiler used. ### Compile using command-line (first method)
Some additional libraries will be required for compilation depending on the modules used: Once you're ready to compile the engine itself, run `xmake` (or `xmake -jX` if you wish not to use all your computer threads, with X being the number of threads you wish to use) and watch as the engine compiles.
#### Audio module (OpenAL and libsndfile) ### Generate a project (second method)
- with apt: `sudo apt-get install libopenal-dev libsndfile1-dev` XMake can also generate a project file for another tool:
- with pacman: `sudo pacman -S openal libsndfile` - Visual Studio: `xmake project -k vs`
- CMakeLists.txt (which you can open in CLion and more): `xmake project -k cmake`
- Makefile: `xmake project -k make`
- Ninja: `xmake project -k ninja`
- XCode: `xmake project -k xcode`
#### Platform module (Freetype): You should now be able to the project file with the tool of your choice.
- with apt: `sudo apt-get install libfreetype6-dev`
- with pacman: `sudo pacman -S freetype2`
#### Utility module (XCB + X11):
- with apt: `sudo apt-get install libxcb-cursor-dev libxcb-ewmh-dev libxcb-randr0-dev libxcb-icccm4-dev libxcb-keysyms1-dev libx11-dev`
- with pacman: `sudo pacman -S libxcb libx11`
#### OpenGL renderer module:
- with apt: `sudo apt-get install mesa-common-dev libgl1-mesa-dev`
- with pacman: `sudo pacman -S mesa`
#### Plugin Assimp:
- with apt: `sudo apt-get install libassimp-dev`
- with pacman: `sudo pacman -S assimp`
#### The one line command to install everything is:
- with apt: `sudo apt-get install libopenal-dev libsndfile1-dev libfreetype6-dev libxcb-cursor-dev libxcb-ewmh-dev libxcb-randr0-dev libxcb-icccm4-dev libxcb-keysyms1-dev libx11-dev mesa-common-dev libgl1-mesa-dev libassimp-dev`
- with pacman: `sudo pacman -S openal libsndfile freetype2 libxcb libx11 mesa assimp`
## Test ## Test
One should now be able to execute the samples provided in the folder "NazaraEngine/examples/bin/" or the unit tests within "NazaraEngine/tests/". To run the examples, unit tests or tools, you can either run them in the project or by using the command-line:
`xmake run <exe>` with `<exe>` being the name of the executable you wish to run.
Available examples names can be found in the `examples` folder (example: `xmake run PhysicsDemo`).
You can also run unit tests with `xmake run Nazara(Client)UnitTests`.
## Install
You can also package the engine in a folder by using `xmake install -o target_folder`, on Unix-based system you can also install it system-wide by running `xmake install`.

View File

@ -6,21 +6,26 @@ Linux | [![Linux build status](https://github.com/DigitalPulseSoftware/NazaraEng
# Nazara Engine # Nazara Engine
Nazara Engine is a fast, complete, cross-platform, object-oriented API which can help you in your daily developer life. Nazara Engine is a cross-platform framework aimed at (but not limited to) real-time applications requiring audio, 2D and 3D rendering, network and more (such as video games).
Its goal is to provide a set of useful classes : Its core provides unicode strings, filesystem access, hashs, threads, ...
It also provide a set of libraries, such as audio, network, physics, renderer, 2D and 3D graphics engines, ... Features:
- 2D and 3D rendering using either Vulkan, OpenGL and OpenGL ES (depending on what's available on the target system).
- Its own renderer-agnostic shader language (NZSL - Nazara Shading Language), no need to write specialized GLSL code anymore!
- Easy to customize graphics module providing basis for advanced techniques (such as deferred shading, HDR, PBR rendering and more).
- Audio playback and streaming based on OpenAL.
- 2D and 3D Physics integration (with [Chipmunk](https://chipmunk-physics.net) and [Newton Dynamics](https://github.com/MADEAPPS/newton-dynamics)).
- Optional ECS (Entity-Component-System) classes for helping with entity handling (based on the excellent [entt](https://github.com/skypjack/entt)).
- A [ENet](https://github.com/lsalzman/enet)-based reliable UDP networking protocol.
You can use it in any kind of commercial/non-commercial applications without any restriction ([MIT license](http://opensource.org/licenses/MIT)). You can use it in any kind of commercial and non-commercial applications without any restriction ([MIT license](http://opensource.org/licenses/MIT)).
## Authors ## Authors
Jérôme "Lynix" Leclercq - main developper (<lynix680@gmail.com>) Jérôme "Lynix" Leclercq - main developper (<lynix680@gmail.com>)
Full Cycle Games - sponsor and contributor from 2017 to 2020.
## Install ## Build and install
Use the premake build system in the build directory then compile the engine for your platform. See [INSTALL.md](INSTALL.md) for build instructions.
## How to use ## How to use
@ -33,21 +38,14 @@ You can find tutorials on installation, compilation and use on the [official wik
- Submitting a patch to GitHub - Submitting a patch to GitHub
- Post suggestions/bugs on the forum or the [GitHub tracker](https://github.com/DigitalPulseSoftware/NazaraEngine/issues) - Post suggestions/bugs on the forum or the [GitHub tracker](https://github.com/DigitalPulseSoftware/NazaraEngine/issues)
- [Fork the project](https://github.com/DigitalPulseSoftware/NazaraEngine/fork) on GitHub and [push your changes](https://github.com/DigitalPulseSoftware/NazaraEngine/pulls) - [Fork the project](https://github.com/DigitalPulseSoftware/NazaraEngine/fork) on GitHub and [push your changes](https://github.com/DigitalPulseSoftware/NazaraEngine/pulls)
- Talking about Nazara Engine to other people - Talking about Nazara Engine to other people, spread the word!
- Doing anything else that might help us - Doing anything else that might help us
## Links ## Links
[Website](https://nazara.digitalpulsesoftware.net)
[Documentation](https://nazara.digitalpulsesoftware.net/doc)
[Discord](https://discord.gg/MvwNx73) [Discord](https://discord.gg/MvwNx73)
[Wiki](https://github.com/DigitalPulseSoftware/NazaraEngine/wiki) [Wiki](https://github.com/DigitalPulseSoftware/NazaraEngine/wiki)
[Forum](https://forum.digitalpulsesoftware.net)
## Thanks to: ## Thanks to:
- **RafBill** and **Raakz:** Finding bugs and/or testing. See [THANKS.md](THANKS.md)
- **Fissal "DrFisher" Hannoun**: Helping a lot in architecture design.
- **Alexandre "Danman" Janniaux**: Helping making the POSIX implementation.
- **Youri "Gawaboumga" Hubaut**: Improving the whole project by making the documentation, improving the code, and more.
- **Rémi "overdrivr" Bèges**: Made the Noise module.

View File

@ -12,15 +12,15 @@ A special thank you to all those who may have contributed directly or indirectly
This engine also uses different projects, we obviously thank their respective authors and contributors: This engine also uses different projects, we obviously thank their respective authors and contributors:
- [Assimp](http://www.assimp.org/): Model loader. - [chipmunk2d](https://chipmunk-physics.net/): A fast and lightweight 2D game physics library.
- [Catch2](https://github.com/catchorg/Catch2): Test framework for C++. - [dr_wav](https://github.com/mackron/dr_libs): Single file audio decoding libraries for C/C++.
- [Chimpmunk](http://chipmunk-physics.net/): Physics engine for 2D. - [entt](https://github.com/skypjack/entt): Gaming meets modern C++ - a fast and reliable entity component system (ECS) and much more.
- [Freetype](https://www.freetype.org/): Font rendering library. - [freetype](https://www.freetype.org): A freely available software library to render fonts.
- [Lua](https://www.lua.org/): Scripting library. - [kiwisolver](https://kiwisolver.readthedocs.io/en/latest/): Efficient C++ implementation of the Cassowary constraint solving algorithm
- [Netwon](http://newtondynamics.com/forum/newton.php): Physics engine for 3D. - [libflac](https://xiph.org/flac): Free Lossless Audio Codec
- [Sndfile](http://www.mega-nerd.com/libsndfile/): Audio loader. - [libsdl](https://www.libsdl.org/): Simple DirectMedia Layer
- [Stb](https://github.com/nothings/stb): Image loader. - [libvorbis](https://xiph.org/vorbis): Reference implementation of the Ogg Vorbis audio format.
- [Utfcpp](http://utfcpp.sourceforge.net/): UTF-8 handler. - [minimp3](https://github.com/lieff/minimp3): Minimalistic MP3 decoder single header library
- [OpenAL](https://www.openal.org/): Audio API specification. - [newtondynamics](http://newtondynamics.com): Newton Dynamics is an integrated solution for real time simulation of physics environments.
- [OpenGL](https://www.khronos.org/opengl/): Graphics API specification. - [openal-soft](https://openal-soft.org): OpenAL Soft is a software implementation of the OpenAL 3D audio API.
- [Vulkan](https://www.khronos.org/vulkan/): New graphics API specification which replaced OpenGL. - [stb](https://github.com/nothings/stb): single-file public domain (or MIT licensed) libraries for C/C++

View File

@ -1,88 +0,0 @@
Examples writing-style:
Alphabetical order for everything and try to regroup each methods beginning with the same letter in the header
Class header:
```cpp
// Copyright (C) YEAR AUTHOR
// This file is part of the "Nazara Engine - MODULE module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_FILENAME_HPP
#define NAZARA_FILENAME_HPP
#include <Nazara/Prerequisites.hpp>
#include <Nazara/NzClass.hpp>
#include <STLHeader>
struct NzPossibleImplementation;
class NAZARA_API NzClassName
{
friend NzClassFriend;
public:
Constructors();
Destructor();
FunctionInAClass();
protected:
private:
NzClass m_variableName;
STL m_variableName;
dataType m_variableName;
NzPossibleImplementation* m_impl;
};
#endif // NAZARA_FILENAME_HPP
```
Class source:
```cpp
// Copyright (C) YEAR AUTHOR
// This file is part of the "Nazara Engine - MODULE module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/MODULE/FILENAME.hpp>
#include <Nazara/NzClass.hpp>
#include <STLHeader>
#include <Nazara/MODULE/Debug.hpp>
struct NzPossibleImplementation {};
NzClassName::Constructors() :
m_variableName(init)
{
testsAndOtherInits;
}
NzClassName::PublicFunctions()
NzClassName::ProtectedFunctions()
NzClassName::PrivateFunctions()
```
Structure:
```cpp
/!\ enum in Enums.hpp
enum nzEnum
{
nzEnum_1,
nzEnum_2,
nzEnum_Max = nzEnum_2
};
```
Function:
```cpp
FunctionName()
{
variableName = init;
}
```

View File

@ -0,0 +1,49 @@
task("list-deps")
set_menu({
-- Settings menu usage
usage = "xmake list-deps [target]",
description = "List dependencies used by the engine or a specific target",
options =
{
{'t', "target", "v", nil, "Target name" }
}
})
on_run(function ()
import("core.base.option")
import("core.project.project")
import("private.action.require.impl.package")
local requires, requires_extra = project.requires_str()
if not requires or #requires == 0 then
return
end
local usedpackages
local targetname = option.get("target")
if targetname then
local target = project.target(targetname)
usedpackages = target:pkgs()
else
usedpackages = project.required_packages()
end
local projectdeps = {}
for _, instance in ipairs(package.load_packages(requires, {requires_extra = requires_extra})) do
if usedpackages[instance:name()] then
table.insert(projectdeps, {
name = instance:name(),
desc = instance:description(),
homepage = instance:get("homepage")
})
end
end
table.sort(projectdeps, function (a, b) return a.name < b.name end)
for _, dep in pairs(projectdeps) do
print(string.format("- [%s](%s): %s", dep.name, dep.homepage, dep.desc))
end
end)